therubyracer没有建立在英雄 [英] therubyracer fails to build on heroku

查看:139
本文介绍了therubyracer没有建立在英雄的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经制作了一个Rails 3.1 PoC应用程序,它也使用haml来适应railstutorial.org的书籍和本地的一切工作正常。

但是当我试图推到 heroku therubyracer 无法在服务器上构建完整输出

I've made a Rails 3.1 PoC application that also uses haml by adapting the examples from the railstutorial.org book and locally everything works fine.
But when I try to push to heroku, therubyracer fails to build on the server (full output):

Installing therubyracer (0.8.2) with native extensions /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

我的 Gemfile 是非常标准的,所以我真的很感激,如果有人可以帮助我了解出了什么问题,也许可以帮助我找到一个解决方案。

My Gemfile is pretty standard, so I would really appreciate if somebody could help me understand what's going wrong, and maybe give me a hand in finding a solution.

推荐答案

Heroku therubyracer 或 therubyracer-heroku 不再需要,但强烈反对,因为这些宝石使用非常大的内存。

Heroku no longer requires, but strongly discourages using therubyracer or therubyracer-heroku, as these gems use a very large amount of memory.

如果您使用它们,您的下一次部署将失败!

If you are using them your next deploy will fail!

您有两种选择:


  1. 添加'therubyracer',:platforms => :ruby 组:资源并升级你的红宝石版本。然后删除您的Gemfile.lock并运行 bundle install

  1. Add 'therubyracer', :platforms => :ruby to the group :assets and upgrade your ruby version. Then remove your Gemfile.lock and run bundle install.

运行资产:在您的本地机器中预编译,并将其推送到heroku(不要忘记从生产中删除therubyracer gems);

Run assets:precompile in your local machine and push them to heroku (don't forget to remove therubyracer gems from production);

这篇关于therubyracer没有建立在英雄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆