简体   繁体   English

Rails:由于 ruby​​ 版本不同,运行 rake 时出错

[英]Rails: Error running rake due to different ruby version

I'm using a self-hosted chatwoot installation on AWS using ubuntu.我正在使用 ubuntu 在 AWS 上使用自托管的chatwoot安装。

I'm upgrading the chatwoot version following the guide but when i want to precompile the assets, I run into an error我正在按照 指南升级 chatwoot 版本,但是当我想预编译资产时,我遇到了错误

Your Ruby version is 2.7.0, but your Gemfile specified 3.0.2

But when i get the ruby version, it states that my version is already the same as specified in the Gemfile.但是当我得到 ruby​​ 版本时,它表明我的版本已经与 Gemfile 中指定的相同。

Screenshot of the problem问题截图

I'm kind of loss at this problem.我对这个问题有点茫然。

Thanks in advance.提前致谢。

You better install Ruby 2.7.0 for compatibility.您最好安装 Ruby 2.7.0 以获得兼容性。 The Ruby version in your local machine is different from the one declared in Gemfile.您本地机器中的 Ruby 版本与 Gemfile 中声明的版本不同。

If you're using rvm:如果您使用的是 rvm:

rvm install 2.7.0
rvm use 2.7.0

else if you're using rbenv:否则,如果您使用的是 rbenv:

rbenv install 2.7.0
rbenv local 2.7.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM