SupimpaAllTheWay
SupimpaAllTheWay

Reputation: 1458

Ruby on Rails Precompiling assets failed

I've been following the reInteractive ruby on rails (15 min blog), and in the end of the post (second part), I got an error using heroku to upload my files:

! Precompiling assests failed

!Push rejected, failed to compile Ruby app

To [email protected]:peaceful-sea-8032.git
! [remote rejected] master -> master <pre-receive hook declined>
error: failed to push some refs to '[email protected]:peaceful-sea-8032.git'

ps: The app runs fine on localhost, I saw some similar question but I did not have success trying their solutions.

Upvotes: 2

Views: 567

Answers (1)

ksu
ksu

Reputation: 608

Precompile your assets locally. In your shell cd to your application folder and enter:

RAILS_ENV=production bundle exec rake assets:precompile

This will precompile your assets locally Then you have to

git add .
git commit -am 'precompiled assets'
git push heroku

(eddited last line)

Upvotes: 1

Related Questions