uninitialized constant Gem::Installer::ENV_PATHS

1,433 views
Skip to first unread message

Mark Sidell

unread,
Mar 31, 2012, 6:34:18 PM3/31/12
to rvm (Ruby Version Manager)
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?

mpapis

unread,
Apr 1, 2012, 6:01:33 AM4/1/12
to rvm (Ruby Version Manager)
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.

Mark Sidell

unread,
Apr 1, 2012, 11:51:43 AM4/1/12
to rvm (Ruby Version Manager)
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.

mpapis

unread,
Apr 1, 2012, 3:32:41 PM4/1/12
to rvm (Ruby Version Manager)
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>
Reply all
Reply to author
Forward
0 new messages