Travis build error: sass requires Ruby version >= 2.0.0
Travis build error: sass requires Ruby version >= 2.0.0
所以出于某种原因,我的 Travis 构建失败并出现以下错误:
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 .
```
我的travis.yml
文件如下:
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
```
我什至尝试指定一个大于 2 的 Ruby 版本,但 "sass requires Ruby version >= 2.0.0" 的错误仍然存在:
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
我有另一个项目有一个或多或少相同的 travis.yml 文件,所以我这辈子都弄不明白哪里出了问题。
使用 rvm 这样的包管理器安装 ruby 2.0 及更高版本。官方 ruby 存储库安装 v1.9,所以这就是您收到错误的原因。下面的命令可用于此。
rvm install 2.x
所以出于某种原因,我的 Travis 构建失败并出现以下错误:
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 .
```
我的travis.yml
文件如下:
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
```
我什至尝试指定一个大于 2 的 Ruby 版本,但 "sass requires Ruby version >= 2.0.0" 的错误仍然存在:
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
我有另一个项目有一个或多或少相同的 travis.yml 文件,所以我这辈子都弄不明白哪里出了问题。
使用 rvm 这样的包管理器安装 ruby 2.0 及更高版本。官方 ruby 存储库安装 v1.9,所以这就是您收到错误的原因。下面的命令可用于此。
rvm install 2.x