Reputation: 5525
I am currently first time deploying my app to Heroku, and am encountering the precompile error. When I execute the command git push heroku master
, I get:
Running: rake assets:precompile
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
After a bit of searching, I encountered both Heroku's own troubleshooting guide on precompile error, as well as this post on precompile errors and Rails 3.2, and following their directions, did the following:
config.assets.initialize_on_precompile = false
to my application.rb
fileheroku create
just to be safebundle exec rake assets:precompile
I thought that since I am doing the compiling locally, when pushing to Heroku it would just skip the compilation part based on detecting a manifest.yml file. However, even when I do so, when running git push heroku master
, it will still run rake assets:precompile
and generate the same error as seen above.
Thanks in advance for you help!
Addendum
In my .gitignore, I have the following:
# Ignore bundler config
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
Upvotes: 1
Views: 468
Reputation: 8546
At first glance, I would assume that it should work.
Can you confirm that you have committed and merged all changes into master? i.e. git status
Upvotes: 1