You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

部署Rails应用至render.com遇平台兼容错误如何解决?

Rails部署至render.com平台不兼容错误解决

部署Rails应用到render.com时触发以下错误:

==> Running build command 'bundle install; bundle exec rake assets:precompile; bundle exec rake assets:clean;'...
Your bundle only supports platforms ["x86_64-darwin-22"] but your local platform is x86_64-linux.
Add the current platform to the lockfile with bundle lock --add-platform x86_64-linux and try again.

问题调查

  • x86_64:PC CPU的位数(信息处理能力)
  • darwin:苹果开发的操作系统,是Mac OS的底层基础
  • 22:操作系统版本号

部署环境为x86_64-linux,因此需要将该平台添加至Gemfile.lock文件中。

解决方案

在本地环境执行以下命令更新Gemfile.lock:

bundle lock --add-platform x86_64-linux

执行结果:

x86_64-linux added!

更新后的Gemfile.lock相关内容如下:

+ nokogiri (1.13.9-x86_64-linux)
+   racc (~> 1.4)

PLATFORMS
  x86_64-darwin-22
+ x86_64-linux

内容的提问来源于stack exchange,提问作者Qasim Ali

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 10:54:57