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

**URL:** <https://www.ruby-forum.com/t/problem-with-gem-after-upgrading-to-1-3-1-on-linux-ubuntu-8-04/156729>\
**Category:** Ruby\
**Created:** [January 2, 2009, 1:02am UTC](https://www.ruby-forum.com/t/problem-with-gem-after-upgrading-to-1-3-1-on-linux-ubuntu-8-04/156729 "2009-01-02T01:02:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pabloq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Post date:** [January 2, 2009, 1:02am UTC](https://www.ruby-forum.com/t/problem-with-gem-after-upgrading-to-1-3-1-on-linux-ubuntu-8-04/156729/1 "2009-01-02T01:02:03Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![pabloq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Post date:** [January 2, 2009, 1:45am UTC](https://www.ruby-forum.com/t/problem-with-gem-after-upgrading-to-1-3-1-on-linux-ubuntu-8-04/156729/2 "2009-01-02T01:45:20Z")

</div>

Pablo Q. wrote:

> ~# gem env  
> - /usr/local/lib/ruby/gems/1.8  
> ~# 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!

> 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

–

```auto
Tom C., MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< removed_email_address@domain.invalid >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)

```

---

<div class="post-metadata">

**Author:** ![pabloq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Post date:** [January 2, 2009, 2:06am UTC](https://www.ruby-forum.com/t/problem-with-gem-after-upgrading-to-1-3-1-on-linux-ubuntu-8-04/156729/3 "2009-01-02T02:06:23Z")

</div>

Sorry, I wrote wrong the mail, test.rb is fine (require ‘rubygems’)…  
error  
is on line 2

2009/1/1 Tom C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![pabloq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Post date:** [January 2, 2009, 9:18am UTC](https://www.ruby-forum.com/t/problem-with-gem-after-upgrading-to-1-3-1-on-linux-ubuntu-8-04/156729/4 "2009-01-02T09:18:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pabloq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Post date:** [January 2, 2009, 9:27am UTC](https://www.ruby-forum.com/t/problem-with-gem-after-upgrading-to-1-3-1-on-linux-ubuntu-8-04/156729/5 "2009-01-02T09:27:07Z")

</div>

Based on this page: [http://www.rubygems.org/read/chapter/3](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

---

<div class="post-metadata">

**Author:** ![pabloq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Post date:** [January 2, 2009, 5:17pm UTC](https://www.ruby-forum.com/t/problem-with-gem-after-upgrading-to-1-3-1-on-linux-ubuntu-8-04/156729/6 "2009-01-02T17:17:58Z")

</div>

Thank you very much, now I know that It was due to this specific gem, I  
just  
change to the old version of ruby (the one that come with synaptic in  
Ubuntu) and I was able to see all my gems but I still having problems  
with  
this specific gem (net-mdns).

Does somebody knows why ‘net-mdns’ don’t work in linux (ubuntu 8.04)??

~# ruby -v  
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]

~# gem env  
RubyGems Environment:

- RUBYGEMS VERSION: 1.3.1
- RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
  - ruby
  - x86-linux

- GEM PATHS:
  - /usr/lib/ruby/gems/1.8
  - /root/.gem/ruby/1.8

- GEM CONFIGURATION:
  - :update\_sources =\> true
  - :verbose =\> true
  - :benchmark =\> false
  - :backtrace =\> false
  - :bulk\_threshold =\> 1000

- REMOTE SOURCES:
  - [http://gems.rubyforge.org/](http://gems.rubyforge.org/)

~# gem list

\*\*\* LOCAL GEMS \*\*\*

abstract (1.0.0)  
actionmailer (2.1.0)  
…  
net-mdns (0.4)  
net-scp (1.0.1)  
net-sftp (2.0.1)  
net-ssh (2.0.4)  
net-ssh-gateway (1.0.0)  
…  
twitter (0.3.7)

~# irb  
irb(main):001:0\> RUBY\_VERSION  
=\> “1.8.6”  
irb(main):002:0\> require ‘rubygems’  
=\> true  
irb(main):003:0\> require ‘twitter’  
=\> true  
irb(main):004:0\> require ‘net-mdns’  
MissingSourceFile: no such file to load – net-mdns  
from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’  
from  
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:509:in  
`require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new\_constants\_in’  
from  
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:509:in  
`require’  
from (irb):4  
irb(main):005:0\>

Thank you

2009/1/2 Giuseppe B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
