【问题标题】:Using RVM via Integrity continuous integration通过 Integrity 持续集成使用 RVM
【发布时间】:2013-01-23 14:59:22
【问题描述】:

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

所以我使用以下构建脚本:

rvm use 1.9.2-p290@portal
bundle exec rake spec

我得到的输出是

RVM is not a function, blah-blah-blah

基本上它说 rvm 不是来自未登录的 shell。没什么大不了的,让我们将这个添加到 .bashrc 中:

if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
  # First try to load from a user install
  source "$HOME/.rvm/scripts/rvm"

酷,现在我启动的任何终端都可以调用 rvm use 命令而无需哭泣寻求帮助。但完整性不会在意这一点,它仍然说 rvm 不是函数。

如果我知道 Integrity 是如何调用系统命令的,那该死的,但我在这里想不通。

感谢您的帮助!

【问题讨论】:

    标签: ruby bash continuous-integration rvm integrity


    【解决方案1】:

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

    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
    

    【讨论】:

    • 谢谢,完全解决了我的问题。它对环境做了一些奇怪的事情,所以每次你想通过那个 gemset 执行某些东西时,你都必须调用 {rvm version@gemset do}。
    猜你喜欢
    • 1970-01-01
    • 2018-12-12
    • 1970-01-01
    • 1970-01-01
    • 2016-11-20
    • 2011-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多