문제

I have a Rails 3.1 application with an usual file layout. Heroku detects it as Ruby/Rack rather than Ruby/Rails. assets:precompile isn't run, so pages that require them fail with a javascript error.

What do I need in my file structure to trick Heroku into running the precompile task? Or, can I configure a command to run during slug compilation?

도움이 되었습니까?

해결책

Do you have have a config/application.rb in your codebase? This is what the Heroku ruby buildpack uses to detect that it's Rails 3, so it sounds to me like this could be missing.

Once Heroku detects that it's Rails it'll run the rake assets:precompile.

Failing that, you could use a gem such as heroku_san to add a post deploy hook of heroku run rake assets:precompile

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top