Not sure if this is the right place to ask this but I know allot of
you are using either scruffy or gruff to generate graphs. I am running
on a macbook pro with macports of ruby 1.8.5 rails edge imagemagick
rmagick and trying to get either scruffy or gruff to work. my issue is
that I can’t seem to get either of them to work on this combination
and can’t figure out why. I have the following error in my mongrel
log:
/opt/local/lib/ruby/gems/1.8/gems/scruffy-0.2.2/lib/scruffy/
rasterizers/rmagick_rasterizer.rb:16: [BUG] Bus Error
ruby 1.8.5 (2006-08-25) [i686-darwin8.8.2]
Here is how I am trying to make the graph:
View
<%= image_tag graph_url(:action => ‘collection_worth’, :id => 42) %>
controller:
def collection_worth
graph = Scruffy::Graph.new(:title => “Monthly Profits”, :theme =>
Scruffy::Themes::RubyBlog.new)
graph << Scruffy::Layers::Line.new(:title => ‘John’, :points =>
[100, -20, 30, 60])
graph << Scruffy::Layers::Line.new(:title => ‘Sara’, :points =>
[120, 50, -80, 20])
send_data(graph.render(:width => 800, :as => 'PNG'), :type =>
‘image/png’, :disposition=> ‘inline’)
end
as you can se nothing special right now just trying to get a graph to
draw. (I have a route set up so that is not the issue in routes.rb as
well) rails is going out and trying to build the graph but nothing is.
I am also using attachment_fu and it successfully uses rmagick to
create thumbnails for various images as well. Any thoughts?
imagemagick is version ImageMagick @6.3.0-3_0+darwin_8 (active) and
rmagick is version rmagick-1.15.3
hope that someone can help my only guess is that I am using a bad
combination of rmagick and imagemagick but I have no idea what the
correct combination is in order to get scruffy (prefered graphing
library) and attachment_fu to do exactly what they are supposed to
with ruby 1.8.5 and rails/mongrel