This project is archived and is in readonly mode.

#2913 ✓invalid
Felipe Rodrigues

config.gem causes error in some gems

Reported by Felipe Rodrigues | July 15th, 2009 @ 11:21 PM | in 2.x

I'm using rails edge in a project (3.0-pre). When I try to use it with rspec it works fine.

If I add a config.gem

config.gem "rspec", :lib => false, :version => ">=1.2.6"

config.gem "rspec-rails", :lib => false, :version => ">=1.2.6"

then it starts to claim:

Missing these required gems:
rspec  >= 1.2.6
 rspec-rails  >= 1.2.6

You're running:
ruby at /usr/bin/ruby1.8
rubygems 1.3.4 at /home/felipe/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

Comments and changes to this ticket

  • Matt Jones

    Matt Jones July 16th, 2009 @ 04:08 PM

    I'd recommend you take a look at ticket #2682, which may be helpful.

    Also note that the 3-0-unstable branch isn't under active development (last commit February 2009) - edge is now on master, but given the fairly radical restructuring going on, might not be the best to run on.

  • Felipe Rodrigues

    Felipe Rodrigues July 16th, 2009 @ 04:38 PM

    I'm not using 3-0-unstable, I'm using the master branch. Well, I know it is not the most stable phase of edge, but I have some reasons to use that. One of them is contributing to rails, helping to identify points to make it more stable.

    Btw, thanks for pointing this ticket out, but I'm not sure it is the same problem, since in my case, there is no missing dependency. If I take config.gem out of my environments files, then rspec runs fine.

    Also, I just applied the patch attached to the indicated ticket and nothing changed.

  • Matt Jones

    Matt Jones July 21st, 2009 @ 12:47 AM

    How are rspec and rspec_rails installed? My guess would be they're in vendor/plugins, which means you don't need config.gem. Also, are those gems installed on your system?

    Sorry to be pedantic, but the symptoms here don't make a lot of sense.

  • Felipe Rodrigues

    Felipe Rodrigues July 21st, 2009 @ 03:23 PM

    Hi Matt,

    rspec and rspec_rails are installed. The problem is with Rails 3.0.pre initialization. It try to load the gems before load the gems paths. It will happen to any gem you try to load with config.gem().

    I patched it in my local version, but didn't submited because it is under change and because it didn't worked with cucumber.

    I tried to contact Yehuda + Carl, since this is their code to show my patch but never got an answer (they must be pretty busy out there).

    So my suggestion is to move it to 3.0 Milestone and wait until they finish the initialization part. I'd like to contribute more, but don't know where go to discuss that.

  • Felipe Rodrigues

    Felipe Rodrigues July 21st, 2009 @ 03:25 PM

    I should also say that there are no tests covering this issue right now and I could not figure out how to test the hard it. It will probably requires fake gems with and without runtime dependencies. If anyone can help me with this I could contribute on that. =)

  • Michael Koziarski

    Michael Koziarski August 3rd, 2009 @ 06:17 AM

    • Assigned user set to “Matt Jones”
  • Rizwan Reza

    Rizwan Reza January 18th, 2010 @ 01:39 PM

    • Tag changed from 3.0, autoload, bug, dependencies, gems to 3.0, autoload, bug, bugmash, dependencies, gems

    I don't think this is applicable anymore, since Rails 3 now uses Bundler.

  • Rizwan Reza

    Rizwan Reza January 20th, 2010 @ 10:31 AM

    • State changed from “new” to “invalid”

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=""></a>