I am trying to use the googlecharts gem to create some quick charts. Here are the rubyforge and github sites:
http://googlecharts.rubyforge.org/
http://github.com/mattetti/googlecharts/tree/master
After installing, I keep getting an error saying "no such file to load -- googlecharts" even though when I do a "gem list", the gem is listed. I have restarted my server. Anyone know what could be going on here?
Thanks!
According to the docs, you need to
require 'gchart'
but it sounds like you might be doing
require 'googlecharts'
instead.
You must do a gem install googlecharts first and then add gem "googlecharts" to your gemfile, then run bundle install. You should be free from the error afterwards.
Related
I have hirb in my Gemfile, bundle installed it, edited irbrc file according to the document I found online, even tried installing it from the console, but it still doesn't work. I also did gem list and know for a fact that gem 'hirb' is in there. I'm very new to being a programmer. Can anyone help? Thanks :)
I'm trying to run bundle install on my rails project (I've just added Nokogiri) but I ran into a permission error. I installed rbenv (which seems like the right way to go) to get around that problem but now I'm getting
Could not find gem 'open-uri (>= 0) ruby' in the gems available on this machine.
I know that open-uri is part of ruby though so why am I getting this error?
OpenURI is part of the Ruby Standard library, it is not a gem. You therefor do not need to include it in your Gemfile, just require it in your code.
require 'open-uri'
open('http://stackoverflow.com/')
I am trying to use this gem in my rails application, but when I add it to my gem file and try to use it I get an error saying that it did not found the methods required (I am using it inside a controller). Also require 'bn4r' does not help as rails tells me that it cannot load such a file, which is odd. I can access the library from the development console with no problems any idea as to why this happens?
After adding the gem to the Gemfile:
gem 'bn4r'
install it:
$ bundle install
Restart the server and use it like this:
BayesNet.new
Just added gem "rest-client", "~> 1.6.7" to my gem file and ran bundle install.
Trying to make the app send a get request to a local jetty
#server = "http://127.0.0.1:3333"
RestClient.get #server+'/command/core/get-version'
results in
uninitialized constant XController::RestClient
UPDATE:
Question solved, I forgot to restart the webserver.
The problem is that it requires to restart the server for freshly installed gems to come in effect.
Outside rails, I ran into the same problem. Solution:
require 'rest-client'
It happened to me few times i named the gem restclient instead of rest-client :) Both gems exist, but the one with dash is the correct one.
I'm trying to use Friendly ID to handle slugs in my Rails app. When I run "rails generate friendly_id", I get the following error:
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require': no such file to load -- babosa (LoadError)
However, the babosa gem is definitely installed.
How can I even begin to solve this?
I was able to fix the problem by installing Bundler and adding the following lines to "Gemfile" in the root of my app:
gem 'babosa'
gem 'friendly_id'
I've not seen this problem myself, but have you tried the Google Group for the gem? It looks like that's the author's preferred communication method, and he looks to be fairly responsive there.
http://groups.google.com/group/friendly_id