在 ubuntu 10.04 LTS 上使用 nginx 和 mongrel 集群部署 Rails 应用程序

在 ubuntu 10.04 LTS 上使用 nginx 和 mongrel 集群部署 Rails 应用程序

我在虚拟机上安装了mongrel集群和nginx模块。工作环境是

ruby 1.9.2
rails 3.0.6
rubygems 1.7.2
mongrel_cluster 1.0.5
mongrel 1.2

当我启动 mongrel 集群时,它抛出了以下错误。应用程序处于离线状态。请给我一些解决方案。我尝试了很多谷歌解决方案,但没有一个能解决这个问题。任何帮助我都会很感激。

*starting port 8011
NOTE: Gem::SourceIndex.from_installed_gems is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_installed_gems called from /usr/local/lib/ruby/gems/1.9.1/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:109
.
NOTE: from_installed_gems(arg) is deprecated. From /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb:62:in `block (2 levels) in deprecate'
NOTE: Gem::SourceIndex.from_gems_in is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_gems_in called from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:50
.
** !!! PID file tmp/pids/mongrel.8011.pid already exists.  Mongrel could be running already.  Check your log/mongrel.8011.log for errors.
** !!! Exiting with error.  You must stop mongrel and clear the .pid before I'll attempt a start.*

编辑:

谢谢@dioms和@Hmallett。我更新了gems并从tmp/pids中删除了已经存在的pid文件,然后重新启动了d集群。它给了我d错误

NOTE: Gem::SourceIndex.from_installed_gems is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_installed_gems called from /usr/local/lib/ruby/gems/1.9.1/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:109
.
NOTE: from_installed_gems(arg) is deprecated. From /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb:62:in `block (2 levels) in deprecate'
NOTE: Gem::SourceIndex.from_gems_in is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_gems_in called from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:50
.
starting port 8009
NOTE: Gem::SourceIndex.from_installed_gems is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex.from_installed_gems called from /usr/local/lib/ruby/gems/1.9.1/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:109

请给我一些解决方案。我是服务器安装的新手,我不确定在配置脚本中到底要包含什么。

答案1

看起来你的一些宝石已被弃用

尝试这个来更新它们

gem update && gem update --system

答案2

tmp/pids/mongrel.8011.pid 存在吗?

您确定杂种尚未运行并监听端口 8011 吗?

如果是这样,请 rm tmp/pids/mogrel.8011.pid 并尝试重新启动。

弃用的 gem 警告只是一个警告,最后两行是它无法启动的线索。

另外,看起来您正在运行 Ruby 1.9.1,但我认为如果您想使用 ruby​​ 1.9,rails 3 需要 1.9.2。

相关内容