Update on 5th April 2009:
This rspec-rails gem issue has been fixed and released in rspec-rails milestone “1.2.0”. see details here
If you are still working on Rspec before version 1.20:
After googling, I counld't find much information about including rspec-rails in the ruby gems config/environment.rb. The only reason I include it in gem dependency is for the sake of continuous integration, to make sure the build platform happy and green.
So, back to the topic. This was related to rspec bug #577 (still an open ticket), if placing the congif gem in this order:
you will likely to get errors:
The ways to get your head around the bug is placing the rspec-rails before the rspc:
Alternatively, only include rspec-rails would install rspec by default.