i have rails app ubuntu 18.04. bundle install run successful but when i run rake db:setup it shows
rake aborted! KeyError: key not found: "URL_HOST" /var/www/myapp/code/config/environments/production.rb:71:in fetch' /var/www/myapp/code/config/environments/production.rb:71:in
block in ' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/railtie.rb:210:in instance_eval' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/railtie.rb:210:in
configure' /var/www/myapp/code/config/environments/production.rb:3:in <top (required)>' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in
require' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in block in require' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in
load_dependency' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in require' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/engine.rb:598:in
block (2 levels) in ' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/engine.rb:597:in each' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/engine.rb:597:in
block in ' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:30:in instance_exec' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:30:in
run' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:55:in block in run_initializers' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:44:in
each' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:44:in tsort_each_child' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:54:in
run_initializers' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/application.rb:352:in initialize!' /var/www/myapp/code/config/environment.rb:5:in
' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in require' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in
block in require' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in load_dependency' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in
require' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/application.rb:328:in require_environment!' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/application.rb:457:in
block in run_tasks_blocks' /home/myappuser/.rvm/gems/ruby-2.5.0/gems/rake-13.0.0/exe/rake:27:in <top (required)>' /home/myappuser/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in
eval' /home/myappuser/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in `' Tasks: TOP => db:setup => db:schema:load_if_ruby => environment (See full trace by running task with --trace)
Need help
Aucun commentaire:
Enregistrer un commentaire