Rails installs my gem but can't use it

software development

#1

Hi Folks,

Did something change recently? Now whenever I try to install a gem, the install works fine but my app errors out like so:


bugatti% ./script/generate
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
Missing these required gems:
  authlogic

You're running:
  ruby 1.8.7.72 at /usr/bin/ruby1.8
  rubygems 1.3.6 at /home/koz/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

I have the following line in my environment.cfg


# Be sure to restart your server when you modify this file
# This is so Dreamhost will use my locally-installed gems
if ENV['RAILS_ENV'] == 'production'
  ENV['GEM_PATH'] =  '/home/koz/.gems' + ':/usr/lib/ruby/gems/1.8'
# Need this or Passenger fails to start end
end

and my .gemrc looks like this:


gemhome: /home/koz/.gems
gempath:
- /home/koz/.gems
- /usr/lib/ruby/gems/1.8

---
:sources:
- http://rubygems.org/
- http://gemcutter.org
:bulk_threshold: 1000
:benchmark: false
:update_sources: true
:backtrace: false
:verbose: true

I install the gem by doing the following commands:

bugatti% gem install authlogic
Successfully installed authlogic-2.1.6
1 gem installed
Installing ri documentation for authlogic-2.1.6...
Installing RDoc documentation for authlogic-2.1.6...

In my config/environment.rb file I’ve got the line:

 config.gem "authlogic"

And then when I go to run the next command in the installation (instructions at: http://github.com/binarylogic/authlogic_example)

I get the error:

bugatti% script/generate session user_session
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
Missing these required gems:
  authlogic

You're running:
  ruby 1.8.7.72 at /usr/bin/ruby1.8
  rubygems 1.3.6 at /home/koz/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

running rake gems:install doesn’t seem to help:

bugatti% rake gems:install
(in /home/.phoebe/koz/test.robotkiwi.net)
gem install authlogic
Successfully installed authlogic-2.1.6
1 gem installed
Installing ri documentation for authlogic-2.1.6...
Installing RDoc documentation for authlogic-2.1.6...
bugatti%

after I do that I get the same error message again.

I feel like I must be doing something foolish, can anyone tell me what I’m doing wrong?

Thanks!

Jonathan


#2

I am having exactly the same issue and also with the authlogic gem. I followed the instructions as you did above and received the following:

** [out :: marlins.dreamhost.com] Missing these required gems:
** [out :: marlins.dreamhost.com] authlogic
** [out :: marlins.dreamhost.com]
** [out :: marlins.dreamhost.com] You’re running:
** [out :: marlins.dreamhost.com] ruby 1.8.7.72 at /usr/bin/ruby1.8
** [out :: marlins.dreamhost.com] rubygems 1.3.6 at /home/USERNAME/.gems, /
usr/lib/ruby/gems/1.8, /home/USERNAME/.gem
** [out :: marlins.dreamhost.com]
** [out :: marlins.dreamhost.com] Run rake gems:install to install the missin
g gems.


#3

Anybody have any ideas on this? Support won’t help. Thanks in advance!


#4

It’s driving me crazy, I’m pretty sure something changed in rails/passenger a couple of weeks ago.

If I can’t install gems, I’ll have to go somewhere else. Sad to give up my dreamhost account after so many years.