我有Rails应用ubuntu 18.04。捆绑安装成功运行,但是当我运行rake db:setup时,它会显示
耙子中止了! KeyError:找不到密钥:“ URL_HOST” /var/www/myapp/code/config/environments/production.rb:71:inList (blocks) { block in
Button (action: {
//perform button action
}) {
//How the cell should look
BlockRow(block: block)
}
}
.onAppear()
.onDelete()
中的“
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/railtie.rb:210:in fetch'
/var/www/myapp/code/config/environments/production.rb:71:in
configure'
/var/www/myapp/code/config/environments/production.rb:3:instance_eval'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/railtie.rb:210:in
中的“
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in <top (required)>'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in
load_dependency'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:在block in require'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in
块(2个级别)中,
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/engine.rb:597:in require'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/engine.rb:598:in
中的“
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:30:in each'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/engine.rb:597:in
run'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:55:in instance_exec'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:30:in
in'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:44: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
run_initializers'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/application.rb:352:in tsort_each_child'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/initializable.rb:54:in
'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in initialize!'
/var/www/myapp/code/config/environment.rb:5:in
中的require块
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in require'
/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 load_dependency'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in
中的run_tasks_blocks'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/rake-13.0.0/exe/rake:27:in require_environment!'
/home/myappuser/.rvm/gems/ruby-2.5.0/gems/railties-4.2.11.1/lib/rails/application.rb:457:in
eval'
/home/myappuser/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:24:in`'
任务:TOP => db:setup => db:schema:load_if_ruby =>环境
(通过使用--trace运行任务来查看完整跟踪)
需要帮助
答案 0 :(得分:0)
似乎缺少URL_HOST的某些配置设置。