Top Menu

Jump to content
    Global modules

    Global modules

    • Home
    • Projects
    • Activity
    • Work packages
    • Gantt charts
    • Calendars
    • Team planners
    • Boards
    • News
    Home
    Home
Help
    Getting started
    • Introduction video
  • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support
  • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation

User menu

Sign in
Forgot your password?

or sign in with your existing account

OpenProject ID Google

Side Menu

Collapse project menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Expand project menu
Support Installation & Updates
  1. OpenProject Community
  2. OpenProject
  3. Forums
  4. Support Installation & Updates
  5. Manual Deployment of OpenProject - Error for DATABASE_URL

Manual Deployment of OpenProject - Error for DATABASE_URL

Added by Gamaka Perera about 7 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?


Loading...