Comments (13)
Which version of ruby are you using?
Which version of rrd-ffi are you using?
I've tested here from source and it seems to work on ruby 1.8.7 and 1.9.2.preview.
from rrd-ffi.
jruby 1.4.0 (ruby 1.8.7 patchlevel 174)
rrd-ffi 0.2.2 throws it, rrd-ffi 0.2.1 does not
from rrd-ffi.
thanks rizzah, i will take a look at it with jruby
from rrd-ffi.
Cool, thanks. Its definitely something within the block for rrd.rb and the wrapper.rb as well. For instance I commented the block out in the rrd.rb, then received the same error in the wrapper.rb.
from rrd-ffi.
rizzah, could you please test it from the source here. i added a small fix and now it seems to work on jruby as well. Can you confirm please?
I'm not very proud of this solution though. It will figure how to solve it in a more fancy way later :)
Thanks for the feedback!
from rrd-ffi.
That got it to load. Seeing a new issue when calling functions out of it...
rrd_file = "/tmp/_opt.rrd"
@graph = RRD.graph :start => Time.now - 1.day, :end => Time.now do
for_rrd_data "usage", :usage => :last, :from => rrd_file
print_value "usage", :format => "%3.2lf%%"
end
NoMethodError (undefined method reduce' for {:start=>1271178593, :end=>1271264993, :title=>""}:Hash): gems/gems/rrd-ffi-0.2.2/lib/rrd/graph.rb:85:in
save'
gems/gems/rrd-ffi-0.2.2/lib/rrd.rb:17:in `graph'
from rrd-ffi.
In my environment the tests did pass. I made some changes, removing the reduce method. Can i have your help again?
from rrd-ffi.
Sure, got this...
TypeError (can't convert Hash into String):
file:lib/jruby-stdlib-1.3.1.jar!/ffi/memorypointer.rb:9:in from_string' gems/gems/rrd-ffi-0.2.2/lib/rrd/wrapper.rb:314:in
to_pointer'
gems/gems/rrd-ffi-0.2.2/lib/rrd/wrapper.rb:314:in each' gems/gems/rrd-ffi-0.2.2/lib/rrd/wrapper.rb:314:in
to_pointer'
gems/gems/rrd-ffi-0.2.2/lib/rrd/wrapper.rb:148:in graph' gems/gems/rrd-ffi-0.2.2/lib/rrd/graph.rb:89:in
save'
gems/gems/rrd-ffi-0.2.2/lib/rrd.rb:17:in `graph'
for what its worth i just changed the reduce methods to inject, which is essentially the same method, received the same error
from rrd-ffi.
Try the latest changes from source, to see if it works.
I removed the reduce method, using only each_pair method now.
from rrd-ffi.
TypeError (can't convert Hash into String):
file:lib/jruby-stdlib-1.3.1.jar!/ffi/memorypointer.rb:9:in from_string' gems/gems/rrd-ffi-0.2.2/lib/rrd/wrapper.rb:314:in
to_pointer'
gems/gems/rrd-ffi-0.2.2/lib/rrd/wrapper.rb:314:in each' gems/gems/rrd-ffi-0.2.2/lib/rrd/wrapper.rb:314:in
to_pointer'
gems/gems/rrd-ffi-0.2.2/lib/rrd/wrapper.rb:148:in graph' gems/gems/rrd-ffi-0.2.2/lib/rrd/graph.rb:89:in
save'
gems/gems/rrd-ffi-0.2.2/lib/rrd.rb:17:in `graph'
from rrd-ffi.
Graph using jruby is working for me. I can't reproduce this error.
I saw you are using "lib/jruby-stdlib-1.3.1.jar", may it be jruby version 1.3 instead of 1.4?
I tested using jruby 1.4.0 from rvm.
from rrd-ffi.
hm yup..got it to work. Thanks for the assistance.
from rrd-ffi.
close
from rrd-ffi.
Related Issues (20)
- Memory leak HOT 6
- I18n dependency HOT 1
- Dependency problem with ActiveSupport > 3.0.9? HOT 2
- Variable as datasource name HOT 3
- :start not working? HOT 4
- Stack graph HOT 2
- Undefined constant RRD_FILE in example HOT 1
- Option for using wrapper bang methods HOT 3
- RRD::Wrapper.graph PRINTs HOT 4
- generating graph sometimes loops glib on OSX 10.7.5 HOT 10
- add HRULE
- Exception: FFI::NotFoundError when rrdtool was compiled without graphics support
- Add support for "--daemon" option
- RRD::Base#fetch returns different values in the "time" column than 'rrdtool fetch' HOT 1
- Fetching data from a rrd HOT 2
- Support for rrdtool 1.6? HOT 1
- Opening an existing RRD HOT 3
- RRD database Archive with 1 year problem real number HOT 2
- Segfault on wrapper.rb:121 get_array_of_string HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rrd-ffi.