Skip to content
Cyril Rohr edited this page Jul 25, 2014 · 2 revisions

Discourse requires to have a db setup and migrated before being able to precompile assets (scss files are using colour schemes or stuff like that). Otherwise, you would get the error ActiveRecord::StatementInvalid: PG::Error: ERROR: relation "color_schemes" does not exist.

Therefore, the only way to package is to precompile assets locally, before pushing:

sudo apt-get install postgresql postgresql-contrib redis-server imagemagick -y
createuser discourse -d -s -P # enter 'discourse' as password
createdb -O discourse discourse
DATABASE_URL=postgres://discourse:[email protected]/discourse RAILS_ENV=production bundle exec rake db:migrate
DATABASE_URL=postgres://discourse:[email protected]/discourse RAILS_ENV=production bundle exec rake assets:precompile
git add -f public/assets && git commit -m "add precompiled assets"
git push origin stable

Some test

Clone this wiki locally