I have a Rakefile that looks like this:
require 'rspec/core/rake_task'
desc "Run all RSpec tests"
RSpec::Core::RakeTask.new(:spec)
This isn't working though. For example, if I try to run "rake -T", I get:
code/projects/bellybuster[master]% rake -T --trace
(in /Users/craig/code/projects/bellybuster)
rake aborted!
no such file to load -- rspec/core/rake_task
/Users/craig/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/craig/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/craig/code/projects/bellybuster/Rakefile:1:in `<top (required)>'
/Users/craig/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
Any thoughts?
In case it might be helpful here's the Gemfile:
source :rubygems
gemspec
Oh and some versions:
The syntax looks fine to me. Are you 100% sure you have rspec 2
installed? Does it appear with gem which rspec
? Maybe you forgot to run bundle install
or you don't list rspec
in the .gemspec
file as a (development) dependency?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With