- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
有一个正在开发但已部署问题的工作 Rails 应用程序。最近在工作,但在添加 clouldmailin 后似乎会导致一些依赖性问题?非常感谢任何有助于理解日志中问题的帮助。
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/config.ru:4:in `require'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/config.ru:4:in `block in <main>'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/builder.rb:51:in `instance_eval'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/builder.rb:51:in `initialize'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/config.ru:1:in `new'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/builder.rb:40:in `eval'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/server.rb:200:in `app'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/commands/server.rb:46:in `app'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/builder.rb:40:in `parse_file'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/server.rb:252:in `start'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/commands/server.rb:70:in `start'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2012-01-11T23:35:07+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/r ailties-3.1.3/lib/rails/commands.rb:54:in `block in <top (required)>'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/commands.rb:49:in `tap'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/server.rb:301:in `wrapped_app'
2012-01-11T23:35:07+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/commands.rb:49:in `<top (required)>'
2012-01-11T23:35:07+00:00 app[web.1]: from script/rails:6:in `require'
2012-01-11T23:35:08+00:00 heroku[web.1]: State changed from starting to crashed
2012-01-11T23:35:08+00:00 heroku[web.1]: Process exited
2012-01-11T23:45:00+00:00 heroku[web.1]: State changed from crashed to created
2012-01-11T23:45:00+00:00 heroku[web.1]: State changed from created to starting
2012-01-11T23:45:06+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 52293`
2012-01-11T23:45:09+00:00 app[web.1]:
2012-01-11T23:45:09+00:00 app[web.1]: gem install bson_ext
2012-01-11T23:45:09+00:00 app[web.1]: You can install the extension as follows:
2012-01-11T23:45:09+00:00 app[web.1]: bson_ext gem is in your load path and that the bson_ext and mongo gems are of the same version.
2012-01-11T23:45:09+00:00 app[web.1]:
2012-01-11T23:45:09+00:00 app[web.1]:
2012-01-11T23:45:09+00:00 app[web.1]: **Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance.
2012-01-11T23:45:09+00:00 app[web.1]: If you continue to receive this message after installing, make sure that the
2012-01-11T23:45:15+00:00 app[web.1]: => Booting WEBrick
2012-01-11T23:45:15+00:00 app[web.1]: => Call with -d to detach
2012-01-11T23:45:15+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-01-11T23:45:15+00:00 app[web.1]: => Rails 3.1.3 application starting in production on http://0.0.0.0:52293
2012-01-11T23:45:15+00:00 app[web.1]: Exiting
2012-01-11T23:45:15+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': /app/app/controllers/ email_controllers.rb:1: class/module name must be CONSTANT (SyntaxError)
2012-01-11T23:45:15+00:00 app[web.1]: class emailcontroller < applicationcontroller
2012-01-11T23:45:15+00:00 app[web.1]: ^
2012-01-11T23:45:15+00:00 app[web.1]: /app/app/controllers/email_controllers.rb:3: syntax error, unexpected ':', expecting keyword_end
2012-01-11T23:45:15+00:00 app[web.1]: ^
2012-01-11T23:45:15+00:00 app[web.1]: /app/app/controllers/email_controllers.rb:8: syntax error, unexpected tLBRACK, expecting keyword_do or '{' or '('
2012-01-11T23:45:15+00:00 app[web.1]: @inbound_email = InboundEmail.new(:text => params ["text"],
2012-01-11T23:45:15+00:00 app[web.1]: ^
2012-01-11T23:45:15+00:00 app[web.1]: /app/app/controllers/email_controllers.rb:8: syntax error, unexpected ',', expecting keyword_end
2012-01-11T23:45:15+00:00 app[web.1]: ^
2012-01-11T23:45:15+00:00 app[web.1]: :to => clean_Field(params["to"]),
2012-01-11T23:45:15+00:00 app[web.1]: /app/app/controllers/email_controllers.rb:10: syntax error, unexpected tASSOC, expecting tCOLON2 or '[' or '.'
2012-01-11T23:45:15+00:00 app[web.1]: /app/app/controllers/email_controllers.rb:13: syntax error, unexpected ')', expecting keyword_end
2012-01-11T23:45:15+00:00 app[web.1]: /app/app/controllers/email_controllers.rb:22: syntax error, unexpected '=', expecting keyword_end
2012-01-11T23:45:15+00:00 app[web.1]: flash [:notice] = "ooops we had an error"
2012-01-11T23:45:15+00:00 app[web.1]: ^
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:225:in `load_dependency'
2012-01-11T23:45:15+00:00 app[web.1]: /app/app/controllers/email_controllers.rb:10: syntax error, unexpected ',', expecting keyword_end
2012-01-11T23:45:15+00:00 app[web.1]: skip_before_filters: verify_authenticity_token
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:348:in `require_or_load'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:302:in `depend_on'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ activesupport-3.1.3/lib/active_support/dependencies.rb:214:in `require_dependency'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/engine.rb:417:in `block (2 levels) in eager_load!'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/engine.rb:416:in `block in eager_load!'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/engine.rb:414:in `each'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/engine.rb:416:in `each'
2012-01-11T23:45:15+00:00 app[web.1]: /app/app/controllers/email_controllers.rb:11: syntax error, unexpected ',', expecting keyword_end
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/engine.rb:414:in `eager_load!'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/application/finisher.rb:51:in `block in <module:Finisher>'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/initializable.rb:30:in `run'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/r ailties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/r ailties-3.1.3/lib/rails/initializable.rb:54:in `each'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/r ailties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/config.ru:4:in `block in <main>'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/config.ru:4:in `require'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/builder.rb:51:in `instance_eval'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/config.ru:1:in `new'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/config.ru:1:in `<main>'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/builder.rb:40:in `eval'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/builder.rb:40:in `parse_file'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/server.rb:200:in `app'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/commands/server.rb:46:in `app'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/server.rb:301:in `wrapped_app'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/server.rb:252:in `start'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ rack-1.3.5/lib/rack/builder.rb:51:in `initialize'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/commands/server.rb:70:in `start'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/commands.rb:54:in `block in <top (required)>'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/commands.rb:49:in `tap'
2012-01-11T23:45:15+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/ railties-3.1.3/lib/rails/commands.rb:49:in `<top (required)>'
2012-01-11T23:45:15+00:00 app[web.1]: from script/rails:6:in `require'
2012-01-11T23:45:15+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-01-11T23:45:17+00:00 heroku[web.1]: Process exited
2012-01-11T23:45:16+00:00 heroku[web.1]: State changed from starting to crashed
2012-01-11T23:45:21+00:00 heroku[router]: Error H10 (App crashed) -> GET www.domain.me/ dyno= queue= wait= service= status=503 bytes=
2012-01-11T23:45:21+00:00 heroku[router]: Error H10 (App crashed) -> GET www.domain.me/favicon.ico dyno= queue= wait= service= status=503 bytes=
最佳答案
正如@muistooshort 所说和日志指出的那样,类名需要大写,因为这就是 ruby 识别哪些类和对象类型与常规变量名或方法调用的方式。
这是您日志的相关部分:类/模块名称必须是 CONSTANT
因此,将您的电子邮件 Controller 类声明更改为:
class EmailController < ApplicationController
并重新部署。
关于ruby-on-rails - Heroku 上的应用程序错误 : An error occurred in the application and your page could not be served,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8828616/
我是 PHP 新手。我在 WordPress 中遇到了这种语法.该代码的最后一行是做什么的? $page = $_SERVER['REQUEST_URI']; $page = str_replace(
为了清楚起见 - 这是我在这个问题中谈论的盒子的图片: 背景:我为客户构建了一个相对复杂的 WP 网站,它更像是一个 CMS 而不是博客,并且依赖于正在构建的页面层次结构。 (嗯,它们实际上是设置了
GitHub Help显示了 GitHub Pages 的以下选项: gh-pages 分行 主分支 master 分支/docs 文件夹 那么我们可以使用名称不是 master 或 gh-pages
我正在使用 AngularJS 框架为我的前端开发一个 Web 应用程序。对于我的登录页面,我必须阻止用户浏览除登录页面和注册之外的其他页面。但是我现在所做的代码也阻止用户导航到注册页面。以下是我的代
如果不将/1 粘贴到 url 上,是否可以改变 Zend_Paginator 来处理 URL?当前用户转到/aaron/studio。然后用户应该点击页面并开始访问 URL,例如:/aaron/stu
目前,我创建了一个可以生成PDF的系统。 PDF 中的数据来自 MySQL 数据库。现在,我像这样显示数据 第一页:仅显示一条数据。 第二页文字:将显示数据(每页最多 3 个数据) 说得更清楚一点,比
我正在尝试构建我的 ASP.NET MVC 4.5 项目以使用搜索引擎友好的 URL。我正在使用以下路由映射。 routes.MapRoute( name: "Default", ur
我为打印按钮使用了以下代码: Data.str = null; //Data.str = textBox24.Text.ToString(); string s = "select * from te
我们有一个带有两个 View 的单页应用程序(本质上是一个项目列表和所选项目的详细信息页面)。两个 View 都在单独的 html 文件中,我们使用 sammy.js 在页面之间进行转换/导航。在我们
(如果有人需要更多信息或更好的描述,请告诉我) 您好,我从这里添加了 viewPagerLibrary:http://viewpagerindicator.com/#introduction今天在我的
我是网页的新手,刚刚开始学习它。在创建新的 Razor 网站后,当我点击添加新项目时,我会看到可以添加的项目的多个选项。它们是: Layout Page(Razor) 这些类似于Master Page
我正在尝试使用 activeadmin 和 awesome_nested_set 创建页面模型。我一直在试图弄清楚如何使用正确的尾随 slug(例如/page1/page1subpage/a-subp
我正在尝试将 DotNetOpenAuth 与 Razor/MVC3 一起使用。大多数 DotNetOpenAuth HTML 助手都接受 System.Web.UI.Page 作为参数之一,使用 W
在我们的应用程序中,当我们在某些页面之间导航时,我们会在进入下一页之前发出服务器请求。发生这种情况时,当前页面上会显示加载图形。奇怪的是,在等待服务器响应完成时,下一页的样式会应用到当前页面。这会导致
我正在使用 ASP.NET Core 3.1 MVC 和 Razor 页面构建 Web 应用程序。 我是 Razor 页面的新手。 我使用上面的方法创建了一个基本应用程序。我想在应用程序启动时加载登录
我遇到了一个我似乎无法解释的问题。我在 Umbraco 中设置了一个主模板和 2 个子模板,但出现以下错误: Content controls have to be top-level control
我正在创建一个网络应用程序,允许用户选择他们当前的部门、他们将临时借调到哪个部门、他们正在执行的任务以及在任务上花费的时间。我需要写一些声明,根据他们当前部门的选择来确定他们所在的团队(当前的或新的)
当我导航到一个页面时,我得到了404错误页面,该页面说,在我刷新浏览器之前,没有包含此URL的页面,然后该页面才会显示。。我尝试使用@REACH/ROUTER来导航,而不是使用REACT-ROUTER
我正在使用 Html2Pdf 将一些 HTML 文件转换为 PDF。我还需要添加分页符来划分文档的各个部分。为此,我使用 标签。 我有以下 HTML 片段: ...
我正在使用另一个静态网站生成器,我希望能够将源文件(以markdown格式)以及生成的网站 checkin 到我的username.github.com存储库中。因此,很像Jekyll,但我没有使用J
我是一名优秀的程序员,十分优秀!