- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
config.ru
require './app'
run Sinatra::Application
gem 文件
source 'http://rubygems.org'
gem 'heroku'
gem 'sinatra'
gem 'thin'
配置文件
web: bundle exec rackup config.ru -p $PORT
这是我的 heroku 日志
2013-08-10T01:21:03.753984+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-08-10T01:21:03.754180+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-08-10T01:21:03.754180+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-08-10T01:21:03.754180+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-08-10T01:21:04.799863+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-10T01:21:04.790161+00:00 heroku[web.1]: Process exited with status 1
2013-08-10T01:21:25.615653+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=beer-voter.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
2013-08-10T01:22:57.223684+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=beer-voter.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
2013-08-10T01:24:34.417907+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by jgallardo720@gmail.com
2013-08-10T01:24:39.051510+00:00 heroku[run.1200]: Awaiting client
2013-08-10T01:24:39.073013+00:00 heroku[run.1200]: Starting process with command `bundle exec rake db:migrate`
2013-08-10T01:24:41.746057+00:00 heroku[run.1200]: State changed from starting to up
2013-08-10T01:24:46.002914+00:00 heroku[run.1200]: Process exited with status 1
2013-08-10T01:24:46.018585+00:00 heroku[run.1200]: State changed from up to complete
2013-08-10T01:26:31.150052+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=beer-voter.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
2013-08-10T01:29:07.598813+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-10T01:29:11.616194+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 26270`
2013-08-10T01:29:15.827320+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./app (LoadError)
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/config.ru:in `new'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2013-08-10T01:29:15.827512+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2013-08-10T01:29:15.827799+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2013-08-10T01:29:17.475127+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-10T01:29:17.455240+00:00 heroku[web.1]: Process exited with status 1
2013-08-10T01:39:12.643653+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-10T01:39:15.630798+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 26323`
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/config.ru:in `new'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-08-10T01:39:17.108286+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./app (LoadError)
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-08-10T01:39:17.108286+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2013-08-10T01:39:17.108500+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2013-08-10T01:39:18.608414+00:00 heroku[web.1]: Process exited with status 1
2013-08-10T01:39:18.624453+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-10T01:49:20.129509+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-10T01:49:25.310821+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 31607`
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'
2013-08-10T01:49:29.293008+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./app (LoadError)
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/config.ru:in `new'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2013-08-10T01:49:29.293008+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2013-08-10T01:49:29.293225+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-08-10T01:49:30.776901+00:00 heroku[web.1]: Process exited with status 1
2013-08-10T01:49:30.787136+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-10T01:59:30.949128+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-10T01:59:34.018512+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 53386`
2013-08-10T01:59:35.253202+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./app (LoadError)
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/config.ru:in `new'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-08-10T01:59:35.253202+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2013-08-10T01:59:36.518901+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-10T01:59:36.501648+00:00 heroku[web.1]: Process exited with status 1
2013-08-10T01:59:35.253385+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-08-10T02:00:18.345271+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=beer-voter.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
2013-08-10T02:02:01.913591+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=beer-voter.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
是的,这个应用程序在本地运行
当我运行 heroku ps
时出现此错误
=== web (1X): `bundle exec rackup config.ru -p $PORT`
web.1: crashed 2013/08/09 19:10:11 (~ 8m ago)
最佳答案
这两行似乎说明了问题:
2013-08-10T01:29:15.827320+00:00 app[web.1]: /app/config.ru:1:in `require': cannot load such file -- ./app (LoadError)
2013-08-10T01:29:15.827320+00:00 app[web.1]: from /app/config.ru:1:in `block in <main>'
该应用正在尝试加载您的 app.rb
文件,但它不存在。您的应用程序在本地运行的事实表明该文件尚未添加到 git。添加此文件(以及您的应用使用的任何其他文件),提交,然后再次推送:
$ git add app.rb
$ git commit
$ git push heroku master
关于ruby - Sinatra 应用程序未部署到 Heroku,rackup 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18157885/
我目前正在做一个需要在 ubuntu 11.04 上使用 rackup 命令的项目,但我收到一个错误:-bash: rackup: command not found。我已经安装了 rails 和 r
这个问题在这里已经有了答案: 关闭 10 年前。 Possible Duplicate: Error loading Active Record gem with sinatra app using
tl;dr 如何通过对 config.ru 进行自定义,让单个 Sinatra 应用程序在不同的服务器上以截然不同的方式启动? 背景 我有一个使用 Sinatra 编写的 Web 应用程序,它在不同的
如何配置 Netbeans Ruby 项目,使其不运行 Ruby 解释器(Ruby“平台”),而是启动 rackup? 谢谢 最佳答案 我试图自己做一些类似的事情:通过 Rack 容器运行我的项目(它
我正在尝试设置服务器选项 I.E.端口、主机等,但我无法从 config.ru 文件中找到有关如何执行此操作的任何信息。 我尝试将配置选项放入散列中,然后执行以下操作: configure { set
我找到了 this question ,这并没有真正解决我的问题,但至少可以让我以正确的方式表达我的问题。 我有一个简单的 Camping 应用程序,我通过 rackup 启动它。我希望能够通过安全连
我正在开发一个 Sinatra 应用程序,我正在使用“rackup”来启动 Webrick。我应该怎么做才能阻止它?现在我正在使用 Ctrl+Z,它似乎好像停止了。然而,当我尝试再次启动它时,它会说端
当我尝试启动我的 unicorn 服务器时,我得到了下一个堆栈跟踪:无法理解 rackup 文件有什么问题?为什么它不可读? sites@bck:~/fatfreecrm$ /home/sites/.
我是 ruby 新手,正在学习 Sinatra。虽然通过要求 'sinatra' 并直接在其下设置路由来创建 Sinatra 站点非常简单且有据可查,但是通过要求 'sinatra/base' 和
Sinatra 新手,刚刚启动并运行开发服务器,但 rackup 使用 WEBrick 而不是 Thin,Thin > gem 已经安装,这必须是一个简单的配置调整,但我不知道在哪里。哦,当我更改源代
config.ru require './app' run Sinatra::Application gem 文件 source 'http://rubygems.org' gem 'heroku'
gem 文件 source :rubygems gem 'sinatra' 配置.ru require 'app' run App 应用.rb require 'bundler/setup' requ
我有一个使用模块化样式配置的简单 Sinatra 应用程序。当我按照自述文件中的建议使用 rackup -p 4567 启动应用程序时,不提供公用文件夹中的静态 Assets 。但是当我使用 shot
将模块化 Sinatra 应用程序部署到 Heroku 时,我不断收到此错误: bundler: failed to load command: rackup (/app/vendor/bundle/
我有一个 ruby Rack 应用程序,我想在 FCGI 后面进行管理。 我应该在 dispatch.fcgi 文件中放入什么,以便执行的应用程序匹配/使用 config.ru 的内容? 我希望
我注意到的唯一区别是 rails server 在端口 3000 上启动服务器,而 rackup 在端口 9292 上启动服务器。 还有其他区别吗? 是否有一个而不是另一个的用例? 最佳答案 rail
我的 procfile 中有这个“web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb”。 启动服务器后,我收到以下错误消息。 forema
我有一个 Sinatra“hello world”应用程序,我正尝试使用 jRuby 运行它。它在我运行应用程序时有效,但在我运行 rackup 时无效。谁能告诉我这是怎么回事? 这是应用程序,在文件
我有一个 Rails 应用程序,通过 Capistrano 部署到 Ubuntu 14.04 Amazon EC2 实例,然后通过标准“upstart”服务启动 Unicorn 服务器。 # Upst
我指的是 pub railscast tutorial并已正确执行所有步骤,但在运行最后一个命令时,即 rackup private_pub.ru -s thin -E production 为了架设
我是一名优秀的程序员,十分优秀!