https://github.com/theforeman/theforeman.org/blob/9137547dd1b8deffa83508f1f6099d4c12955d95/contribute.md#setup-test-environment
Should this not rather be bundle exec bin/rake db:setup to create the database?
Furthermore, this describes the creation of the test-database, which IMHO would require to append a RAILS_ENV=test to the command.