Problems with "scruffy"


#1

Hi,

I’ve the last one-click installer and the scruffy gem. And if I try to
run this example script:

require ‘rubygems’
require ‘scruffy’

graph = Scruffy::Graph.new
graph.title = “Favourite Snacks”
graph.renderer = Scruffy::Renderers::Pie.new

graph.add :pie, ‘’, {
‘Apple’ => 20,
‘Banana’ => 100,
‘Orange’ => 70,
‘Taco’ => 30
}

graph.render :to => “pie_test.svg”
graph.render :width => 300, :height => 200,
:to => “pie_test.png”, :as => ‘png’

but I’ve obtained the next error:

c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:578:in
report_activate_error': Could not find RubyGem builder (>= 2.0) (Gem::LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:134:inactivate’
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:49:in gem' from c:/ruby/lib/ruby/gems/1.8/gems/scruffy-0.2.5/lib/scruffy.rb:18 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:inge
m_original_require’
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `re
quire’
from scruffy_petete.rb:2
shell returned 1

Where is the problem?

Regards,
Andrés


#2

On Tue, Oct 21, 2008 at 7:27 AM, Andrés Suárez removed_email_address@domain.invalid wrote:

graph.renderer = Scruffy::Renderers::Pie.new
:to => “pie_test.png”, :as => ‘png’

but I’ve obtained the next error:

c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:578:in
`report_activate_error’: Could
not find RubyGem builder (>= 2.0) (Gem::LoadError)
It tells you right here ^^

quire’
from scruffy_petete.rb:2
shell returned 1

Where is the problem?

gem install builder

for some reason it wasn’t included as a dependency in the .gemspec

HTH,
Michael G.


#3

Thanks Michael, I didn’t know that “builder” was a gem. Now the error
has changed: I’ve to install RMagick :smiley:

Regards,
Andrés