更新
我现在知道(从运行heroku run bash
和)部署到heroku后ls -la
确实缺少该目录。config
但是,它存在于本地存储库中。
.gitignore
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
# Ignore all logfiles and tempfiles.
/log/*.log
*.log
/tmp
在我将我的应用程序推送到 heroku 之后,我得到了一个 LoadError for /app/config/environment
,这在以前的版本中没有发生过。没有进行任何更改config.ru
。该文件config/environment.rb
存在。
我尝试了回滚,但不能,因为以前的版本有不同的附加组件。
我该如何解决这个错误?
Heroku 日志:
2012-05-09T03:59:15+00:00 heroku[slugc]: Slug compilation started
2012-05-09T04:00:36+00:00 heroku[api]: Release v48 created by xxx
2012-05-09T04:00:36+00:00 heroku[api]: Deploy ac5eee6 by xxx
2012-05-09T04:00:36+00:00 heroku[web.1]: State changed from crashed to created
2012-05-09T04:00:36+00:00 heroku[web.1]: State changed from created to starting
2012-05-09T04:00:36+00:00 heroku[slugc]: Slug compilation finished
2012-05-09T04:00:44+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -p 6745`
2012-05-09T04:00:47+00:00 app[web.1]: /app/config.ru:3:in `require': no such file to load -- /app/config/environment (LoadError)
2012-05-09T04:00:47+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/config.ru:1:in `new'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/rack/adapter/loader.rb:36:in `eval'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/rack/adapter/loader.rb:36:in `load'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/rack/adapter/loader.rb:45:in `for'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/controllers/controller.rb:169:in `load_adapter'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/controllers/controller.rb:73:in `start'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/bin/thin:6:in `<top (required)>'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2012-05-09T04:00:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'
2012-05-09T04:00:47+00:00 app[web.1]: >> Using rack adapter
2012-05-09T04:00:48+00:00 heroku[web.1]: Process exited with status 1
2012-05-09T04:00:48+00:00 heroku[web.1]: State changed from starting to crashed
配置.ru
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run ItAngel::Application