- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我有一个简单的 Rails 应用程序,可以在本地主机 (Mac OS X) 上正常运行,但是当我将它部署到 Heroku 时,我看到一个页面出现此错误:
应用程序错误应用程序发生错误,无法提供您的页面。请稍后重试。如果您是应用程序所有者,请查看您的日志以了解详细信息。
我真的不知道我在这里做什么;我无法理解 heroku logs
的输出:
2013-04-08T03:25:02+00:00 app[web.1]: => Booting WEBrick
2013-04-08T03:25:02+00:00 app[web.1]: => Rails 3.2.12 application starting in production on http://0.0.0.0:15072
2013-04-08T03:25:02+00:00 app[web.1]: => Call with -d to detach
2013-04-08T03:25:02+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `each'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `block in eager_load!'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `each'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `eager_load!'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/app/controllers/application_controller.rb:1:in `<top (required)>'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-04-08T03:25:02+00:00 app[web.1]: /app/app/controllers/application_controller.rb:3:in `<class:ApplicationController>': uninitialized constant ApplicationController::SessionsHelper (NameError)
2013-04-08T03:25:02+00:00 app[web.1]: Exiting
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/config.ru:3:in `require'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/config.ru:in `new'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:46:in `app'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in `start'
2013-04-08T03:25:02+00
:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
2013-04-08T03:25:02+00:00 app[web.1]: from script/rails:6:in `require'
2013-04-08T03:25:02+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-04-08T03:25:02+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
2013-04-08T03:25:03+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-08T03:25:03+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-08T03:25:03+00:00 heroku[web.1]: Process exited with status 1
2013-04-08T03:25:05+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 7369`
2013-04-08T03:25:09+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-08T03:25:09+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)
2013-04-08T03:25:09+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)
2013-04-08T03:25:11+00:00 app[web.1]: Exiting
2013-04-08T03:25:11+00:00 app[web.1]: /app/app/controllers/application_controller.rb:3:in `<class:ApplicationController>': uninitialized constant ApplicationController::SessionsHelper (NameError)
2013-04-08T03:25:11+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-04-08T03:25:11+00:00 app[web.1]: => Call with -d to detach
2013-04-08T03:25:11+00:00 app[web.1]: from /app/app/controllers/application_controller.rb:1:in `<top (required)>'
2013-04-08T03:25:11+00:00 app[web.1]: => Booting WEBrick
2013-04-08T03:25:11+00:00 app[web.1]: => Rails 3.2.12 application starting in production on http://0.0.0.0:7369
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `each'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:436:in `eager_load!'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `block in eager_load!'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `each'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/config.ru:in `new'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/config.ru:3:in `require'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:46:in `app'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands/server.rb:70:in `start'
2013-04-08T03:25:11+00:00 app[web.1]: from script/rails:6:in `require'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-04-08T03:25:11+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
2013-04-08T03:25:11+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
2013-04-08T03:25:13+00:00 heroku[web.1]: Process exited with status 1
2013-04-08T03:25:13+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-08T03:30:49+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=********.herokuapp.com fwd="115.79.161.252" dyno= connect= service= status=503 bytes=
2013-04-08T03:30:49+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=********.herokuapp.com fwd="115.79.161.252" dyno= connect= service= status=503 bytes=
2013-04-08T03:30:50+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=********.herokuapp.com fwd="115.79.161.252" dyno= connect= service= status=503 bytes=
2013-04-08T03:30:51+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=********.herokuapp.com fwd="115.79.161.252" dyno= connect= service= status=503 bytes=
我看到的一些类似问题建议运行 heroku run rake db:migrate
,这会给我以下输出:
Running `rake db:migrate` attached to terminal... up, run.5112
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/Rakefile:7)
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/Rakefile:7)
rake aborted!
no such file to load -- nokogiri
/app/lib/tasks/pivotal.rake:8:in `require'
/app/lib/tasks/pivotal.rake:8:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:425:in `load'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:425:in `block in load_tasks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:425:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:425:in `load_tasks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:145:in `load_tasks'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/Rakefile:7:in `<top (required)>'
(See full trace by running task with --trace)
行 no such file to load -- nokogiri
看起来可能是罪魁祸首,但我不知道如何修复它;我试过运行 bundle install
、bundle update
、使用 heroku restart
重新启动 heroku 以及我能做的所有其他基于猜测的解决方案现在不记得了,但它仍然无法正常工作!
这是我的 Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.12'
gem 'bootstrap-sass'
gem 'bcrypt-ruby', '3.0.1'
gem 'paperclip', '~> 3.4.1'
gem 'nokogiri'
gem "watu_table_builder", require: "table_builder"
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.13.0'
gem 'guard-rspec', '1.2.1'
gem 'guard-spork', :github => 'guard/guard-spork'
gem 'spork', '0.9.2'
gem 'factory_girl_rails', '4.1.0', :require => false
end
group :development do
gem 'annotate'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.2'
group :test do
gem 'capybara', '1.1.2'
# Gems specific to Mac OS X:
gem 'capybara', '1.1.2'
gem 'rb-fsevent', '0.9.1', :require => false
gem 'growl', '1.0.3'
end
group :production do
gem 'pg', '0.12.2'
end
最佳答案
应用 Controller 第3行,
/app/app/controllers/application_controller.rb:3:in `': 未初始化常量 ApplicationController::SessionsHelper (NameError)
此外,您应该为 Heroku 移除 WEBrick,那是一个开发服务器。尝试使用 unicorn https://devcenter.heroku.com/articles/rails-unicorn
关于ruby-on-rails - Heroku "at=error code=H10 desc="应用程序崩溃“method=GET path=/favicon.ico”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15870889/
我尝试在安装了多类型 MFC 库的 visual studio 2015 MFC 上运行以前编写的 MFC c++ 代码。 但是,我这里仍然有 12 个关于缺少函数的错误: IntelliSense:
我正在学习 OOP 并且有疑问。假设我有一个包含 ClassB.h 的文件 ClassA.h,并且在某些时候我的 ClassB.h 需要包含 ClassA .h。 这会产生一个错误,我想我明白为什么会
我开始使用 CUDA 进行编程,在一些示例中我找到了包含文件 cuda.h、cuda_runtime.h 和 cuda_runtime_api.h 包含在代码中。有人可以向我解释一下这些文件之间的区别
我有一些生成正则表达式的代码。那么下面的表达式实际上是: ^(?:\s*((exclude|include|hide|show|protect|risk|dir-merge|merge)),\s*((
我一直在查看一些源代码,以更好地了解我们使用的这款游戏的核心,并编写更可靠、更快速的插件。然后我发现了这段奇怪的代码...... public void setMaxH(double amount)
通常我们会使用标准类型作为 std::unordered_map 的键和值.但现在我需要自定义我自己的键和值类。 键类在block_cache_key.h 中定义如下: #ifndef BLOCK_C
例如,我想要两个头文件,它们可以依赖于另一个头文件中的函数。 //Header1.h file #include Header2.h void h1(){ //... func1(); } v
我正在研究来自 Sedgewick 的 Shell 排序 Algorithms in C part 1-4在第 172 页。 我使用 size (数组的长度),而不是 l和 r (开始和结束);所以我
我在 macOS BigSur 上通过 VMWare 使用 Ubuntu 20.04.2 LTS。我安装了最新版本的 tcl、tcl-dev、tk 和 tk-dev - 版本 8.6。我想编译 Arc
我用我的 glu 和 gl 头文件构建了一个 OpenGL 程序,默认包含在 windows 7 专业版中。现在,我买了一本描述 OpenGL 游戏开发的书。这本书的作者说,我必须在我的项目中包含 g
我想在 token 中保留特殊字符,同时仍对特殊字符进行 token 化。说我有话 "H&R Blocks" 我想将其标记为 "H", "R", "H&R", "Blocks" 我读了http://w
关于 hash 作为 trans 参数的另一个问题。在下面的代码中,简单地使用 hash 会给出不正确的结果,但是将其替换为 keys 和 values 会使其正确。怎么了? my @alph1 =
我已经编写了一个 C 程序,它获取屏幕像素的 RGB 值 (0-255),并知道其位置 (x,y)。它可以在 Linux 中运行,但是当我尝试在 Visual Studio (Windows) 中编译
我已经使用 Windows 7 专业版中默认包含的 glu 和 gl 头文件构建了一个 OpenGL 程序。现在,我买了一本描述 OpenGL 游戏开发的书。这本书的作者说,我必须将glew head
#include using namespace std; #include //#include int main() { initscr();
h:messages h:form 内的组件还显示与外部组件相关的消息。 如何限制它只显示与包含 h:form 内的组件相关的消息? 我不喜欢用单独的h:message来使我的代码膨胀。每个输入组件的
我下载了示例代码和 cpp 文件,其中包含 list.h、queue.h 和 vector.h 等头文件,如果我尝试构建,我会收到“ fatal error :没有这样的文件或目录编译终止”我想我应该
我有一个编译成功的桌面项目,但是在我向项目添加新配置以支持 Windows Mobile 平台后,我收到以下错误: error C2146: syntax error : missing ';' be
有很多关于这个错误的帖子,但我无法解决它,我希望你能拿出解决方案。我在 Ubuntu 机器上。 ~/graphmap2$ 在这个文件夹中,我下载了 zlib。可以看图 经过一番谷歌搜索后,我还注意到没
是否可以在 Visual C++ 中使用以下 header : 图.h dos.h bios.h 最佳答案 据我所知,无法在 Visual C++ 中使用它, 与此同时,我希望您关注 Open Wat
我是一名优秀的程序员,十分优秀!