我是 Jenkins CI 的新手。我在远程 Jenkins 中安装 RVM,当我在 shell 下执行时。
#!/bin/bash -x
source ~/.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 -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
Jenkins 构建 shell 无法检测 RVM、gemsets 和 gems。我应该怎么办?
更新2:因此詹金斯无法检测到红宝石。
+ 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 部分运行脚本。