Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 资产:预编译错误轨道_Ruby On Rails_Ruby On Rails 4_Heroku_Heroku Postgres - Fatal编程技术网

Ruby on rails 资产:预编译错误轨道

Ruby on rails 资产:预编译错误轨道,ruby-on-rails,ruby-on-rails-4,heroku,heroku-postgres,Ruby On Rails,Ruby On Rails 4,Heroku,Heroku Postgres,当我运行以下命令时 RAILS_ENV=production bundle exec rake assets:precompile 我得到以下错误 rake aborted! Settingslogic::MissingSetting: Missing setting 'production' in myapp/config/settings.yml 下面是config/settings.yml文件中的内容 defaults: &defaults core: name: Myapp

当我运行以下命令时

RAILS_ENV=production bundle exec rake assets:precompile
我得到以下错误

rake aborted!
Settingslogic::MissingSetting: Missing setting 'production' in myapp/config/settings.yml
下面是config/settings.yml文件中的内容

defaults: &defaults
core:
name: Myapp
smtp:
  default_from:
  host: 
  port:
  domain:
  username:
  password:
  authentication:
  start_tls:

development:
<<: *defaults
web:
host: localhost:3000

test:
<<: *defaults
web:
host: localhost:3000
defaults:&defaults
核心:
名称:Myapp
smtp:
默认值来自:
主持人:
端口:
域:
用户名:
密码:
身份验证:
启动\u tls:
发展:

我认为这只是因为您的配置文件中没有
production:
条目。您只有
开发:
测试:

有关信息,请参见
为缺少的设置引发异常有助于突出显示配置问题。
但您可以在生产中抑制这种情况(参见上面的链接)