Ruby on rails Heroku:rails:getting";没有要加载的文件--URI(LoadError)";

Ruby on rails Heroku:rails:getting";没有要加载的文件--URI(LoadError)";,ruby-on-rails,ruby,heroku,Ruby On Rails,Ruby,Heroku,刚开始在rails应用程序中使用heroku,我无法启动rails应用程序 Heroku上的Ruby版本 $heroku run“ruby-v” $heroku ps === web: `bundle exec thin start -R config.ru -e $RAILS_ENV -p $PORT` web.1: crashed for 6m $heroku原木 2012-08-17T10:06:49+00:00 heroku[web.1]: State changed from cra

刚开始在rails应用程序中使用heroku,我无法启动rails应用程序

Heroku上的Ruby版本

$heroku run“ruby-v”

$heroku ps

=== web: `bundle exec thin start -R config.ru -e $RAILS_ENV -p $PORT`
web.1: crashed for 6m
$heroku原木

2012-08-17T10:06:49+00:00 heroku[web.1]: State changed from crashed to starting
2012-08-17T10:06:52+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 31657`
2012-08-17T10:06:54+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-08-17T10:06:54+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-08-17T10:06:56+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2012-08-17T10:06:57+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- URI (LoadError)
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:312:in `depend_on'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:225:in `require_dependency'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:438:in `block in eager_load!'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:438:in `each'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:436:in `each'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:436:in `eager_load!'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<top (required)>'
2012-08-17T10:06:57+00:00 app[web.1]:   from config.ru:3:in `require'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
2012-08-17T10:06:57+00:00 app[web.1]:   from config.ru:3:in `block in <main>'
2012-08-17T10:06:57+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-08-17T10:06:57+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-08-17T10:06:57+00:00 app[web.1]:   from config.ru:1:in `new'
2012-08-17T10:06:57+00:00 app[web.1]:   from config.ru:1:in `<main>'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/rack/adapter/loader.rb:33:in `eval'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:185:in `run_command'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/controllers/controller.rb:71:in `start'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/rack/adapter/loader.rb:33:in `load'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:151:in `run!'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/bin/thin:6:in `<top (required)>'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2012-08-17T10:06:58+00:00 heroku[web.1]: Process exited with status 1
2012-08-17T10:06:58+00:00 heroku[web.1]: State changed from starting to crashed
2012-08-17T10:07:00+00:00 heroku[router]: Error H10 (App crashed) -> GET boiling-bayou-5291.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-08-17T10:07:00+00:00 heroku[router]: Error H10 (App crashed) -> GET boiling-bayou-5291.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
显然,加载“URI”模块时存在问题

问题是缺少什么?而且heroku报告的ruby版本是1.9.3,那么为什么在上面的日志中我看到“1.9.1”。这是问题的一部分吗

多谢

找到了问题

我在代码中使用了require'URI'。。。如果我将其更改为需要“uri”,它将在heroku上工作


需要说明的是,require'URI'在我的本地开发环境中工作。

请注意,Mac OS X文件系统默认不区分大小写,而Linux文件系统区分大小写。因此,
URI
URI
在Mac上是相同的,而
require'URI'
在Linux上会失败,因为您要查找的文件名为
URI

1.9.1是一个用词不当的东西-所有Rubies都会这样做。谢谢Neil,我找到了问题的根本原因。在我的一个控制器中需要“URI”。注释它有助于解决上述错误。。。但我确实需要URI,所以仍然处于修复状态。对我来说也是这样。我需要一个名为
Facebook.rb
的文件,该文件在本地运行良好,甚至可以在本地生产环境中运行应用程序;但它对Heroku不起作用。将所需文件更改为小写,即
facebook.rb
,所有操作都正常。
2012-08-17T10:06:49+00:00 heroku[web.1]: State changed from crashed to starting
2012-08-17T10:06:52+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 31657`
2012-08-17T10:06:54+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-08-17T10:06:54+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-08-17T10:06:56+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2012-08-17T10:06:57+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- URI (LoadError)
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:312:in `depend_on'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:225:in `require_dependency'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:438:in `block in eager_load!'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:438:in `each'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:436:in `each'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:436:in `eager_load!'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<top (required)>'
2012-08-17T10:06:57+00:00 app[web.1]:   from config.ru:3:in `require'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
2012-08-17T10:06:57+00:00 app[web.1]:   from config.ru:3:in `block in <main>'
2012-08-17T10:06:57+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-08-17T10:06:57+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-08-17T10:06:57+00:00 app[web.1]:   from config.ru:1:in `new'
2012-08-17T10:06:57+00:00 app[web.1]:   from config.ru:1:in `<main>'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/rack/adapter/loader.rb:33:in `eval'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:185:in `run_command'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/controllers/controller.rb:71:in `start'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/rack/adapter/loader.rb:33:in `load'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:151:in `run!'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/bin/thin:6:in `<top (required)>'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2012-08-17T10:06:57+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2012-08-17T10:06:58+00:00 heroku[web.1]: Process exited with status 1
2012-08-17T10:06:58+00:00 heroku[web.1]: State changed from starting to crashed
2012-08-17T10:07:00+00:00 heroku[router]: Error H10 (App crashed) -> GET boiling-bayou-5291.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-08-17T10:07:00+00:00 heroku[router]: Error H10 (App crashed) -> GET boiling-bayou-5291.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
2012-08-17T10:06:57+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- URI (LoadError)