Vote count:
0
I have a rails 4.2.1 app which I test with rspec. And use travisCI for deployment and testing.
On travis the rake task used to give the basic 'no such file to load — rspec/core/rake_task'
To originally fix this issue I created a rake task in lib:
# lib\tasks\spec.rake
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
task :default => :spec
# require 'rspec/core/rake_task'
# RSpec::Core::RakeTask.new(:spec)
# task :default => :spec
# begin
# require 'rspec/core/rake_task'
# desc "Run all examples"
# RSpec::Core::RakeTask.new(:spec) do |t|
# t.rspec_opts = %w[--color]
# t.pattern = 'spec/*_spec.rb'
# end
# rescue LoadError
# end
The two commented out versions are one which a friend used and then the heroku suggested rake task.
When I run rake
locally my rspec tests run twice. I get twice the output.
Whenever I try and run a rake task on heroku I get a similar error:
LoadError: cannot load such file -- rspec/core/rake_task
Is there a full solution for this? I see a lot of 'install rake' answers.
asked 24 secs ago
Finally fixing the rake load error with rails 4.2 locally and with heroku
Aucun commentaire:
Enregistrer un commentaire