Here is the command开发者_JS百科 line output:
breefiel@breefield.com [~/rails_apps/recurse]# rake gems
(in /home/breefiel/rails_apps/recurse)
- [ ] authlogic
- [ ] acts_as_archive
- [ ] haml
I = Installed
F = Frozen
R = Framework (loaded before rails starts)
Notice that the gems are not I, F, or R...what does this mean? This is just one indicator that my gems aren't being detected. When I install them, they are stored in "/home/breefiel/ruby/gems", and I've added the line
Gem.path.push "/home/breefiel/ruby/gems"
To my environment.rb. However, "rake gems" is still returning the above output, so I'm not sure. Any thoughts?
The code is determined with this line of code:
code = gem.loaded? ? (gem.frozen? ? (gem.framework_gem? ? "R" : "F") : "I") : " "
The blank code means the gem wasn't loaded. Make sure config.gem '...'
doesn't have :lib => false
because that will stop them from being loaded with Rails.
If that isn't the case, looking in Rails::GemDependency
, loaded?
will be set by load
or determined by looking for the files (if load
isn't called).
I have two suggestions,
- Move your gems into the normal directories and see if that fixes the problem; or
- Manually call
load
using a ruby console and see if you get any errors that rails is missing.
精彩评论