Forked from rwarbelow/running_app_in_production_locally.markdown
Last active
September 14, 2017 09:11
-
-
Save andrew-oko-odion/4a05d9f327a537f56583b0808314a57f to your computer and use it in GitHub Desktop.
Revisions
-
andrew-oko-odion revised this gist
Sep 14, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,5 +5,6 @@ 1. From the command line: `export SECRET_KEY_BASE=output-of-rake-secret` 1. To precompile your assets, run `rake assets:precompile`. This will create a folder `public/assets` that contains all of your assets. 1. Run `RAILS_ENV=production rails s` and you should see your app. # For Rails 5 using webpacker, Add. RAILS_ENV=production rails webpacker:compile Remember to clobber your assets (`rake assets:clobber`) and re-precompile (`rake assets:precompile`) if you make changes. -
rwarbelow created this gist
Nov 11, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ 1. Add `gem 'rails_12factor'` to your Gemfile. This will add error logging and the ability for your app to serve static assets. 1. `bundle` 1. Run `RAILS_ENV=production rake db:create db:migrate db:seed` 1. Run `rake secret` and copy the output 1. From the command line: `export SECRET_KEY_BASE=output-of-rake-secret` 1. To precompile your assets, run `rake assets:precompile`. This will create a folder `public/assets` that contains all of your assets. 1. Run `RAILS_ENV=production rails s` and you should see your app. Remember to clobber your assets (`rake assets:clobber`) and re-precompile (`rake assets:precompile`) if you make changes.