Forum: Ruby Problems with "scruffy"

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2076c5cba35eacab425823a71c2da3a3?d=identicon&s=25 Andrés Suárez (kaizen)
on 2008-10-21 13:28
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:in
`activate'
        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:in `ge
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
D337e2cf7c6d03caac6988d83e0e7f66?d=identicon&s=25 Michael Guterl (mguterl)
on 2008-10-21 14:56
(Received via mailing list)
On Tue, Oct 21, 2008 at 7:27 AM, Andrés Suárez <ansuga@gmail.com> 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 Guterl
2076c5cba35eacab425823a71c2da3a3?d=identicon&s=25 Andrés Suárez (kaizen)
on 2008-10-21 15:06
Thanks Michael, I didn't know that "builder" was a gem. Now the error
has changed: I've to install RMagick :D

Regards,
Andrés
This topic is locked and can not be replied to.