Travis-ci is building a rake cancellation failure! LoadError: Unable to load such file - rspec / core / rake_task
I am trying to add travis-ci to my project and it keeps failing with
rake aborted!
LoadError: cannot load such file -- rspec/core/rake_task
I am currently using rspec 3.1
Any ideas as to why this fails and how to fix it?
Here's my project not working: https://github.com/toymachiner62/readable_date_ranges/tree/tests
EDIT
Using worker: worker-linux-9-2.bb.travis-ci.org:travis-linux-4
system_info
Build system information
Build language: ruby
git.checkout
0.62s$ git clone --depth=50 --branch=master git://github.com/toymachiner62/readable_date_ranges.git toymachiner62/readable_date_ranges
Cloning into 'toymachiner62/readable_date_ranges'...
remote: Counting objects: 77, done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 77 (delta 28), reused 71 (delta 26)
Receiving objects: 100% (77/77), 13.73 KiB | 0 bytes/s, done.
Resolving deltas: 100% (28/28), done.
Checking connectivity... done.
$ cd toymachiner62/readable_date_ranges
$ git checkout -qf e78f9f7f350c2cfbb2ffb7751024a1bbb6ed732f
rvm
0.36s$ rvm use 1.9.3 --install --binary --fuzzy
Using /home/travis/.rvm/gems/ruby-1.9.3-p550
$ ruby --version
ruby 1.9.3p550 (2014-10-27 revision 48165) [x86_64-linux]
$ rvm --version
rvm 1.26.0 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
$ bundle --version
Bundler version 1.7.4
$ gem --version
2.4.2
0.82s$ rake
rake aborted!
LoadError: cannot load such file -- rspec/core/rake_task
/home/travis/build/toymachiner62/readable_date_ranges/Rakefile:2:in `<top (required)>'
/home/travis/.rvm/gems/ruby-1.9.3-p550/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-1.9.3-p550/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
The command "rake" exited with 1.
Done. Your build exited with 1.
source to share
The problem is with your repository, after checking you can see the differences:
Original clone repository:
git clone https://github.com/kevinkaske/readable_date_ranges.git kevinkaske_readable_date_ranges
Clone your own repository:
git clone https://github.com/toymachiner62/readable_date_ranges.git toymachiner62_readable_date_ranges
Now with the tree, you can see that some files are missing from your repo even though it is listed on github:
.
├── kevinkaske_readable_date_ranges
│ ├── GEMFILE
│ ├── lib
│ │ └── readable_date_ranges.rb
│ ├── LICENSE
│ ├── Rakefile
│ ├── readable_date_ranges.gemspec
│ ├── README.md
│ └── spec
│ ├── readable_date_ranges_spec.rb
│ └── spec_helper.rb
└── toymachiner62_readable_date_ranges
├── lib
│ └── readable_date_ranges.rb
├── LICENSE
├── readable_date_ranges.gemspec
└── README.md
So you don't have Rakefile
one that defines the rake and directory tasks spec
.
EDIT
Add this to your .travis.yaml
file:
# whitelist
branches:
only:
- test
Also try putting the Travis YAML config file on the master branch.
source to share