[rspec-users] [RSpec] Setting a gem dep on rspec-rails

Nick Hoffman nick at deadorange.com
Sat Feb 7 12:30:14 EST 2009

For a while now, I've had the following in config/environment.rb :

config.gem 'haml'
config.gem 'rspec', :lib => 'spec'
config.gem 'rspec-rails', :lib => 'spec/rails'

I just tried running the Rails console in production mode, and this  
warning occured:

irb: warn: can't alias context from irb_context.

After some googling, I learned that the gem deps on rspec and rspec- 
rails are causing that warning. When I remove those two gem deps from  
environment.rb , the warning disappears.

With that said, I'm wondering what the accepted way to setup gem  
dependencies on rspec and rspec-rails is. Should one not bother?  
Should the "config.gem" lines go in config/environments/test.rb ?


More information about the rspec-users mailing list