I'm using RVM, Ruby 1.9.2 and Rails 3.0.3 installed. I installed the curb-fu gem just now. When I do gem list
, curb-fu is listed. When I do require 'curb-fu'
in the irb
, it returns true
.
But when I try the same in the rails console of my app, I get this error:
ruby-1.9.2-p136 :001 > require 'curb-fu'
LoadError: no such file to load -- curb-fu
When I do require 'rubygems'
, it returns nil
, and when I try curb-fu after that it gives the same error.
My gem environment:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2010-12-25 patchlevel 136) [x86_64-darwin10.5.0]
- INSTALLATION DIRECTORY: /Users/rits/.rvm/gems/ruby-1.9.2-p136
- RUBY EXECUTABLE: /Users/rits/.rvm/rubies/ruby-1.9.2-p136/bin/ruby
- EXECUTABLE DIRECTORY: /Use开发者_JAVA技巧rs/rits/.rvm/gems/ruby-1.9.2-p136/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-10
- GEM PATHS:
- /Users/rits/.rvm/gems/ruby-1.9.2-p136
- /Users/rits/.rvm/gems/ruby-1.9.2-p136@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
What can I do?
You need to list the gem "curb-fu" in your app's Gemfile as
gem 'curb-fu'
and then run "bundle install".
In Rails 3, gem dependencies are handled thru Bundler and must be listed in the Gemfile.
精彩评论