Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 通过完整性连续集成使用RVM_Ruby_Bash_Continuous Integration_Rvm_Integrity - Fatal编程技术网

Ruby 通过完整性连续集成使用RVM

Ruby 通过完整性连续集成使用RVM,ruby,bash,continuous-integration,rvm,integrity,Ruby,Bash,Continuous Integration,Rvm,Integrity,我目前正在使用Integrity进行持续集成。CI服务器使用“integrity”gemset运行,但它应该启动和测试的应用程序(及其Rspec测试套件)设计为使用另一个名为“portal”的gemset运行 因此,我使用以下构建脚本: rvm use 1.9.2-p290@portal bundle exec rake spec 我得到的输出是 RVM is not a function, blah-blah-blah 基本上,它说的是rvm不是来源于一个未登录的外壳。没什么大不了的,让我

我目前正在使用Integrity进行持续集成。CI服务器使用“integrity”gemset运行,但它应该启动和测试的应用程序(及其Rspec测试套件)设计为使用另一个名为“portal”的gemset运行

因此,我使用以下构建脚本:

rvm use 1.9.2-p290@portal
bundle exec rake spec
我得到的输出是

RVM is not a function, blah-blah-blah
基本上,它说的是rvm不是来源于一个未登录的外壳。没什么大不了的,让我们将此添加到。bashrc:

if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
  # First try to load from a user install
  source "$HOME/.rvm/scripts/rvm"
酷,现在我启动的任何终端都可以调用rvm use命令,而无需哭泣寻求帮助。但integrity并不关心这一点,它仍然说rvm不是一种功能

如果我知道Integrity是如何调用系统命令的,那就见鬼了,但我在这里没有想法了


谢谢你的帮助

如果只是一个命令,则运行:

rvm 1.9.2-p290@portal do bundle exec rake spec
有关更多命令,请执行以下操作:

source $( rvm 1.9.2-p290@portal do rvm env --path )
bundle install
bundle exec rake spec

谢谢,完全解决了我的问题。它对环境做了一些奇怪的事情,所以您必须调用{rvmversion@gemsetdo}每次您希望通过该gemset执行某些操作时。