ESR
ESR

Reputation: 1679

Travis build error: sass requires Ruby version >= 2.0.0

So for some reason my Travis build is failed with the following error:

10.33s$ gem install sass
Fetching: rb-fsevent-0.10.2.gem (100%)
Successfully installed rb-fsevent-0.10.2
Fetching: ffi-1.9.18.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.18
Fetching: rb-inotify-0.9.10.gem (100%)
Successfully installed rb-inotify-0.9.10
Fetching: sass-listen-4.0.0.gem (100%)
Successfully installed sass-listen-4.0.0
Fetching: sass-3.5.1.gem (100%)
ERROR:  Error installing sass:
    sass requires Ruby version >= 2.0.0.
The command "gem install sass" failed and exited with 1 during .

```

My travis.yml file is as follows:

language: node_js
node_js:
    - 6
before_install:
    - gem install sass
    - gem install scss-lint
    - npm install -g grunt-cli 
install: 
    - npm install
before_script: 
    - grunt theme

```

I even tried specifying a Ruby version greater than 2, but the error of "sass requires Ruby version >= 2.0.0" still persists:

language: node_js
node_js:
    - 6
before_install:
    - gem update --system 2.1.11
    - gem --version
    - gem install sass
    - gem install scss-lint
    - npm install -g grunt-cli 
 install: 
    - npm install
before_script: 
    - grunt theme

I have another project with a more or less identical travis.yml file so can't for the life of me figure out what's wrong.

Upvotes: 1

Views: 1755

Answers (1)

Arpit Solanki
Arpit Solanki

Reputation: 9931

Use a package manager like rvm to install ruby 2.0 and higher. Official ruby repositories installs v1.9 so that's why you are getting the error. The command below can be used for this.

rvm install 2.x

Upvotes: 2

Related Questions