From: James Harrison Date: 2012-08-17T22:37:10+09:00 Subject: Re: Debugging failed Ruby Gem require --e89a8ff25616910a7504c77641e9 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Aug 17, 2012 at 6:34 AM, Shareef J. wrote: > Hi there, > > I'm trying to debug why my Ruby installation cannot find gems even > though we've followed what I think is a standard install. > > In this case I'm trying to use micro-optparse and the require fails as > follows: > > :29:in `require': no such file to > load -- micro-optparse (LoadError) > from :29:in `require' > from /home/sjalloq/bin/checkout:3:in `
' > > > The gem was installed using 'gem install ...' and I can list the gem: > > $ gem list mic > > *** LOCAL GEMS *** > > micro-optparse (1.1.5) > > > If I set RUBYLIB to point to the gem installation then it loads but I > thought RUBYLIB was only needed for non-standard installs. > > Is my understanding of installing gems correct and if so how do I debug > this further? > > $ gem --version > 1.3.7 > > $ ruby --version > ruby 1.9.2p136 (2010-12-25) [x86_64-linux] > > Thanks, Shareef. > > -- > Posted via http://www.ruby-forum.com/. > > It's a little hard to say, but: 1. That's a damn old version of rubygems. Try executing gem update to update to the latest sources and whatnot. 2. If gem can find a package, and ruby cannot find a package, then gem is probably not using the version of ruby you think it is. 3. Check the paths that gem is searching through (gem env) and the paths that ruby is searching through (ruby -e "puts $:") and see what's different. --e89a8ff25616910a7504c77641e9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Fri, Aug 17, 2012 at 6:34 AM, Shareef= J. <lists@ruby-forum.com> wrote:
Hi there,

I'm trying to debug why my Ruby installation cannot find gems even
though we've followed what I think is a standard install.

In this case I'm trying to use micro-optparse and the require fails as<= br> follows:

<internal:lib/rubygems/custom_require>:29:in `require': no such f= ile to
load -- micro-optparse (LoadError)
=A0 =A0 =A0 =A0 from <internal:lib/rubygems/custom_require>:29:in `re= quire'
=A0 =A0 =A0 =A0 from /home/sjalloq/bin/checkout:3:in `<main>'


The gem was installed using 'gem install ...' and I can list the ge= m:

$ gem list mic

*** LOCAL GEMS ***

micro-optparse (1.1.5)


If I set RUBYLIB to point to the gem installation then it loads but I
thought RUBYLIB was only needed for non-standard installs.

Is my understanding of installing gems correct and if so how do I debug
this further?

$ gem --version
1.3.7

$ ruby --version
ruby 1.9.2p136 (2010-12-25) [x86_64-linux]

Thanks, Shareef.

--
Posted via http://= www.ruby-forum.com/.


It's a little hard to say, bu= t:

1. That's a damn old version of rubygems. T= ry executing gem update to update to the latest sources and whatnot.
2. If gem can find a package, and ruby cannot find a package, then gem= is probably not using the version of ruby you think it is.=A0
3.= Check the paths that gem is searching through (gem env) and the paths that= ruby is searching through (ruby -e "puts $:") and see what's= different.




--e89a8ff25616910a7504c77641e9--