Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Travis-CI Node.js Defaulting to Ruby Build? No RakeFile found

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"
like image 915
Olivercodes Avatar asked Aug 18 '15 06:08

Olivercodes


2 Answers

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).

like image 96
Olivercodes Avatar answered Oct 21 '22 22:10

Olivercodes


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.

like image 1
vagdevi k Avatar answered Oct 22 '22 00:10

vagdevi k