Gem:Module的未定义方法`path_separator'

wel*_*ins 6 ruby-on-rails nginx jenkins

我通过jenkins在passenger/nginx中运行ruby和rails应用程序.Jenkins成功构建应用程序.但该网站显示以下乘客错误.

Ruby (Rack) application could not be started.
Error message:
    undefined method `path_separator' for Gem:Module
Run Code Online (Sandbox Code Playgroud)

Uni*_*key 0

正在执行的版本Gem太旧,无法使用该方法。

您可以通过以下方式更新:

gem update --system
Run Code Online (Sandbox Code Playgroud)

但是在旧版本的 Ruby(例如 1.9)上运行应用程序可能会出现其他问题。目前仅支持 2.2 及更高版本。

您可能需要考虑告诉 Jenkins 使用与RVMDocker运行时环境中使用的相同版本的 Ruby 。