Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku css not loading after assets:precompile

Heroku suddenly stopped working and gave me this error:

  could not connect to server: Connection refused
  Is the server running on host "127.0.0.1" and accepting
  Precompiling assets failed.

After some research I ran this line:

 running RAILS_ENV=production bundle exec rake assets:precompile

This worked but now when i push an update to heroku the new css doesn't load. This line never used to show before:

Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment

If possible can you also explain why the assets:precompile line solved my original problem?

like image 444
user2759575 Avatar asked Dec 26 '22 18:12

user2759575


1 Answers

Run this commands:

 bundle exec rake tmp:clear

 bundle exec rake assets:clean RAILS_ENV=production

 bundle exec rake assets:precompile RAILS_ENV=production

Hope this helps!

like image 160
Leandro Figueredo Avatar answered Jan 05 '23 19:01

Leandro Figueredo