Skip to content

Instantly share code, notes, and snippets.

@JGallardo
Last active December 22, 2015 22:29
Show Gist options
  • Save JGallardo/6540534 to your computer and use it in GitHub Desktop.
Save JGallardo/6540534 to your computer and use it in GitHub Desktop.
How to modify the CSS for a rails project
Make all of your changes to the respective style sheet and then run the following commands. If you add a framework or theme, those are usually placed in vendor/assets/stylesheets. I can replace the second command with git add vendor/assets.
1. Compile assets locally, run next command
RAILS_ENV=production bundle exec rake assets:precompile
2. Commit and push the new changes
git add public/assets
git commit -m "vendor compiled assets"
3. Pull with rebase
git pull --rebase heroku master
4. Push to heroku
git push heroku master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment