- Add
gem 'rails_12factor'to your Gemfile. This will add error logging and the ability for your app to serve static assets. bundle- Run
RAILS_ENV=production rake db:create db:migrate db:seed - Run
rake secretand copy the output - From the command line:
export SECRET_KEY_BASE=output-of-rake-secret - To precompile your assets, run
rake assets:precompile. This will create a folderpublic/assetsthat contains all of your assets. - Run
RAILS_ENV=production rails sand you should see your app.
Remember to clobber your assets (rake assets:clobber) and re-precompile (rake assets:precompile) if you make changes.
**
2. Run **
** and copy the output
3. From the command line : **
**
4. Change production.rb file config.assets.compile = false to **
**
5.To precompile your assets, run **
**. This will create a folder public/assets that contains all of your assets.
6.Run **
_** and you should see your app.