7

I'm posting this as a reference to others who have had the same problem.

$ rake
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `eval'
/home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
The command "rake" exited with 1.

The above is output when building a Node.JS project on Travis-CI. The .travis.yml file is valid:

language: node_js
node_js:
  - "0.12"
Olivercodes
  • 1,048
  • 5
  • 17

2 Answers2

9

Fix the .travis.yml by removing the quotations on the versioning, as follows:

language: node_js
node_js:
  - 0.12

The Travis Node.JS docs currently display with quotation marks. This appears to be incorrect.

http://docs.travis-ci.com/user/languages/javascript-with-nodejs/

If others can test to verify, please comment below.

EDIT: It's likely a temporary issue, as there are other examples of .travis.yml files with quotes on the version number (if it's nested in an include).

Olivercodes
  • 1,048
  • 5
  • 17
  • I'm assuming it's a temporary issue, as http://lint.travis-ci.org/ is validating the with quotes format is valid. And there are plenty of examples of nested versioning (such as in an include: ) that has quotes on the version numbers. – Olivercodes Aug 18 '15 at 06:40
  • I read the docs on this in today and also saw [the version specified with quotes](https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#default-build-script), I figured it may be due to some YAML weirdness so decided to follow suit... seems like a whopping 3+ years later quoted strings still aren't properly handled. [This](https://travis-ci.org/SidOfc/babel-plugin-transform-media-imports/builds/569962190) is a failing build using quoted strings. Retried without and node is [detected correctly](https://travis-ci.org/SidOfc/babel-plugin-transform-media-imports/builds/569970465). – SidOfc Aug 09 '19 at 19:05
1

I got the same error saying

$ rake
rake aborted!

In my case, I am using .travis.yaml file to push images to DockerHub and to deploy my app onto GCP from a local machine. So basically, I have commands related to docker and GCP SDK. Thus, I don't need any specific language.

So, I fixed the error by adding the

language: generic

line on the top of the .travis.yaml file.

vagdevi k
  • 1,478
  • 9
  • 25