繁体   English   中英

资产:预编译错误轨

[英]assets:precompile error rails

当我运行以下

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

有人可以帮忙吗? 如果部署到heroku,我需要在设置文件中放入什么?

我认为这只是因为您没有production:配置文件中的条目。 您只有development:test:

有关信息,该文档说, Raising exceptions for missing settings helps highlight configuration problems. 但是您可以在生产中取消此操作(请参见上面的链接)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM