Forum: Ruby can't alias context from irb_context.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3da512875f3295be2d577fa70b3493b4?d=identicon&s=25 Sebastian W. (globulus)
on 2009-01-14 18:17
Dear ruby-talk,
I'm trying to write a friendly script that opens up an IRB session after
loading some classes and making a few instance variables for fun and
profit.

My script looks roughly like this:

#!/usr/bin/ruby
$LOAD_PATH.unshift("#{File.dirname(File.expand_path(__FILE__))}/lib")
require "irb"
# require a few gems here here...
include MyMixin

@browser = Selenium::SeleniumDriver.new("localhost", 4444, "*chrome",
http://", 300000)

@browser.start

IRB.start(__FILE__)

END {
  @browser.stop
}

So, I run my script, everything works as I'm expecting. But, IRB gives
me the following warning message: "irb: warn: can't alias context from
irb_context."

Is this something I should worry about? What do I fix to make it go
away?
3da512875f3295be2d577fa70b3493b4?d=identicon&s=25 Sebastian W. (globulus)
on 2009-01-14 20:17
Nobody? :(
3da512875f3295be2d577fa70b3493b4?d=identicon&s=25 Sebastian W. (globulus)
on 2009-01-15 00:32
Sebastian W. wrote:
> Nobody? :(

Ah okay, figured it out. I was requiring RSpec when I didn't really need
it, and that made IRB unhappy. Taking out the require "rspec" made the
warning go away.

Hopefully this will help someone someday! :)
This topic is locked and can not be replied to.