This project is archived and is in readonly mode.

#2682 ✓invalid
Chris Roos

Vendorised gems (e.g. rspec-rails) not recognised as being installed

Reported by Chris Roos | May 20th, 2009 @ 03:08 PM | in 2.x

I've got rspec and rspec-rails unpacked in vendor/gems and the dependencies defined in environments/test.rb (as specified here[1]). I checked out my project to a machine that doesn't have gems installed and tried to run the rake test tasks. The result was a warning that rspec-rails wasn't installed.

$ rake spec
...
Missing these required gems:
  rspec-rails  = 1.2.0

It took a while but I managed to work that this was because rspec-rails depends upon rack and rack wasn't installed. It took so long because the Gem::LoadError exception (raised because rack was missing) is swallowed within Rails::GemDependency#add_load_paths.

The attached patch amends an existing test that exposes this behaviour and implements a very lightweight fix in the form of a warning. With the patch applied, the output looks something like this.

$ rake spec
*** WARNING: Missing dependency 'rack' (>= 0.4.0) required by 'rspec-rails'
Missing these required gems:
  rspec-rails  = 1.2.0

[1] http://wiki.github.com/dchelimsky/rspec/configgem-for-rails

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages