uninitialized constant Gem::Installer::ENV_PATHS

Showing 1-4 of 4 messages
uninitialized constant Gem::Installer::ENV_PATHS Mark Sidell 3/31/12 3:34 PM
I'm new to rvm, so I apologize if I'm doing something dumb. I seem to
have things configured correctly, but when I try to install certain
gems, I get an "uninitialized constant" error. For example:


rvm use rvm 1.8.5@dweb

 gem install nokogiri -v 1.4.4

/usr/local/rvm/gems/ruby-1.8.5-p231@global/gems/rubygems-bundler-0.2.8/
lib/rubygems_bundler/regenerate_binstubs_command.rb:34: warning:
parenthesize argument(s) for future version
Building native extensions.  This could take a while...

ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::Installer::ENV_PATHS

It doesn't happen for all gems. Any idea what's wrong?
Re: uninitialized constant Gem::Installer::ENV_PATHS mpapis 4/1/12 3:01 AM
you are using  very old ruby, please expect a lot more errors when
mixing new gems and old ruby

Please switch to ruby 1.8.7-p358 which should go quite easy

Currently latest release of ruby is 1.9.3-p125 and it is really fast
and reliable.
Re: uninitialized constant Gem::Installer::ENV_PATHS Mark Sidell 4/1/12 8:51 AM
Thanks for the message.

My problem is that I need to use 1.8.5 for compatibility with an
existing project. We have been running 1.8.5 for some time. I
installed rvm so that we could retain the 1.8.5 project whilst
developing a new project with the latest Ruby. We were able to install
all of the gems required for the old project, prior to using rvm. I
got the ENV_PATHS error when trying to build a duplicate 1.8.5 setup,
with the same gems, inside of rvm. So, the problem has something to do
with how rvm and/or the 1.8.5 version of ruby inside of rvm are
configured. The docs for the Gem::Installer class say that ENV_PATHS
is supposed to point to where env might live, as explained here:
http://slimgems.github.com/docs/Gem/Installer.html.
Re: uninitialized constant Gem::Installer::ENV_PATHS mpapis 4/1/12 12:32 PM
what version of rubygems did you used in the previous setup or ruby
1.8.5 ? and what version is installed with rvm installed ruby 1.8.5

maybe you could use exactly the same version, rvm allows easy change
of rubygems version with:

    rvm rubygems <version>