views:

68

answers:

3

I'm setting up a Linux development environment. After installing Ruby and RubyGems, I quickly found out that I need to require 'rubygems' in order to use gems, whereas I do not need to do this in Windows Vista. Is there anything I can do to fix this? Should I even be worrying about it?

+1  A: 

It's likely your windows version is just doing this automatically.

Here's a thread on requiring rubygems: http://www.rubyinside.com/why-using-require-rubygems-is-wrong-1478.html

Andres
+1  A: 

If you're using the one-click installer for Windows, I think it sets the RUBYOPTS environment variable to include the -rubygems switch. You should be able to do the same thing in Linux. There's more info here: http://docs.rubygems.org/read/chapter/3

fiirhok
+2  A: 

You probably want to include rubygems by default (especially since Ruby 1.9 does that by default now).

Edit your .bash_profile or equivalent and add export RUBYOPT=rubygems

Marc-André Lafortune