Richie50
Richie50

Reputation: 81

Assets missing after deploying on heroku

I'm new to RoR and after deploying I lose my assets. I tried pre-compiling assets locally, restarting the production server, deleting the app and reinstalling it again. None of these seemed to help. It works on development servers just fine.

Upvotes: 0

Views: 575

Answers (2)

Antima Gupta
Antima Gupta

Reputation: 381

Please try this :

config/environments/production.rb

config.serve_static_assets = true

Upvotes: 0

Ryan Bigg
Ryan Bigg

Reputation: 107728

They're not missing. It's likely that you're not using the rails_12factor gem in the production group in your Gemfile:

group :production do
  gem 'rails_12factor'
end

As mentioned in the Getting Started with Rails 4 article on Heroku's Dev Center.

Install that gem + deploy your app, and your assets should be there.

Upvotes: 1

Related Questions