Hello there
I’m running a rails 2.3.5 project and I can’t run any rake tasks
My error is
no such file to load – spec/rake/spectask
Here’s a relevant snippet of gem list output
rails (2.3.5)
rake (0.8.7)
random_data (1.5.0)
RedCloth (4.2.2)
remarkable (3.1.13)
remarkable_activerecord (3.1.13)
remarkable_paperclip (0.6.3)
remarkable_rails (3.1.11)
rspec (2.0.0)
rspec-core (2.0.0)
rspec-expectations (2.0.0)
rspec-mocks (2.0.0)
rspec-rails (1.2.9)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3)
So I have rspec 2.0.0 installed.
What is strange is that if I’m using a system that also has rspec 1.3.0
this error goes away.
Has something changed in how you reference spec/rake/spectask in rspec
2.0.0, as compared to rspec 1.3.0?
Here’s the gemfile snippet if that is relevant.
group :test do
gem ‘ruby-debug’
gem ‘cucumber’, “0.4.4”
gem ‘cucumber-rails’
gem ‘rspec-rails’, ‘1.2.9’
gem ‘remarkable_rails’, ‘3.1.11’
gem ‘remarkable_paperclip’, ‘0.6.3’
gem ‘random_data’, ‘1.5.0’
gem ‘machinist’, ‘1.0.6’
gem ‘shoulda’, ‘2.10.2’
gem ‘faker’, ‘0.3.1’
gem ‘webrat’, ‘0.6.0’
end
Any help, greatly appreciated.
I’ve found a solution.
I upgraded rspec-rails to 1.3.3 in my gemfile, which in turn downgraded
rspec from 2.0 to 1.3.1 in the gem list. This configuration now works
ok. God knows what was happening there.
On Oct 13, 2010, at 6:30 AM, Matt D. wrote:
I’ve found a solution.
I upgraded rspec-rails to 1.3.3 in my gemfile, which in turn downgraded
rspec from 2.0 to 1.3.1 in the gem list. This configuration now works
ok. God knows what was happening there.
rspec-rails-1.3.2 depends on rspec >= 1.3.0, so if you have rspec-2
installed, it tries to load it.
rspec-rails-1.3.3 depends on rspec-1.3.1 explicitly.
Make sense?
Cheers,
David
Hi David
I understand what you’re saying, but the only thing I can think of(I’m
using bundler and there are no gems installed prior to running bundle
install) is that
gem ‘rspec-rails’, ‘1.2.9’
must depend on rspec >= 2.0
Otherwise I have no idea how rspec 2.0 was getting into the gem list
Matt
On Wed, Oct 13, 2010 at 8:30 AM, Matt D. [email protected]
wrote:
Hi David
I understand what you’re saying, but the only thing I can think of(I’m
using bundler and there are no gems installed prior to running bundle
install) is that
gem ‘rspec-rails’, ‘1.2.9’
must depend on rspec >= 2.0
It depends on rspec >= 1.2.9 (any version 1.2.9 and up). Bundler sees
that and installs the newest version of rspec, which in this case was
2.0.0.
Whereas, rspec-rails-1.3.3 depends on rspec = 1.3.1 (only 1.3.1), so
it installs a compatible version.
Future releases of rspec will use “pessimistic” version constraints
for its requirements (see
http://docs.rubygems.org/read/chapter/16#page74), so this shouldn’t be
a problem going forward.
Otherwise I have no idea how rspec 2.0 was getting into the gem list
Cheers,
David
p.s. Please be sure to quote relevant parts of the discussion to make
it easier for everyone to follow the conversation in a single message.