views:

49

answers:

1

Here is the command line output:

[email protected] [~/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?

A: 

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,

  1. Move your gems into the normal directories and see if that fixes the problem; or
  2. Manually call load using a ruby console and see if you get any errors that rails is missing.
Samuel
I'll try moving them into the /vendor/gemsI can't run ./script/consol because it complains about gems not existing :/But that code, combined with the other comments is very helpful. Thanks!
Dustin Hoffman