problem running RubyGems from user directory

Doug's Avatar

Doug

01 Dec, 2012 12:47 AM

I installed RubyGems in a user directory on a shared server in accordance with the instructions here
http://docs.rubygems.org/read/chapter/3

but the system still wants to use the older/shared version of RubyGems. If I run "gem -v" I get "1.3.7" back, when the version I installed is 1.8.24. Seems like the needed directories are not in the path, so I guess my question is what directories/files need to by in the path in order for the version of RubyGems that I installed to take precedence over the old/shared one on the server? The directory with the "gem18" is in the path, as is the directory with the "rubygems-1.8.24" directory in it.

Thanks for any help you can offer.

  1. Support Staff 1 Posted by Eric Hodel on 01 Dec, 2012 12:51 AM

    Eric Hodel's Avatar

    If you have other versions of ruby installed you must export RUBYLIB=~/prefix/lib or export RUBYOPT=-I~/profix/lib to place your ruby in the front of the load path.

    Typically, installing rvm is easier.

  2. Eric Hodel closed this discussion on 01 Dec, 2012 12:51 AM.

  3. Doug Quirke re-opened this discussion on 01 Dec, 2012 01:17 AM

  4. 2 Posted by Doug Quirke on 01 Dec, 2012 01:17 AM

    Doug Quirke's Avatar

    Thanks. There's only one version of Ruby installed here (the one shared
    by other users of the shared machine), so what I'm trying to accomplish
    is to still use that version of Ruby, but have it use the version of
    RubyGems that I've installed in my user directory instead of the older
    version of RubyGems that's in with the shared version of Ruby. Maybe
    what I'm trying to do isn't possible?

  5. Support Staff 3 Posted by Eric Hodel on 01 Dec, 2012 01:41 AM

    Eric Hodel's Avatar

    It's perfectly possible, just use RUBYLIB or RUBYOPT as described in my previous post. This is how we test new versions of RubyGems as we are developing them while still using a stable version for our other work.

  6. Eric Hodel closed this discussion on 01 Dec, 2012 01:41 AM.

  7. Doug Quirke re-opened this discussion on 01 Dec, 2012 07:09 PM

  8. 4 Posted by Doug Quirke on 01 Dec, 2012 07:09 PM

    Doug Quirke's Avatar

    Got it. Thanks so much, that did the trick!

  9. Nick Quaranto closed this discussion on 19 Dec, 2012 01:28 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM
18 Oct, 2014 08:39 PM
16 Oct, 2014 12:41 PM
06 Oct, 2014 02:30 PM