Content
Manual Deployment of OpenProject - Error for DATABASE_URL
Added by Gamaka Perera over 6 years ago
Hi,
I am following the manual installation steps in,
[[https://github.com/opf/openproject/blob/stable/7/docs/installation/manual/README.md]]
Database is progres.
database.yml is as follows;
production: adapter: postgresql encoding: unicode database: openproject pool: 5 username: openproject password: xxxxxxxxxxxxx
At “Finish the installation of OpenProject” step, following command fails.
RAILS_ENV="production" ./bin/rake db:create
Error:
rake aborted! KeyError: Cannot load `Rails.application.database_configuration`: key not found: "DATABASE_URL" (erb):10:in `fetch' (erb):10:in `<main>' /home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.6/lib/rails/application/configuration.rb:137:in `database_configuration' /home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/railtie.rb:35:in `block (3 levels) in <class:Railtie>' KeyError: key not found: "DATABASE_URL" (erb):10:in `fetch' (erb):10:in `<main>' /home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.6/lib/rails/application/configuration.rb:137:in `database_configuration' /home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.6/lib/active_record/railtie.rb:35:in `block (3 levels) in <class:Railtie>' Tasks: TOP => db:create => db:load_config (See full trace by running task with --trace)
Since I have provided database.yml, do I have to provide “DATABASE_URL” too?
If so how do I add this env variable?