Ruby 1.8.7 automatically loads RubyGems?

Does Ruby 1.8.7 automatically load gems? I took -rubygems out of my
RUBYOPT, and discovered my gems were still getting loaded. Is that
true?

$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

T.

Does Ruby 1.8.7 automatically load gems? I took -rubygems out of my
RUBYOPT, and discovered my gems were still getting loaded. Is that
true?

$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

ruby -v -rubygems -e 'require "rush"'

ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]

ruby -v -e 'require "rush"'

ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
-e:1:in `require': no such file to load -- rush (LoadError)
  from -e:1

···

On Tue, Aug 25, 2009 at 2:33 PM, Intransition<transfire@gmail.com> wrote:

Did you remember to do that in an active shell (with the command "unset
RUBYOPT") or did you do it in your .profile (or .bash_profile or .bashrc)
and expect it to take effect immediately? If you edit your .profile, it
doesn't take effect immediately -- you need to log out and log back in.
If you edit your .bashrc, you need to open a new shell (and .bashrc is
the wrong place for environment variables anyway).

···

On Wed, 26 Aug 2009 03:33:35 +0900, Intransition wrote:

Does Ruby 1.8.7 automatically load gems? I took -rubygems out of my
RUBYOPT, and discovered my gems were still getting loaded. Is that true?

$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

T.

--
Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/

> Does Ruby 1.8.7 automatically load gems? I took -rubygems out of my
> RUBYOPT, and discovered my gems were still getting loaded. Is that true?

> $ ruby -v
> ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

> T.

Did you remember to do that in an active shell (with the command "unset
RUBYOPT") or did you do it in your .profile (or .bash_profile or .bashrc)
and expect it to take effect immediately? If you edit your .profile, it
doesn't take effect immediately -- you need to log out and log back in.
If you edit your .bashrc, you need to open a new shell (and .bashrc is
the wrong place for environment variables anyway).

$ sudo gem install facets
Successfully installed facets-2.7.0
1 gem installed
Installing ri documentation for facets-2.7.0...
Updating ri class cache with 4818 classes...
Installing RDoc documentation for facets-2.7.0...
$ unset RUBYOPT
$ irb

ENV['RUBYOPT']

=> nil

require 'facets'

=> true

$LOAD_PATH

=> ["/usr/lib/ruby/gems/1.8/gems/wirble-0.1.2/bin", "/usr/lib/ruby/
gems/1.8/gems/wirble-0.1.2/.", "/usr/local/lib/site_ruby/1.8", "/usr/
local/lib/site_ruby/1.8/x86_64-linux", "/usr/local/lib/site_ruby", "/
usr/lib/ruby/vendor_ruby/1.8", "/usr/lib/ruby/vendor_ruby/1.8/x86_64-
linux", "/usr/lib/ruby/vendor_ruby", "/usr/lib/ruby/1.8", "/usr/lib/
ruby/1.8/x86_64-linux", "."]

$LOAD_PATH.map do |lp|

?> Dir[File.join(lp, 'facets')]

end

=> [, , , , , , , , , , ]

Gem

=> Gem

It is clearly coming from Gem, but not via RUBYOPT.

Is there another way for RubyGems to get loaded automatically?

···

On Aug 26, 9:08 am, Ken Bloom <kbl...@gmail.com> wrote:

On Wed, 26 Aug 2009 03:33:35 +0900, Intransition wrote:

irbrc?

~ j.

···

On Aug 26, 2009, at 2:47 PM, Trans wrote:

On Aug 26, 9:08 am, Ken Bloom <kbl...@gmail.com> wrote:

On Wed, 26 Aug 2009 03:33:35 +0900, Intransition wrote:

Does Ruby 1.8.7 automatically load gems? I took -rubygems out of my
RUBYOPT, and discovered my gems were still getting loaded. Is that true?

$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

T.

Did you remember to do that in an active shell (with the command "unset
RUBYOPT") or did you do it in your .profile (or .bash_profile or .bashrc)
and expect it to take effect immediately? If you edit your .profile, it
doesn't take effect immediately -- you need to log out and log back in.
If you edit your .bashrc, you need to open a new shell (and .bashrc is
the wrong place for environment variables anyway).

$ sudo gem install facets
Successfully installed facets-2.7.0
1 gem installed
Installing ri documentation for facets-2.7.0...
Updating ri class cache with 4818 classes...
Installing RDoc documentation for facets-2.7.0...
$ unset RUBYOPT
$ irb

ENV['RUBYOPT']

=> nil

require 'facets'

=> true

$LOAD_PATH

=> ["/usr/lib/ruby/gems/1.8/gems/wirble-0.1.2/bin", "/usr/lib/ruby/
gems/1.8/gems/wirble-0.1.2/.", "/usr/local/lib/site_ruby/1.8", "/usr/
local/lib/site_ruby/1.8/x86_64-linux", "/usr/local/lib/site_ruby", "/
usr/lib/ruby/vendor_ruby/1.8", "/usr/lib/ruby/vendor_ruby/1.8/x86_64-
linux", "/usr/lib/ruby/vendor_ruby", "/usr/lib/ruby/1.8", "/usr/lib/
ruby/1.8/x86_64-linux", "."]

$LOAD_PATH.map do |lp|

?> Dir[File.join(lp, 'facets')]

end

=> [, , , , , , , , , , ]

Gem

=> Gem

It is clearly coming from Gem, but not via RUBYOPT.

Is there another way for RubyGems to get loaded automatically?

Damn you Wirble !!!

Yes, .irbrc was the source. Thank you. (In hindsight I should have
tried 'ruby -rfacets'. That would have made it obvious. Oh well.)

On the upside, I upgraded Wirble, and while I was at it, hacked it a
bit to make it better.

Thanks for the help, guys.

···

On Aug 26, 6:32 pm, John Barnette <jbarne...@gmail.com> wrote:

irbrc?

What did you do? Share! =)

···

On Thu, 27 Aug 2009 12:39:34 +0900 Trans <transfire@gmail.com> wrote:

On the upside, I upgraded Wirble, and while I was at it, hacked it a
bit to make it better.

--
http://spiralofhope.com

in #save_history changed:

lines = Readline::HISTORY.to_a.uniq

to

lines = Readline::HISTORY.to_a.reverse.uniq.reverse

so that the most recent lines remain.

And for now I also got rid of the use of yellow, since I can't see it
on a white background.

Is there a conical repository? I would like to fork it and do a little
more work besides, maybe add some extra options.

T.

···

On Aug 27, 10:42 am, spiralofhope <spiralofh...@lavabit.com> wrote:

On Thu, 27 Aug 2009 12:39:34 +0900 > > Trans <transf...@gmail.com> wrote:
> On the upside, I upgraded Wirble, and while I was at it, hacked it a
> bit to make it better.

What did you do? Share! =)

--http://spiralofhope.com