Reputation: 81
I'm uploading a rails site to bluehost, a site that works on my local machine. I'm having trouble configuring it to run on bluehost, though. Here's the error I'm getting:
[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
I've already installed rack 1.0.1, and renaming .htaccess correctly gives me an index list of files. This seems like a .htaccess error. Here's my .htaccess file:
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"
What am I doing wrong?
Upvotes: 0
Views: 2179
Reputation: 81
Ok, I fixed this problem by doing the following:
Adding this to the ~/.bashrc file...
export GEM_HOME=$HOME/ruby/gems
export GEM_PATH=$GEM_HOME:/usr/lib64/ruby/gems/1.8
export GEM_CACHE=$GEM_HOME/cache
export PATH=$PATH:$HOME/ruby/gems/bin
...Running this command...
gem install rails --version=2.3.5
...and adding this line to the top of the environment.rb file...
ENV['GEM_PATH'] = '/home8/opportx0/ruby/gems:/usr/lib64/ruby/gems/1.8'
finally works.
Upvotes: 2
Reputation: 21497
Your app is looking for Rack 1.1.0 or greater and it's finding 1.0.1
Upvotes: 0