0

I created a Rails/React app with Webpacker on my Mac running Ruby 2.5.3 and it runs without issue. However when I clone it to my Ubuntu 18.04 machine, I get the below error :

/usr/lib/ruby/2.5.0/yaml.rb:5: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.

My Ubuntu machine is also running Ruby 2.5.3, so I'm confused why it references 2.5.0 in the error.

I am able to launch the Rails server with rails s, but when I try to launch the full app with foreman start -f Procfile.dev, I get the error. I've tried reinstalling libyaml and all the Ruby versions on my machine with RVM with no impact on the error. I've also changed my local Ruby version to 2.5.0, and I get a different error message about how my machine is running Ruby 2.5.0 but the project is running 2.5.3.

Procfile.dev file:

rails: bundle exec rails s
webpack: ./bin/webpack-dev-serer
4

2 回答 2

0

我从“sudo apt install Ruby”安装了 Ruby 2.5.1,从 RVM 安装了 2.5.3。我擦除了所有已安装的 Rubies 和 RVM,通过根目录上的 RVM 重新安装了 2.5.3,一切顺利。

于 2019-07-17T03:38:14.473 回答
0

它说该项目基于ruby '~> 2.5'Gemfile 中的指令运行 2.5.0。尝试将其更改为您正在运行的实际版本,bundle再次运行以设置 Gemfile.lock,然后重试该命令。

于 2019-07-16T08:37:35.337 回答