Gems located in 2 directories

I recently updated my gems and gem command with:

sudo gem update --system && gem update

gem list showed no local gems

I installed a new gem gem list showed just the newly installed gem.

My apps work fine (as far as I can tell).

gem env

  - GEM PATHS:      - /usr/lib64/ruby/gems/1.8      - /home/username/.gem/ruby/1.8

/usr/lib64/ruby/gems/1.8/gems 2 gems listed

/home/mikej1968/.gem/ruby/1.8/gems 0 gems listed I think this folder is created when I used install gem instead of SUDO install gem (?)

My gems are in: /usr/lib/ruby/gems/1.8/gems

Other info: which ruby /usr/bin/ruby which gem /usr/bin/gem

What is the best way to keep everything running smoothly and to be able to list gems?

Many thanks,

Mike

I recently updated my gems and gem command with:

sudo gem update --system && gem update

gem list

showed no local gems

I installed a new gem

gem list showed just the newly installed gem.

My apps work fine (as far as I can tell).

gem env

  • GEM PATHS:

    • /usr/lib64/ruby/gems/1.8

    • /home/username/.gem/ruby/1.8

/usr/lib64/ruby/gems/1.8/gems

2 gems listed

/home/mikej1968/.gem/ruby/1.8/gems

0 gems listed

I think this folder is created when I used install gem instead of SUDO

install gem (?)

My gems are in:

/usr/lib/ruby/gems/1.8/gems

Other info:

which ruby

/usr/bin/ruby

which gem

/usr/bin/gem

What is the best way to keep everything running smoothly and to be

able to list gems?

Many thanks,

Mike

Mike, I would recommend installing all gems to a single location. When

I use Ruby Version Manager (RVM), I tend to use the following:

gem install

When I install gems for the system version of Ruby, I tend to use the

following:

sudo gem install

In short, one needs to be consistent in your installation practice.

Good luck,

-Conrad

Thanks for the reply. I have always installed gems with

sudo gem install <gem-name>

except on the odd occasion when I forgot the sudo.

The problem is that they are now going to a different location.

Mike

Thanks for the reply. I have always installed gems with

sudo gem install

except on the odd occasion when I forgot the sudo.

The problem is that they are now going to a different location.

Mike

Mike, which OS are you using? Also, do you have several

installs of the gem command?

-Conrad

Really appreciate the help here.

Fedora release 11 (Leonidas)

Looks like I may have 2 versions of gem command:

/usr/bin/gem /usr/lib/ruby/gems/1.8/gems/rubygems-update-1.3.5/bin/gem

gem -v 1.3.5

Looks like the recent update to 1.3.5 went to another directory. Not sure why - hope this provides a clue,

more thanks,

Mike