我是詹金斯CI的新手。我在远程Jenkins中安装RVM,并在shell下执行。RVM和Jenkins设置
#!/bin/bash -x
source ~/.bashrc
rvm use [email protected]
我得到以下错误。
+ source /var/lib/jenkins/.bashrc
++ PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/var/lib/jenkins/.rvm/bin:/var/lib/jenkins/.rvm/bin
+ rvm use [email protected]
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal settings to allow shell login.
Please visit https://rvm.io/workflow/screen/ for example.
这是什么意思?我没有任何想法。请帮帮我。
更新:我尝试下面的脚本,但我仍然得到错误:
#!/bin/bash -x
source /home/zeck/.bashrc
[[ -s ".rvmrc" ]] && source .rvmrc
export RAILS_ENV=test
bundle install
错误:
/tmp/hudson457106939700368111.sh: line 5: bundle: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
詹金斯打造外壳不能检测RVM,gemsets和宝石。我该怎么办?
更新2:因此jenkins无法检测红宝石。
+ ruby -v
/tmp/hudson2505951775163045158.sh: line 5: ruby: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILUR
我没有使用任何jenkins plugn,我只是从Build-> Execute shell部分运行脚本。
Zeck,我要疯了解决这个问题,你是如何解决它? – Farooq 2014-05-29 19:56:03