Can't alias context from irb_context

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?

Nobody? :frowning:

Sebastian W. wrote:

Nobody? :frowning:

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! :slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs