- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我正在学习 http://onemonth.com 上的教程,我在其中创建了我的 Rails 应用程序。我被要求使用 Heroku 让我的应用在线上线。我按照步骤通过 SSH key 将我的 Github 帐户链接到 Heroku。但是,当我使用命令 heroku create
然后复制提供的链接时,在本例中为 http://young-peak-7631.herokuapp.com/ ,我在浏览器中收到“应用程序错误”。
这是确切的信息:
“应用程序发生错误,无法提供您的页面。请稍后重试。如果您是应用程序所有者,请查看您的日志以了解详细信息。”
请参阅下面的 Heroku 错误页面图片 这是我的日志:
2014-07-01T06:50:55.157229+00:00 app[web.1]: Rendered layouts/_header.html.erb (0.7ms)
2014-07-01T06:50:56.211672+00:00 heroku[router]: at=info method=GET path="/about" host=omr-photoshare.herokuapp.com request_id=0b8e9a43-5ffd-4bae-aa4f-61e9f87dfdfc fwd="65.78.4.236" dyno=web.1 connect=2ms service=192ms status=304 bytes=845
2014-07-01T06:50:56.025883+00:00 app[web.1]: Started GET "/about" for 65.78.4.236 at 2014-07-01 06:50:56 +0000
2014-07-01T06:50:56.082614+00:00 app[web.1]: Rendered pages/about.html.erb within layouts/application (0.2ms)
2014-07-01T06:50:56.174581+00:00 app[web.1]: Completed 200 OK in 95ms (Views: 7.0ms | ActiveRecord: 86.8ms)
2014-07-01T06:50:56.079586+00:00 app[web.1]: Processing by PagesController#about as HTML
2014-07-01T06:50:56.173874+00:00 app[web.1]: Rendered layouts/_header.html.erb (90.3ms)
2014-07-01T06:50:57.026362+00:00 heroku[router]: at=info method=GET path="/users/edit" host=omr-photoshare.herokuapp.com request_id=9e7dbd9b-1e90-4cf0-b422-a39fc4dd86af fwd="65.78.4.236" dyno=web.1 connect=4ms service=26ms status=200 bytes=4509
2014-07-01T06:50:57.023820+00:00 app[web.1]: Rendered devise/registrations/edit.html.erb within layouts/application (6.5ms)
2014-07-01T06:50:57.007189+00:00 app[web.1]: Started GET "/users/edit" for 65.78.4.236 at 2014-07-01 06:50:57 +0000
2014-07-01T06:50:57.027133+00:00 app[web.1]: Completed 200 OK in 16ms (Views: 12.8ms | ActiveRecord: 1.3ms)
2014-07-01T06:50:57.010704+00:00 app[web.1]: Processing by Devise::RegistrationsController#edit as HTML
2014-07-01T06:50:57.026562+00:00 app[web.1]: Rendered layouts/_header.html.erb (0.5ms)
2014-07-01T06:50:58.037348+00:00 heroku[router]: at=info method=POST path="/users/sign_out" host=omr-photoshare.herokuapp.com request_id=62ed2279-f63e-4c4f-9721-7b1361348276 fwd="65.78.4.236" dyno=web.1 connect=32ms service=41ms status=302 bytes=931
2014-07-01T06:50:58.138958+00:00 heroku[router]: at=info method=GET path="/" host=omr-photoshare.herokuapp.com request_id=d36b09ab-feb9-4e13-8b07-97bda734f4cd fwd="65.78.4.236" dyno=web.1 connect=1ms service=72ms status=200 bytes=2809
2014-07-01T06:50:58.004542+00:00 app[web.1]: Started DELETE "/users/sign_out" for 65.78.4.236 at 2014-07-01 06:50:58 +0000
2014-07-01T06:50:58.034982+00:00 app[web.1]: Completed 302 Found in 25ms (ActiveRecord: 12.2ms)
2014-07-01T06:50:58.119933+00:00 app[web.1]: Processing by PagesController#home as HTML
2014-07-01T06:50:58.137550+00:00 app[web.1]: Rendered layouts/_header.html.erb (0.5ms)
2014-07-01T06:50:58.009338+00:00 app[web.1]: Processing by Devise::SessionsController#destroy as HTML
2014-07-01T06:50:58.116047+00:00 app[web.1]: Started GET "/" for 65.78.4.236 at 2014-07-01 06:50:58 +0000
2014-07-01T06:50:58.009357+00:00 app[web.1]: Parameters: {"authenticity_token"=>"5AnEyKY75EbCUcrc50OZjx2MOguNlKFceSaDg5DoFzw="}
2014-07-01T06:50:58.136033+00:00 app[web.1]: Rendered pages/home.html.erb within layouts/application (14.2ms)
2014-07-01T06:50:58.034741+00:00 app[web.1]: Redirected to http://omr-photoshare.herokuapp.com/
2014-07-01T06:50:58.138057+00:00 app[web.1]: Completed 200 OK in 18ms (Views: 16.7ms | ActiveRecord: 0.0ms)
2014-07-01T06:51:00.169842+00:00 heroku[router]: at=info method=GET path="/users/sign_in" host=omr-photoshare.herokuapp.com request_id=102f1369-f2c7-4c60-95fd-fdcf94c91f3b fwd="65.78.4.236" dyno=web.1 connect=1ms service=95ms status=200 bytes=3735
2014-07-01T06:51:00.148527+00:00 app[web.1]: Started GET "/users/sign_in" for 65.78.4.236 at 2014-07-01 06:51:00 +0000
2014-07-01T06:51:00.163967+00:00 app[web.1]: Rendered devise/shared/_links.erb (1.7ms)
2014-07-01T06:51:00.164009+00:00 app[web.1]: Rendered devise/sessions/new.html.erb within layouts/application (6.6ms)
2014-07-01T06:51:00.165306+00:00 app[web.1]: Rendered layouts/_header.html.erb (0.7ms)
2014-07-01T06:51:00.152352+00:00 app[web.1]: Processing by Devise::SessionsController#new as HTML
2014-07-01T06:51:00.165745+00:00 app[web.1]: Completed 200 OK in 13ms (Views: 10.2ms | ActiveRecord: 0.0ms)
2014-07-01T06:51:01.519186+00:00 heroku[router]: at=info method=POST path="/users/sign_in" host=omr-photoshare.herokuapp.com request_id=2e71a5f1-e10a-4158-af5c-6f80f8aac4a3 fwd="65.78.4.236" dyno=web.1 connect=9ms service=144ms status=302 bytes=1041
2014-07-01T06:51:01.575579+00:00 heroku[router]: at=info method=GET path="/" host=omr-photoshare.herokuapp.com request_id=304d9c4f-d607-4f37-aa75-bf07c48ace45 fwd="65.78.4.236" dyno=web.1 connect=3ms service=25ms status=200 bytes=2911
2014-07-01T06:51:01.571496+00:00 app[web.1]: Processing by PagesController#home as HTML
2014-07-01T06:51:01.518046+00:00 app[web.1]: Completed 302 Found in 133ms (ActiveRecord: 12.5ms)
2014-07-01T06:51:01.381342+00:00 app[web.1]: Started POST "/users/sign_in" for 65.78.4.236 at 2014-07-01 06:51:01 +0000
2014-07-01T06:51:01.576450+00:00 app[web.1]: Rendered layouts/_header.html.erb (0.5ms)
2014-07-01T06:51:01.384466+00:00 app[web.1]: Processing by Devise::SessionsController#create as HTML
2014-07-01T06:51:01.384511+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"+8dZCduvFyzofV4G28jmxjsOXYrweHJ+cdJe3lEWPTQ=", "user"=>{"email"=>"cghazanfar10@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
2014-07-01T06:51:01.517874+00:00 app[web.1]: Redirected to http://omr-photoshare.herokuapp.com/
2014-07-01T06:51:01.568980+00:00 app[web.1]: Started GET "/" for 65.78.4.236 at 2014-07-01 06:51:01 +0000
2014-07-01T06:51:01.575119+00:00 app[web.1]: Rendered pages/home.html.erb within layouts/application (2.4ms)
2014-07-01T06:51:01.576943+00:00 app[web.1]: Completed 200 OK in 5ms (Views: 3.1ms | ActiveRecord: 1.4ms)
2014-07-01T07:53:44.045215+00:00 heroku[web.1]: State changed from up to down
2014-07-01T07:53:44.044809+00:00 heroku[web.1]: Idling
2014-07-01T07:53:47.433692+00:00 app[web.1]: [2014-07-01 07:53:47] FATAL SignalException: SIGTERM
2014-07-01T07:53:47.433697+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
2014-07-01T07:53:47.433700+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
2014-07-01T07:53:47.433702+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:32:in `start'
2014-07-01T07:53:47.433704+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:160:in `start'
2014-07-01T07:53:47.433753+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:14:in `run'
2014-07-01T07:53:47.433755+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
2014-07-01T07:53:47.433757+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/server.rb:69:in `start'
2014-07-01T07:53:47.433758+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2014-07-01T07:53:47.433760+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:76:in `tap'
2014-07-01T07:53:47.433761+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:76:in `server'
2014-07-01T07:53:47.433763+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2014-07-01T07:53:47.433764+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>'
2014-07-01T07:53:47.433766+00:00 app[web.1]: bin/rails:8:in `require'
2014-07-01T07:53:47.433767+00:00 app[web.1]: bin/rails:8:in `<main>'
2014-07-01T07:53:47.433773+00:00 app[web.1]: [2014-07-01 07:53:47] INFO going to shutdown ...
2014-07-01T07:53:47.433817+00:00 app[web.1]: [2014-07-01 07:53:47] INFO WEBrick::HTTPServer#start done.
2014-07-01T07:53:47.433890+00:00 app[web.1]: Exiting
2014-07-01T07:53:49.611381+00:00 heroku[web.1]: Process exited with status 143
2014-07-01T07:53:46.855962+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-07-01T15:33:01.545336+00:00 heroku[web.1]: Unidling
2014-07-01T15:33:01.545628+00:00 heroku[web.1]: State changed from down to starting
2014-07-01T15:33:08.727524+00:00 app[web.1]: [2014-07-01 15:33:08] INFO WEBrick 1.3.1
2014-07-01T15:33:08.727547+00:00 app[web.1]: [2014-07-01 15:33:08] INFO ruby 2.0.0 (2014-05-08) [x86_64-linux]
2014-07-01T15:33:08.727961+00:00 app[web.1]: [2014-07-01 15:33:08] INFO WEBrick::HTTPServer#start: pid=2 port=36532
2014-07-01T15:33:04.638475+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 36532 -e production`
2014-07-01T15:33:09.317544+00:00 heroku[web.1]: State changed from starting to up
2014-07-01T15:33:10.624767+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=omr-photoshare.herokuapp.com request_id=10c1d02a-1e17-4a48-9838-c35c2d530b52 fwd="66.249.83.39" dyno=web.1 connect=4ms service=8ms status=200 bytes=228
2014-07-01T16:38:20.572132+00:00 heroku[web.1]: State changed from up to down
2014-07-01T16:38:20.571809+00:00 heroku[web.1]: Idling
2014-07-01T16:38:25.614240+00:00 app[web.1]: [2014-07-01 16:38:25] FATAL SignalException: SIGTERM
2014-07-01T16:38:25.614249+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
2014-07-01T16:38:25.614252+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
2014-07-01T16:38:25.614254+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:32:in `start'
2014-07-01T16:38:25.614255+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:160:in `start'
2014-07-01T16:38:25.614257+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:14:in `run'
2014-07-01T16:38:25.614260+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/server.rb:69:in `start'
2014-07-01T16:38:25.614258+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
2014-07-01T16:38:25.614262+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2014-07-01T16:38:25.614268+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>'
2014-07-01T16:38:25.614263+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:76:in `tap'
2014-07-01T16:38:25.614342+00:00 app[web.1]: [2014-07-01 16:38:25] INFO going to shutdown ...
2014-07-01T16:38:25.614455+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-07-01T16:38:25.614272+00:00 app[web.1]: bin/rails:8:in `<main>'
2014-07-01T16:38:25.614452+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-07-01T16:38:25.614265+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:76:in `server'
2014-07-01T16:38:25.614266+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2014-07-01T16:38:25.614270+00:00 app[web.1]: bin/rails:8:in `require'
2014-07-01T16:38:25.614406+00:00 app[web.1]: [2014-07-01 16:38:25] INFO WEBrick::HTTPServer#start done.
2014-07-01T16:38:25.614450+00:00 app[web.1]: => Rails 4.1.1 application starting in production on http://0.0.0.0:36532
2014-07-01T16:38:25.614475+00:00 app[web.1]: Exiting
2014-07-01T16:38:25.614448+00:00 app[web.1]: => Booting WEBrick
2014-07-01T16:38:25.614453+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2014-07-01T16:38:24.918023+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-07-01T16:38:28.512103+00:00 heroku[web.1]: Process exited with status 143
我看了这个问题的一些答案。大多数人说 Heroku 不支持 sqlite3 并且我需要将我的数据库转换为 PostgreSQL
附加信息:
gem 文件
source 'https://rubygems.org'
gem 'rails', '4.1.1'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'bootstrap-sass'
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spring', group: :development
config/database.yml
default: &default
adapter: sqlite3
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
test:
<<: *default
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3
感谢您以后的帮助...
最佳答案
解决此问题的最简单方法是在 Gemfile 中创建生产组:
group :production do
gem 'pg'
end
然后在您的终端(在项目路径中)运行:
bundle install
捆绑成功后,您需要更改 config/database.yml 文件:
production:
adapter: postgresql
encoding: utf8
database: your_database_name
pool: 5
username: postgres_username
password: postgres_password
host: 127.0.0.1
这应该可以解决您更改数据库适配器的问题。附言。注意 database.yml 文件中的缩进,这很重要。
关于ruby-on-rails - 使用 Heroku 创建命令时出现 Heroku 应用程序错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24420046/
SQLite、Content provider 和 Shared Preference 之间的所有已知区别。 但我想知道什么时候需要根据情况使用 SQLite 或 Content Provider 或
警告:我正在使用一个我无法完全控制的后端,所以我正在努力解决 Backbone 中的一些注意事项,这些注意事项可能在其他地方更好地解决......不幸的是,我别无选择,只能在这里处理它们! 所以,我的
我一整天都在挣扎。我的预输入搜索表达式与远程 json 数据完美配合。但是当我尝试使用相同的 json 数据作为预取数据时,建议为空。点击第一个标志后,我收到预定义消息“无法找到任何内容...”,结果
我正在制作一个模拟 NHL 选秀彩票的程序,其中屏幕右侧应该有一个 JTextField,并且在左侧绘制弹跳的选秀球。我创建了一个名为 Ball 的类,它实现了 Runnable,并在我的主 Draf
这个问题已经有答案了: How can I calculate a time span in Java and format the output? (18 个回答) 已关闭 9 年前。 这是我的代码
我有一个 ASP.NET Web API 应用程序在我的本地 IIS 实例上运行。 Web 应用程序配置有 CORS。我调用的 Web API 方法类似于: [POST("/API/{foo}/{ba
我将用户输入的时间和日期作为: DatePicker dp = (DatePicker) findViewById(R.id.datePicker); TimePicker tp = (TimePic
放宽“邻居”的标准是否足够,或者是否有其他标准行动可以采取? 最佳答案 如果所有相邻解决方案都是 Tabu,则听起来您的 Tabu 列表的大小太长或您的释放策略太严格。一个好的 Tabu 列表长度是
我正在阅读来自 cppreference 的代码示例: #include #include #include #include template void print_queue(T& q)
我快疯了,我试图理解工具提示的行为,但没有成功。 1. 第一个问题是当我尝试通过插件(按钮 1)在点击事件中使用它时 -> 如果您转到 Fiddle,您会在“内容”内看到该函数' 每次点击都会调用该属
我在功能组件中有以下代码: const [ folder, setFolder ] = useState([]); const folderData = useContext(FolderContex
我在使用预签名网址和 AFNetworking 3.0 从 S3 获取图像时遇到问题。我可以使用 NSMutableURLRequest 和 NSURLSession 获取图像,但是当我使用 AFHT
我正在使用 Oracle ojdbc 12 和 Java 8 处理 Oracle UCP 管理器的问题。当 UCP 池启动失败时,我希望关闭它创建的连接。 当池初始化期间遇到 ORA-02391:超过
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve
引用这个plunker: https://plnkr.co/edit/GWsbdDWVvBYNMqyxzlLY?p=preview 我在 styles.css 文件和 src/app.ts 文件中指定
为什么我的条形这么细?我尝试将宽度设置为 1,它们变得非常厚。我不知道还能尝试什么。默认厚度为 0.8,这是应该的样子吗? import matplotlib.pyplot as plt import
当我编写时,查询按预期执行: SELECT id, day2.count - day1.count AS diff FROM day1 NATURAL JOIN day2; 但我真正想要的是右连接。当
我有以下时间数据: 0 08/01/16 13:07:46,335437 1 18/02/16 08:40:40,565575 2 14/01/16 22:2
一些背景知识 -我的 NodeJS 服务器在端口 3001 上运行,我的 React 应用程序在端口 3000 上运行。我在 React 应用程序 package.json 中设置了一个代理来代理对端
我面临着一个愚蠢的问题。我试图在我的 Angular 应用程序中延迟加载我的图像,我已经尝试过这个2: 但是他们都设置了 src attr 而不是 data-src,我在这里遗漏了什么吗?保留 d
我是一名优秀的程序员,十分优秀!