Jenkins构建失败,找不到gem:command

时间:2014-07-09 08:47:53

标签: jenkins continuous-integration

我正在尝试设置jenkins,但它一直在execute shell部分失败。

我收到以下错误:

/tmp/hudson1424221209017954242.sh: line 8: gem: command not found
/tmp/hudson1424221209017954242.sh: line 9: bundle: command not found
/tmp/hudson1424221209017954242.sh: line 12: bundle: command not found

我在全局设置了rvm(位于/ usr / local / rvm /)。存储jenkins的用户jenkins可以通过ssh运行bundle。

这是execute shell命令:

#!/bin/bash
source /var/lib/jenkins/.bashrc
# enter application root
cd /var/lib/jenkins/jobs/topboard/workspace
# install missing gems
rvm use 2.1.2@gemset --create
# set env vars
gem install bundler
bundle install
export RAILS_ENV=test
# invoke rake
bundle exec rake db:create db:migrate ci:setup:rspec

谢谢!

0 个答案:

没有答案