Robert D. wrote:
On Mon, May 11, 2009 at 11:21 AM, Brian C. [email protected]
How did you install RubyGems? If it came from an O/S package then maybe
its post-install script did it for you.
BTW, Ubuntu didn’t do this for me - I had to sort out my own path to
get /var/lib/gems/1.8/bin in there.
Posted via http://www.ruby-forum.com/.
I reread the OP again and again, because it is obvious (to me now)
that Eric and you assume that OP did just install Rubygems. He did not
say so. I still have this strange feeling that some gem did this to
him. Maybe one he was writing himself?
He didn’t say he’d only just installed RubyGems, but he did say that
he’d only just noticed this extension to his PATH in .bashrc. The fact
that he’d only just noticed it doesn’t necessarily mean that it hasn’t
been there all the time since he installed RubyGems.
How about “ls -l .bashrc” to see when it was last changed? (Not valid if
he’s been editing it manually of course)
Now, if he had installed RubyGems via the system’s package management
system, then I agree it could have touched /etc/bashrc but would be very
unlikely to touch ~/.bashrc in everyone’s home directory.
Check in /etc/skel/.bashrc to see if this has been set as a global
default for new accounts?
If a nefarious gem is suspected of making this change, then he can
probably find it using a variant of
grep -R bashrc /usr/lib/ruby/gems/1.8
assuming it’s still installed. However I hope that a gem author would
not do something so obviously dangerous and tied to a specific