Are you having trouble setting up Discourse? Here are some basic things to
check before reaching out to the community for help:
Are you running Ruby 2.0 or later?
Discourse is designed for Ruby 2.0 or later. You can check your version by
ruby -v(as the discourse user) and checking the response for
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-linux]
Are you on Postgres 9.3 or later with HSTORE enabled?
You can check your postgres version by typing
psql --version. To see if
hstore is installed, open a session to postgres and type
\dxand see if
hstore is listed.
Have you run
We frequently update our dependencies to newer versions. It is a good idea
bundle installevery time you check out Discourse, especially if it’s
been a while.
Did you run
bundle updatewill download gem versions that we haven’t
tested with. The Gemfile.lock has the gem versions that Discourse currently
bundle installwill work. If you ran update, then you should
uninstall the gems, run
git checkout -- Gemfile.lockand then run
Have you migrated your database?
Our schema changes fairly frequently. After checking out the source code,
you should run
Do the tests pass?
If you are having other problems, it’s useful to know if the test suite
passes. You can run it by first using
rake db:test:prepareand then
rake spec. If you experience any failures, that’s a bad sign! Our master branch
should always pass every test.
Have you updated host_names in your database.yml?
If links in emails have localhost in them, then you are still using the
host_namesvalue in database.yml. Update it to use your site’s host
Are you having problems bundling:
ArgumentError: invalid byte sequence in US-ASCII An error occurred while installing active_model_serializers (0.7.0), and Bundler cannot continue. Make sure that `gem install active_model_serializers -v '0.7.0'` succeeds before bundling.
Try this in console:
$ export LANG="en_US.UTF-8" $ export LC_ALL="en_US.UTF-8"
And/or this in top of
if RUBY_VERSION =~ /1.9/ Encoding.default_external = Encoding::UTF_8 Encoding.default_internal = Encoding::UTF_8 end
Check your ~/discourse/log/production.log file if you are getting HTTP 500
Some common situations:
ActiveRecord::StatementInvalid (PG::Error: ERROR: column X does not exist
db:migrate task to apply migrations to the database