【问题标题】:Bundler::RubyVersionMismatch when shelling out to a command that invokes Ruby捆绑到调用 Ruby 的命令时的 Bundler::RubyVersionMismatch
【发布时间】:2013-03-02 18:32:49
【问题描述】:

当对本身使用另一个版本的 Ruby 的命令进行外壳处理时,会发出 Bundler::RubyVersionMismatch 错误(来自 Bundler 管理的代码)。

当在 Gemfile 中为某些 shell 命令指定 Ruby 版本时,会发生这种情况。

这方面的一个例子是 Rake 任务向 Heroku 工具带命令发送。

【问题讨论】:

    标签: shell rake bundler runtime-error heroku-toolbelt


    【解决方案1】:

    在代码中,将Bundler.with_clean_env{} 包裹在shelled-out to 命令周围。

    更多信息请参见 Bundler issue

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-08
      • 2011-04-24
      • 1970-01-01
      相关资源
      最近更新 更多