ruby 1.9.1 and gem path issues

2 views
Skip to first unread message

MilesTogoe

unread,
Apr 8, 2009, 9:13:17 AM4/8/09
to ur...@googlegroups.com
Anyone have experience with running Ruby 1.9.1 and using gems ? I'm
trying to run ruby 1.9.1 with Sinatra and DataMapper on Fedora 10. I
have a small bash routine for switching between 1.9.1 and 1.8.6 which
switches MY_RUBY_HOME path to the right ruby executable and switches
GEM_HOME to "~/.gem/ruby/1.9" I have got 1.9.1 compiled and installed
but when I go to run Sinatra - it does not find the gems. I think the
problem all relates to gem paths. I installed gems running as 1.9.1 but
not sure where they got put. So:
1) where does 1.9.1 store gems ?
2) what is the right default path for gems in 1.9.1 ?

thks for any help

Roger Pack

unread,
Apr 8, 2009, 11:03:30 AM4/8/09
to ur...@googlegroups.com

Hmm. I had thought that gems already stored things in its own separate
subdirectories, so perhaps you could leave the GEM_HOME to ~/.gem for
both versions?
-=r

MilesTogoe

unread,
Apr 8, 2009, 11:20:04 AM4/8/09
to ur...@googlegroups.com
maybe the problem has to do with relative paths and different user
accounts - I'm installing gems under root permission and yet running
under a /home user directory. I didn't have any issue when using
1.8.6 but then I never tried to specify any GEM_HOME paths either.


Devlin Daley

unread,
Apr 8, 2009, 12:55:14 PM4/8/09
to ur...@googlegroups.com
> 1) where does 1.9.1 store gems ?

RubyGems can tell you, which takes into account any gem settings you've changed.

$ gem env

-- Devlin

MilesTogoe

unread,
Apr 8, 2009, 3:40:54 PM4/8/09
to ur...@googlegroups.com
oh yeah, thks. hmm even my 1.9.1 installed gems are going into
"/usr/lib/ruby/gems/1.8" - makes sense if all gems are in the same
directory but doesnt' seem to make sense that it's listed under "1.8".
I'll try setting the path to that under 1.9 and see. Just wondering if
there is a convention here or is it determined by the packagers ?


Reply all
Reply to author
Forward
0 new messages