Problem with gem, after upgrading to 1.3.1 on linux (ubuntu 8.04)

Discussion in 'Ruby' started by Pablo Q., Jan 2, 2009.

  1. Pablo Q.

    Pablo Q. Guest

    [Note: parts of this message were removed to make it a legal post.]

    Ruby doesn't see my installed gems after upgrading to 1.3.1

    Please help!!

    ~# ruby -v
    ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]

    ~# gem -v
    1.3.1

    ~# gem env
    RubyGems Environment:
    - RUBYGEMS VERSION: 1.3.1
    - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
    - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
    - RUBY EXECUTABLE: /usr/local/bin/ruby
    - EXECUTABLE DIRECTORY: /usr/local/bin
    - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
    - GEM PATHS:
    - /usr/local/lib/ruby/gems/1.8
    - /root/.gem/ruby/1.8
    - GEM CONFIGURATION:
    - :update_sources => trueTahks
    - :verbose => true
    - :benchmark => false
    - :backtrace => false
    - :bulk_threshold => 1000
    - REMOTE SOURCES:
    - http://gems.rubyforge.org/

    ~# gem list

    *** LOCAL GEMS ***

    net-mdns (0.4)
    rubygems-update (1.3.1)

    I tried to run this test file (test.rb):
    #test.rb
    require 'rubygem'
    require 'net-mdns'

    ~#ruby test.rb
    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
    `gem_original_require': no such file to load -- net-mdns (LoadError)
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
    `require'
    from test.rb:2

    I don't know what to do... I have built the ruby and gem from the source but
    I don't know how to uninstall it... make file doesn't have uninstall option

    Please help I really don't how to solve this.

    Thanks

    --
    Pablo Q.
     
    Pablo Q., Jan 2, 2009
    #1
    1. Advertising

  2. Pablo Q.

    Tom Cloyd Guest

    Re: Problem with gem, after upgrading to 1.3.1 on linux (ubuntu8.04)

    Pablo Q. wrote:
    > Ruby doesn't see my installed gems after upgrading to 1.3.1
    >
    > Please help!!
    >
    > ~# ruby -v
    > ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
    >
    > ~# gem -v
    > 1.3.1
    >
    > ~# gem env
    > RubyGems Environment:
    > - RUBYGEMS VERSION: 1.3.1
    > - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
    > - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
    > - RUBY EXECUTABLE: /usr/local/bin/ruby
    > - EXECUTABLE DIRECTORY: /usr/local/bin
    > - RUBYGEMS PLATFORMS:
    > - ruby
    > - x86-linux
    > - GEM PATHS:
    > - /usr/local/lib/ruby/gems/1.8
    > - /root/.gem/ruby/1.8
    > - GEM CONFIGURATION:
    > - :update_sources => trueTahks
    > - :verbose => true
    > - :benchmark => false
    > - :backtrace => false
    > - :bulk_threshold => 1000
    > - REMOTE SOURCES:
    > - http://gems.rubyforge.org/
    >
    > ~# gem list
    >
    > *** LOCAL GEMS ***
    >
    > net-mdns (0.4)
    > rubygems-update (1.3.1)
    >
    > I tried to run this test file (test.rb):
    > #test.rb
    > require 'rubygem'
    >

    TRY:
    require 'rubygems'

    easy mistake to make - I've done it!
    > require 'net-mdns'
    >
    > ~#ruby test.rb
    > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
    > `gem_original_require': no such file to load -- net-mdns (LoadError)
    > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
    > `require'
    > from test.rb:2
    >
    > I don't know what to do... I have built the ruby and gem from the source but
    > I don't know how to uninstall it... make file doesn't have uninstall option
    >
    > Please help I really don't how to solve this.
    >
    > Thanks
    >
    >



    --

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
    Bellingham, Washington, U.S.A: (360) 920-1226
    << >> (email)
    << TomCloyd.com >> (website)
    << sleightmind.wordpress.com >> (mental health weblog)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    Tom Cloyd, Jan 2, 2009
    #2
    1. Advertising

  3. Re: Problem with gem, after upgrading to 1.3.1 on linux (ubuntu8.04)

    This appears to be the same problem I reported in another thread.

    After updating to rubygems 1.3.1 all installed gems seem to have
    disappeared.

    As far as I can tell, the problem is the installation directory.

    Look at the gem env output and notice this line:

    - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8

    Now, if you have the same problem that I do, there should be NO gems in
    this directory. All of your gems should be found in:

    /var/lib/gems/1.8/gems/

    Thus, it seems that rubygems 1.3.1 somehow changes the installation
    directory and looses track of where your gems really are.

    You agree?
    Is changing rubygem's installation directory an easy thing to do?

    Thanks!
    Giuseppe
    --
    Posted via http://www.ruby-forum.com/.
     
    Giuseppe Bertini, Jan 2, 2009
    #3
  4. Re: Problem with gem, after upgrading to 1.3.1 on linux (ubuntu8.04)

    Based on this page: http://www.rubygems.org/read/chapter/3, I did:

    $ export GEM_HOME=/var/lib/gems/1.8
    $ gem env

    and now rubygems sees all gems.
    I'm not a linux guru, though, so I don't know if this is the right way
    to go. For one thing, I'm pretty sure that this environment variable
    will be lost, should I need to reboot the machine.

    --Giuseppe
    --
    Posted via http://www.ruby-forum.com/.
     
    Giuseppe Bertini, Jan 2, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. levander
    Replies:
    5
    Views:
    523
    Patricia J. Hawkins
    May 8, 2007
  2. SPE - Stani's Python Editor
    Replies:
    1
    Views:
    474
    SPE - Stani's Python Editor
    Apr 29, 2008
  3. Sam Kong
    Replies:
    3
    Views:
    115
    Joe Van Dyk
    May 22, 2006
  4. Austin 7873
    Replies:
    5
    Views:
    216
    Eric Hodel
    Jan 27, 2007
  5. Jp Jp
    Replies:
    4
    Views:
    154
    Jp Jp
    Dec 28, 2007
Loading...

Share This Page