我正在尝试让 Rails 3.2.x 应用程序在生产中运行,但每次我访问已部署的应用程序时,它都会抱怨资产没有被编译:
An ActionView::Template::Error occurred in home#index:
application.css isn't precompiled
vendor/bundle/gems/actionpack-3.2.11/lib/sprockets/helpers/rails_helper.rb:142:in `digest_for'
-------------------------------
Request:
-------------------------------
* URL : http://some-server.elasticbeanstalk.com/
* Parameters: {"controller"=>"home", "action"=>"index"}
* Rails root: /var/app/current
* Timestamp : 2013-01-17 17:22:55 UTC
但是,当我查阅我的 EB 实例的日志文件时,我将其视为每次部署的一部分:
Script succeeded.
Executing script: /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh
Output from script: /usr/bin/ruby1.9 /usr/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
我可以在生产模式下运行本地乘客实例,并且资产服务良好。有没有人对可能出现的问题有任何见解?