【发布时间】:2016-06-11 04:23:44
【问题描述】:
我尝试了很多方法,但最终未能让gulp-pipeline-rails 的构建运行。 script 在本地运行,没问题。
我缩小范围的最后一个问题是我有一个使用节点的ruby 语言项目,但I need node 5。我找到了one snippet:
#------------------------------
# Update the node version
env:
- TRAVIS_NODE_VERSION="5"
install:
- pwd
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
- npm install
虽然这似乎更新了节点,但它对我的 ruby 环境有一些作用,它在 fails to execute rspec:
$ pwd && bundle exec rake
/home/travis/build/alienfast/gulp-pipeline-rails
Could not find gem 'rspec' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.
问题
说了这么多,我如何简单地将节点 5 与这个 .travis.yml 一起使用?
language: ruby
rvm:
- 2.2.2
- ruby-head
matrix:
allow_failures:
- rvm: ruby-head
cache: bundler
#------------------------------
# Setup
before_script:
- node -v
# update npm
- npm install npm -g
# install Gulp 4 CLI tools globally from 4.0 GitHub branch
- npm install https://github.com/gulpjs/gulp-cli/tarball/4.0 -g
#------------------------------
# Build
script: bundle exec rake
【问题讨论】: