[rspec-users] Edge RSpec on Rails...what did I forget?

Pat Maddox pergesu at gmail.com
Wed Dec 20 11:32:31 EST 2006


On 12/20/06, Pat Maddox <pergesu at gmail.com> wrote:
> On 12/20/06, Pat Maddox <pergesu at gmail.com> wrote:
> > On 12/20/06, David Chelimsky <dchelimsky at gmail.com> wrote:
> > > On 12/20/06, Pat Maddox <pergesu at gmail.com> wrote:
> > > > Started a new Rails project, and installed RSpec and the Rails plugin
> > > > vendor/plugins/rspec (svn://rubyforge.org/var/svn/rspec/trunk/rspec) - 1332
> > > > vendor/plugins/rspec_on_rails
> > > > (svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/vendor/plugins/rspec_on_rails)
> > > > - 1332
> > > >
> > > > Generated the rspec file, created a model...the spec runs fine if I do
> > > > ruby spec/models/foo_spec.rb.  Running rake though gives me the
> > > >
> > > > Your RSpec on Rails plugin is incompatible with your installed RSpec.
> > > >
> > > > RSpec          : 0.7.5 (r1330)
> > > > RSpec on Rails : r1332
> > > >
> > > > error.  So apparently it's looking at the gem rspec instead of the one
> > > > I installed in my plugins folder.  I've got an existing Rails app that
> > > > uses edge RSpec, so I updated it to see if it broke, but it runs fine.
> > > >  I'm really really confused, I can't tell what the difference is.
> > > > Both apps are at the same revision, there's nothing special about the
> > > > config, but the old app works fine and the brand new one doesn't.
> > >
> > > The only diff would be in ~/spec/spec_helper.rb. Any differences in there?
> >
> > It's something to do with Rails...my old app didn't have the very
> > latest edge.  r5734 works fine, and the latest doesn't.  I'm gonna
> > step through the revisions to find out just what broke RSpec.
> >
> > Pat
> >
>
> Okay, Rails edge r5738 breaks it.  The changeset is at
> http://dev.rubyonrails.org/changeset/5720
>
> You can't replicate it in the demo app because of how the app loads
> everything (I guess).  The demo app doesn't break at all, but if
> you've just installed rspec as a plugin and the Rails plugin then it
> breaks at 5738.
>
> Pat
>

Sorry, changeset should be http://dev.rubyonrails.org/changeset/5738

The problem is that initializer.rb is no longer calling

paths.concat Dir["#{root_path}/vendor/plugins/*/lib/"]

in the default_load_paths method.

I've tried adding

config.load_paths += %W( #{RAILS_ROOT}/vendor/plugins/rspec/lib
#{RAILS_ROOT}/vendor/plugins/rspec_on_rails/lib )

to the config block in environment.rb but it's not doing anything.

So I haven't been able to fix it, but at least we have a place to look.

Pat


More information about the rspec-users mailing list