Gem list vs sudo -u apache gem list

can you reproduce this:

  1. gem install rubyXL
  2. gem list -> ruby XL is installed.
  3. sudo -u apache gem list -> rubyXL does not show up!

all other gems work fine and will show either with

gem list

or with

sudo -u apache gem list

This is very strange.

Tested with ruby-1.9.3, rubygems 2.3.0

Best
Zeno

Just to be clear: I did not install the gems using sudo.

This helped:

sudo chown -R apache:apache /usr/local/lib/ruby/gems/1.9.1
sudo -u apache /usr/local/bin/gem install rubyXL
sudo -u apache /usr/local/bin/gem content rubyXL

This is only about listing the gems, and the inconsistency that comes
with it.

Zeno D. wrote in post #1151791:

can you reproduce this:

  1. gem install rubyXL

sudo or not sudo:)

see
http://stackoverflow.com/questions/2119064/sudo-gem-install-or-gem-install-and-gem-locations

Ok, the simplest solution is to just install all the gems using “sudo”.
Then they will show up for all the other users as well.

#strangebuttrue.

Best
Zeno