Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS loading locally but not in Heroku for a rails app

I'm following a rails prelaunch signup tutorial. Bootstrap was working fine deployed on heroku, but then I modified the bootstrap_and_override file to include a logo. When launching a rails server locally and viewing, the style is as I intended with bootstrap and the new header logo appearing.

Like I did before, I ran rake assets:precompile and pushed to git - followed this tutorial http://railsapps.github.com/rails-heroku-tutorial.html which worked before showing the css while on heroku. The html is showing but it looks like css and bootstrap are missing.

Does anyone have any ideas?

like image 338
pvskisteak5 Avatar asked Oct 04 '12 02:10

pvskisteak5


People also ask

Can I deploy my first rails 6 application to Heroku?

You have deployed your first Rails 6 application to Heroku. Here’s some recommended reading: Visit the Ruby support category to learn more about using Ruby and Rails on Heroku.

Does bootstrap work with Heroku?

It works locally but when I deploy it to Heroku, the bootstrap styles nad my custom css do not show up. Things I've tried 1) I've tried running rake assets:precompile locally then deploying it again

Why can't I upload files to my Heroku app?

If you are uploading files to this app, they will not persist after the app is restarted, on one-off dynos, or if the app has multiple dynos. Heroku applications have an ephemeral file system.

Where does Heroku pull files from GitHub?

That file exists on your local repository (your computer) but not on the remote (GitHub). Your Heroku app comes from GitHub. When you deploy the app to Heroku, it pulls your project files and package.json (to know which modules your project is ‘dependent’ on) from your GitHub repository.


1 Answers

Run bundle exec rake assets:precompile on your local code

Commit the changes and deploy to heroku

like image 60
Connor Leech Avatar answered Sep 30 '22 14:09

Connor Leech