views:

29

answers:

1

I already have installed this gem: googlecharts.rubyforge.org, but I don't want to require it every time I need it on my actions, so I am trying to do it the Rails way:

config.gem 'mattetti-googlecharts'

Then I go and start my server and get this error:

Missing these required gems:
mattetti-googlecharts

You're running: ruby 1.8.7.174 at /usr/bin/ruby1.8 rubygems 1.3.5 at /home/laptop/.gem/ruby/1.8, /var/lib/gems/1.8

Run rake gems:install to install the missing gems.

But the gem is installed! I also tried this variant:

config.gem 'mattetti-googlecharts', :lib => 'gcharts'
+2  A: 

Use RubyGems repository. The GitHub gem is outdated.

$ gem install googlecharts

Then in your app

config.gem 'googlecharts'

You don't need to require gchart because of this. Also note, you were trying to require gcharts.rb, not gchart.rb.

Simone Carletti
Tnxs. Can you explain why config.gem 'mattetti-googlecharts' did not work? If it were updated, should I invoke only per 'googlecharts' ?
Fabiano PS
Because you were requiring `gcharts` instead of `gchart`
Simone Carletti