我制作了一个 Rails 3.1 PoC 应用程序,它也通过改编 railstutorial.org 书中的示例使用 haml,并且在本地一切正常。
但是当我尝试推送到 heroku 时, therubyracer 无法在服务器上构建 ( 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是非常标准的,所以如果有人能帮助我理解出了什么问题,并帮助我找到解决方案,我将不胜感激。
最佳答案
这些答案已过时。您现在可以在两种环境中使用 therubyracer
,只要您的版本为“>= 0.11.2”
我应该指出,我是 therubyracer 的作者,并在 Assets 编译时和运行时在几个生产 heroku 应用程序中使用它
关于deployment - therubyracer 无法在 heroku 上构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6259130/