Content
problem during the installation of the plugin "timesheet"
Added by Andrea D'alterio almost 6 years ago
Hello ,
I need your help as I can not install the following plugin:
https://github.com/ctrlaltcoop/openproject-timesheet
Following the guide, I edited the Gemfile.modules file and added the following line :
gem 'openproject-timesheet', git: 'https://github.com/ctrlaltcoop/openproject-timesheet.git', tag: '0.0.3'
the problem is that after launching the command:
RAILS_ENV = production bin / rails assets: precompile
it is not successful and the following error appears:
openproject@testproject:/opt/openproject$ sudo RAILS_ENV=production bin/rails assets:precompile
/usr/lib/ruby/vendor_ruby/did_you_mean/version.rb:2: warning: already initialized constant DidYouMean::VERSION
/var/lib/gems/2.5.0/gems/did_you_mean-1.3.0/lib/did_you_mean/version.rb:2: warning: previous definition of VERSION was here
/usr/lib/ruby/vendor_ruby/did_you_mean/jaro_winkler.rb:63: warning: already initialized constant DidYouMean::JaroWinkler::WEIGHT
/var/lib/gems/2.5.0/gems/did_you_mean-1.3.0/lib/did_you_mean/jaro_winkler.rb:63: warning: previous definition of WEIGHT was here
/usr/lib/ruby/vendor_ruby/did_you_mean/jaro_winkler.rb:64: warning: already initialized constant DidYouMean::JaroWinkler::THRESHOLD
/var/lib/gems/2.5.0/gems/did_you_mean-1.3.0/lib/did_you_mean/jaro_winkler.rb:64: warning: previous definition of THRESHOLD was here
/usr/lib/ruby/vendor_ruby/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb:9: warning: already initialized constant DidYouMean::VariableNameChecker::NAMES_TO_EXCLUDE
/var/lib/gems/2.5.0/gems/did_you_mean-1.3.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb:9: warning: previous definition of NAMES_TO_EXCLUDE was here
/usr/lib/ruby/vendor_ruby/did_you_mean/spell_checkers/name_error_checkers.rb:5: warning: already initialized constant DidYouMean::NameErrorCheckers
/var/lib/gems/2.5.0/gems/did_you_mean-1.3.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb:5: warning: previous definition of NameErrorCheckers was here
/usr/lib/ruby/vendor_ruby/did_you_mean/spell_checkers/method_name_checker.rb:7: warning: already initialized constant DidYouMean::MethodNameChecker::NAMES_TO_EXCLUDE
/var/lib/gems/2.5.0/gems/did_you_mean-1.3.0/lib/did_you_mean/spell_checkers/method_name_checker.rb:7: warning: previous definition of NAMES_TO_EXCLUDE was here
/usr/lib/ruby/vendor_ruby/did_you_mean.rb:34: warning: already initialized constant DidYouMean::SPELL_CHECKERS
/var/lib/gems/2.5.0/gems/did_you_mean-1.3.0/lib/did_you_mean.rb:87: warning: previous definition of SPELL_CHECKERS was here
/usr/lib/ruby/2.5.0/fileutils.rb:90: warning: already initialized constant FileUtils::VERSION
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:92: warning: previous definition of VERSION was here
/usr/lib/ruby/2.5.0/fileutils.rb:1188: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1267: warning: previous definition of S_IF_DOOR was here
/usr/lib/ruby/2.5.0/fileutils.rb:1446: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1541: warning: previous definition of DIRECTORY_TERM was here
/usr/lib/ruby/2.5.0/fileutils.rb:1448: warning: already initialized constant FileUtils::Entry_::SYSCASE
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1543: warning: previous definition of SYSCASE was here
/usr/lib/ruby/2.5.0/fileutils.rb:1501: warning: already initialized constant FileUtils::OPT_TABLE
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1596: warning: previous definition of OPT_TABLE was here
/usr/lib/ruby/2.5.0/fileutils.rb:1555: warning: already initialized constant FileUtils::LOW_METHODS
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1650: warning: previous definition of LOW_METHODS was here
/usr/lib/ruby/2.5.0/fileutils.rb:1562: warning: already initialized constant FileUtils::METHODS
/var/lib/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1657: warning: previous definition of METHODS was here
rails aborted!
KeyError: Cannot load `Rails.application.database_configuration`:
key not found: "DATABASE_URL"
(erb):1:in `fetch'
(erb):1:in `<main>'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/application/configuration.rb:133:in `database_configuration'
/var/lib/gems/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/railtie.rb:121:in `block (2 levels) in <class:Railtie>'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:41:in `block in on_load'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:40:in `each'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:40:in `on_load'
/var/lib/gems/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/railtie.rb:120:in `block in <class:Railtie>'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/initializable.rb:59:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/initializable.rb:58:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/application.rb:353:in `initialize!'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/railtie.rb:185:in `public_send'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/railtie.rb:185:in `method_missing'
/opt/openproject/config/environment.rb:34:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:292:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:292:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:292:in `require'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/application.rb:329:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/application.rb:445:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/command.rb:46:in `invoke'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/commands.rb:16:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Caused by:
KeyError: key not found: "DATABASE_URL"
(erb):1:in `fetch'
(erb):1:in `<main>'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/application/configuration.rb:133:in `database_configuration'
/var/lib/gems/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/railtie.rb:121:in `block (2 levels) in <class:Railtie>'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:41:in `block in on_load'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:40:in `each'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/lazy_load_hooks.rb:40:in `on_load'
/var/lib/gems/2.5.0/gems/activerecord-5.1.6.1/lib/active_record/railtie.rb:120:in `block in <class:Railtie>'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/initializable.rb:59:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/initializable.rb:58:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/application.rb:353:in `initialize!'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/railtie.rb:185:in `public_send'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/railtie.rb:185:in `method_missing'
/opt/openproject/config/environment.rb:34:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:292:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:292:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:258:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.1.6.1/lib/active_support/dependencies.rb:292:in `require'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/application.rb:329:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/application.rb:445:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/command.rb:46:in `invoke'
/var/lib/gems/2.5.0/gems/railties-5.1.6.1/lib/rails/commands.rb:16:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => assets:precompile => assets:compile_environment => assets:prepare_op => openproject:plugins:register_frontend => environment
(See full trace by running task with --trace)
what can it depend on? and how can I solve the problem?
I thank you in advance for your time and your help.
Best regards
Andrea