I've tried many things, but have ultimately failed to get the build for gulp-pipeline-rails running. The script
runs locally, no problem.
The last problem I've narrowed down is that I have a ruby
language project that utilizes node, but I need node 5. I found 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
While this seems to get node updated, it does something to my ruby env where it 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.
Question
With all that said, how do I simply use Node 5 with this .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
Travis CI is a Continuous Integration service used to build and test software projects hosted at GitHub. Or in simple terms, when you push a commit to the master branch of your project hosted at GitHub, Travis CI will run tests and build the latest commit of your master branch. It's that simple.
3) To set up a build environment and prepare the build, Travis CI's system fetches and processes the . travis. yml config file from the repository and the branch explicitly specified in the build request, triggered by GitHub.
Try using a before_install
stage for adding a second language on Travis, maybe something like:
before_install:
- nvm install node
nvm
should be installed by default on the Travis build image (depending on which one you're using), and this command will install the latest version of Node.
After that, maybe just have npm install -g [email protected]
as the first step in your before_script
stage (i.e. don't worry about updating npm), hopefully that should mean that bundler still runs fine and installs all your gems.
I found this article that helped me out quite a bit.
Relevant information from article:
You can use nvm
to manage you node versions in travis, however you have to enable it first:
install:
- . $HOME/.nvm/nvm.sh
- nvm install stable
- nvm use stable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With