RVM和Jenkins设置
我是Jenkins CI的新手。我在远程Jenkins中以及在shell下执行时安装RVM。
#!/bin/bash -xsource ~/.bashrc
rvm use 1.9.3@rails-3.2.3
我收到以下错误。
+ 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 1.9.3@rails-3.2.3
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 -xsource /home/zeck/.bashrc
[[ -s ".rvmrc" ]] && source .rvmrc
export RAILS_ENV=test
bundle install
错误:
/tmp/hudson457106939700368111.sh: line 5: bundle: command not foundBuild step 'Execute shell' marked build as failure
Finished: FAILURE
Jenkins构建外壳无法检测RVM,gemset和gem。我该怎么办?
因此詹金斯无法检测到红宝石。
+ ruby -v/tmp/hudson2505951775163045158.sh: line 5: ruby: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILUR
我没有使用任何jenkins插件,而只是从Build-> Execute shell部分运行脚本。
回答:
尝试:
. $(/home/RVM_USER/.rvm/bin/rvm env 1.9.3@rails-3.2.3 --path)
确保您运行稳定的RVM:
rvm get stable
注意:最后的詹金斯版本并不总是接受“源”,而是“。”。 RVM_USER是安装RVM的用户。或者,您也可以在主PATH中导出RVM命令。
以上是 RVM和Jenkins设置 的全部内容, 来源链接: utcz.com/qa/409048.html