2013-04-11 154 views
0

我在Heroku上使用Thin作为我的服务器部署Rails 3.2.11应用程序。当我推到Heroku时,它启动Thin很好,但是它似乎也尝试启动WEBrick。Heroku Rails应用程序R11错误

我Procfile如下:

网站:束EXEC轨服务器-p $ PORT薄-e $ RACK_ENV

我的Heroku的日志:

2013-04-11T14:52:28.276634+00:00 heroku[api]: Release v21 created by [email protected] 
2013-04-11T14:52:28.331285+00:00 heroku[api]: Deploy 6f63ed4 by [email protected] 
2013-04-11T14:52:28.432372+00:00 heroku[web.1]: State changed from crashed to starting 
2013-04-11T14:52:28.965697+00:00 heroku[slugc]: Slug compilation finished 
2013-04-11T14:52:30.218480+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 9009 thin -e $RACK_ENV` 
2013-04-11T14:52:32.898285+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-11T14:52:32.897830+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-11T14:52:34.350938+00:00 app[web.1]: [2013-04-11 14:52:34] INFO WEBrick::HTTPServer#start: pid=2 port=2010 
2013-04-11T14:52:34.350132+00:00 app[web.1]: [2013-04-11 14:52:34] INFO WEBrick 1.3.1 
2013-04-11T14:52:34.350707+00:00 app[web.1]: [2013-04-11 14:52:34] WARN TCPServer Error: Address already in use - bind(2) 
2013-04-11T14:52:34.350132+00:00 app[web.1]: [2013-04-11 14:52:34] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux] 
2013-04-11T14:52:34.407830+00:00 heroku[web.1]: Stopping process with SIGKILL 
2013-04-11T14:52:34.407675+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 2010, should be 9009 (see environment variable PORT) 
2013-04-11T14:52:35.572955+00:00 heroku[web.1]: State changed from starting to crashed 
2013-04-11T14:52:35.560772+00:00 heroku[web.1]: Process exited with status 137 

为什么它是这样做的吗?我错过了什么?

回答

0

事实证明,我使用的插件SyntaxHighlighter在其测试目录中有一些文件启动了WEBrick。我只是删除了这些,承诺,推动,它运作良好。

0

尝试使用Thin而不是WEBrick。您可以通过简单地增加给你的Gemfile中做到这一点:

gem 'thin' 

然后运行bundle install,提交新的Gemfile和Gemfile.lock的,然后推到Heroku的。

WEBrick不适用于生产用途。

+0

我使用Thin并成功完成了所有这些步骤。问题是,它正在启动 – 2013-04-11 16:09:15

+0

更新您的问题与更新的错误日志,现在你在薄 – catsby 2013-04-11 16:56:12

+0

另外,发布你的Procfile和输出'$ heroku ps -a app_name' – catsby 2013-04-11 16:56:37

相关问题