DreamHost,Passenger和Rails 3.0.0.rc的机架错误 [英] Rack Error with DreamHost, Passenger, and Rails 3.0.0.rc

查看:69
本文介绍了DreamHost,Passenger和Rails 3.0.0.rc的机架错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:我已经查看了这个问题以及这个问题-可悲的是,无济于事。

Background: I have viewed this question as well as this one - sadly, to no avail.

错误消息(密码)::您已经激活了机架1.1.0,但是您的Gemfile需要机架1.2.1。考虑使用bundle exec。

Error Message (Passenger): You have already activated rack 1.1.0, but your Gemfile requires rack 1.2.1. Consider using bundle exec.

我的Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.0.0.rc'
gem 'nifty-generators' 
gem 'nokogiri'
group :after_initialize do
    gem 'feedzirra'
end

我的Gemfile.lock有这条线:

my Gemfile.lock has this line:

rack (1.2.1)

我的environment.rb位于顶部:

my environment.rb has this line at the top:

ENV['GEM_PATH'] = File.expand_path('~/.gems') + ':/usr/lib/ruby/gems/1.8'

我的boot.rb位于顶部:

my boot.rb has this line at the top:

Gem.clear_paths

我在本地正确安装了机架(1.2.1)-我的应用在我的本地主机和1.2.1版上运行良好在终端中出现宝石列表之后。

I have rack (1.2.1) installed correctly locally - my app runs fine on my local host and version 1.2.1 shows up following a "gem list" in the terminal.

在将应用推送到生产服务器之前,我已经将宝石与捆绑包打包在一起。

I have packaged my gems with a "bundle package" before pushing my app to my production server.

我已经关注了部署前ng命令(在我的生产服务器上,从应用程序的根目录开始):

I have run the following command (on my production server, from the root of the app) before deployment:

bundle install --path vendor/bundle --local

在上面的安装命令之后,捆绑检查将返回以下内容:

Following the install command above, a "bundle check" returns this:

The Gemfile's dependencies are satisfied

这是乘客提供的回溯(以及上面提到的错误消息):

And this is the backtrace provided by passenger (along with the Error Message mentioned above):

0   /home/user/.gems/gems/bundler-1.0.0/lib/bundler/runtime.rb      27      in `setup'
1   /home/user/.gems/gems/bundler-1.0.0/lib/bundler/spec_set.rb     12  in `each'
2   /home/user/.gems/gems/bundler-1.0.0/lib/bundler/spec_set.rb     12  in `each'
3   /home/user/.gems/gems/bundler-1.0.0/lib/bundler/runtime.rb  17  in `setup'
4   /home/user/.gems/gems/bundler-1.0.0/lib/bundler.rb  100     in `setup'
5   /home/user/gseeds.mywebsite.com/releases/20100927012812/config/boot.rb  9   
6   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
7   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `require'
8   /home/user/gseeds.mywebsite.com/releases/20100927012812/config/application.rb   1   
9   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
10  /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `require'
11  /home/user/gseeds.mywebsite.com/releases/20100927012812/config/environment.rb   7   
12  /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `gem_original_require'
13  /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in `require'
14  config.ru   3   
15  /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb  46  in `instance_eval'
16  /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb  46  in `initialize'
17  config.ru   1   in `new'
18  config.ru   1 

我想知道是否有人有解决方案吗?

I'm wondering if anyone has come up with a solution to this?

应该注意的是,示例Rails应用程序-又名,运行rails新的appName并将其直接ftp'到DreamHost上的生产服务器上-可以正常运行。因为我想象我的真实应用程序和示例应用程序都具有机架(1.2.1)依赖性,这使我感到困扰。这对我来说意味着,为了绕开DreamHost服务器的精髓,我在某种程度上搞砸了我真实应用中机架的实现。

Something that should be noted is that a sample rails app - aka, running a rails new appName and straight ftp'ing that to the production server on DreamHost - will run fine. This perturbs me as I imagine both my real app and the sample app have the rack (1.2.1) dependency; which implies to me that, in an effort to bypass the DreamHost server gems, I am somehow messing with rack's implementation in my real app.

我让我的示例Rails应用程序在DreamHost上的另一个子域上运行,而对于我尝试部署的两个真实应用程序的子域都出现此错误。

I have my sample rails app running on a separate subdomain on DreamHost while getting this error for the subdomains of both the real apps I'm attempting to deploy.

此外,我最初尝试在采用供应商/缓存方法之前在DreamHost用户目录中本地安装gems。也许这不会影响任何事情。

Also, I originally attempted to install the gems locally in my DreamHost user directory before taking the vendor/cache approach. Maybe this doesn't affect anything..

感谢您通过这个冗长的问题所带来的痛苦

Thanks for suffering through this messy/long question

推荐答案

向Dreamhost投诉,并告诉他们升级Phusion Passenger。现在,几个版本的Phusion Passenger都已解决此问题。

Complain to Dreamhost and tell them to upgrade Phusion Passenger. This problem has been fixed for several releases of Phusion Passenger now.

这篇关于DreamHost,Passenger和Rails 3.0.0.rc的机架错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆