我正在尝试部署到heroku并收到以下错误,如下所示。我很感激任何提示或帮助解决这个问题。
Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
Errno::ENOENT: No such file or directory - /tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/config/settings.yml
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:102:in `initialize'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:60:in `new'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:60:in `instance'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/settingslogic-2.0.9/lib/settingslogic.rb:48:in `load!'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/app/models/settings.rb:4:in `<class:Settings>'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/app/models/settings.rb:1:in `<top (required)>'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:348:in `require_or_load'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:480:in `load_missing_constant'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:180:in `const_missing'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/config/initializers/action_mailer.rb:5:in `<top (required)>'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `block in load'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:648:in `block in load_config_initializer'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/notifications.rb:161:in `instrument'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:647:in `load_config_initializer'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:611:in `each'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/engine.rb:611:in `block in <class:Engine>'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `run'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/initializable.rb:44:in `each'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/application.rb:300:in `initialize!'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/railtie.rb:194:in `public_send'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/railtie.rb:194:in `method_missing'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/config/environment.rb:5:in `<top (required)>'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `block in require'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/application.rb:276:in `require_environment!'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/railties-4.1.4/lib/rails/application.rb:379:in `block in run_tasks_blocks'
/tmp/build_c6574b00-1f27-48f0-a3ea-4413871d028e/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
config / settings.yml如下///////////////////////////////
defaults: &defaults
core:
name: My_app
smtp:
default_from:
host:
port:
domain:
username:
password:
authentication:
start_tls:
development:
<<: *defaults
web:
host: localhost:3000
test:
<<: *defaults
web:
host: localhost:3000
答案 0 :(得分:1)
我认为您的文件未包含在您的git存储库中。尝试
git add config/settings.yml
git commit -m 'adding settings'
git push heroku master
它应该工作 并确保更改config.assets.version
答案 1 :(得分:1)
以下帖子有所帮助 Precompilation breaking on heroku, works locally
只需更改config.assets.version
即可