gem install does not work correctly with sudo

Bug #202446 reported by Wolfgang Silbermayr
2
Affects Status Importance Assigned to Milestone
gems (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gems

When I try to use gem directly with sudo, I get the following output:

silwol@silwol-laptop:~$ sudo gem install fhlow
[sudo] password for silwol:
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Gem::GemNotFoundException)
    Could not find fhlow (> 0) in any repository
silwol@silwol-laptop:~$

When I call it with a sudo'ed environment, it works:

silwol@silwol-laptop:~$ sudo -s
root@silwol-laptop:~# gem install fhlow
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed fhlow-1.91.0
root@silwol-laptop:~#

I don't know where the error lies, but in my opinion this should work from within sudo directly, because this is the usual way many people execute commands as root.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 or 9.04?

Changed in gems:
status: New → Incomplete
Revision history for this message
Wolfgang Silbermayr (silwol) wrote :

The problem no longer occurs. the gem installation works as intended.

Changed in gems:
status: Incomplete → Fix Released
Revision history for this message
Wolfgang Silbermayr (silwol) wrote :

The problem no longer occurs. the gem installation works as intended in 8.10.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.