PDA

View Full Version : My Rails apps are broken - any server changes lately?



furman87
09-24-2009, 07:27 PM
I had two Rails apps working fine after the Rails upgrade to 2.3.3. I had followed the instructions on Josh White's blog (http://jibwa.com/code-and-documentation-for-programmers/bluehost-rails-update-cgi-problems.html) and have had things running great since the upgrade.

I hadn't been checking on the status of the apps too much because one is being beta tested and the other one is used pretty frequently by a client and I would know it pretty quickly if it wasn't working right.

Well, I heard my client's screams today and was faced with server error 500 and haven't changed a thing in my app since I got it working. I checked my other app and it is also broken.

So I guess my question is this: does anyone know of any server changes that have been made to Rails recently, like within the past week or so? My logs are not showing any error activity, and nothing has changed in my app, so I really can't figure out why the sudden 500 errors.

Thanks for any help or suggestions.

farcaster
09-24-2009, 07:31 PM
Your quickest resolution for this may be to contact BH Support at this link:

http://www.bluehost.com/

Click on the Live Chat button. They can look directly at the box you are using.

furman87
09-24-2009, 09:34 PM
Thanks for the suggestion, farcaster. I contacted live support and they found the following error in my cPanel error log. I hadn't seen it earlier because it had scrolled by already.

Premature end of script headers: dispatch.fcgi Missing the Rails 2.3.3 gem. Please `gem install -v=2.3.3 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

Really weird.

I checked my rails version and it was 2.3.3, and my environment.rb is fine. I did a gem list and it had the following gems, so it looks like my Rails is up to date, at least as far as I know.

actionmailer (2.3.3)
actionpack (2.3.3)
activerecord (2.3.3)
activeresource (2.3.3)
activesupport (2.3.3)
authlogic (2.1.1)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
fastthread (1.0.7)
fcgi (0.8.7)
gem_plugin (0.2.3)
login_generator (1.2.2)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.7)
rack (1.0.0)
rails (2.3.3)
rake (0.8.7)
RedCloth (4.2.2)
rmagick (1.15.17)
sqlite3-ruby (1.2.4)
tzinfo (0.3.13)

furman87
09-25-2009, 11:21 AM
Even though all of my Rails versions were correct, BlueHost tech support suggested commenting out the following line in config/environment.rb:

RAILS_GEM_VERSION = '2.3.3' unless defined? RAILS_GEM_VERSION

That worked, so I thought I'd pass it along in case anyone else has this problem.