Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • 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
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

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

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Manual Deployment of OpenProject - Error for DATABASE_URL

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?


Loading...