2014-09-30 145 views
0

當我運行以下資產:預編譯錯誤軌道

RAILS_ENV=production bundle exec rake assets:precompile 

我收到以下錯誤

rake aborted! 
Settingslogic::MissingSetting: Missing setting 'production' in myapp/config/settings.yml 

,什麼是在配置/ setting.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,需要將什麼設置文件放入?

回答

2

我想這只是因爲你的配置文件中沒有production:條目。您只有development:test:

有關信息,該documentationRaising exceptions for missing settings helps highlight configuration problems. 但是您可以在生產抑制本(見上面的鏈接)