我正在將rails網站上傳到bluehost,這是一個適用於本地計算機的網站。不過,我很難將其配置爲在bluehost上運行。下面是我得到的錯誤:Bluehost上的Rails:「通過對等方重置連接」mod_fcgid錯誤
[warn] [client 74.220.197.129] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[error] [client 74.220.197.129] Premature end of script headers: dispatch.fcgi ./../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
./../config/../vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks':
RubyGem version error: rack(1.1.0 not ~> 1.0.1) (RuntimeError) from ./../config/../vendor/rails/railties/lib/initializer.rb:134:in `process' from ./../config/../vendor/rails/railties/lib/initializer.rb:113:in `send' from ./../config/../vendor/rails/railties/lib/initializer.rb:113:in `run' from ./../config/environment.rb:11 from dispatch.fcgi:21:in `require' from dispatch.fcgi:21
我已經安裝的機架1.0.1,和正確的.htaccess重命名給我文件的索引列表。這看起來像一個.htaccess錯誤。這是我的.htaccess文件:
AddHandler fcgid-script .fcgi
AddHandler cgi-script .cgi
# For security reasons, Option followsymlinks cannot be overridden.
# Options +FollowSymLinks +ExecCGI
Options +SymLinksIfOwnerMatch +ExecCGI
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
ErrorDocument 500 /500.html
#ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
我在做什麼錯了?
添加此到〜/ .bashrc文件:
您使用的是哪個版本的Rails? – rwilliams 2010-11-12 18:11:16
你可以發佈你的寶石名單輸出? – rwilliams 2010-11-12 18:14:46