PDA

View Full Version : Ruby on Rails totally broken?



webspire
11-20-2009, 06:38 AM
Hello. I've had a production Rails application that has worked without error for well over a year. Starting some time yesterday, it no longer functions. Users visiting the page now see the infamous "Application Error...Rails application failed to start properly". I reviewed my Rails and FastCGI logs and see no errors. A review of the Apache log shows this error:



/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- fcgi (MissingSourceFile)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home1/webspire/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
from /home1/webspire/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /home1/webspire/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
from /home1/webspire/gems/gems/rails-2.0.2/lib/fcgi_handler.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home1/webspire/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
from /home1/webspire/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /home1/webspire/gems/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
from dispatch.fcgi:35

After a couple of Live Chats, I'm being told that there was an issue with a Rails "upgrade" BH did and that someone is troubleshooting. I'm trying to be patient but by client is NOT happy with the situation (esp. since it's been down at least 24 hours at this point).

Is anyone else experiencing problems with Rails on Bluehost at the moment?

Since there seems to be a history of BH changes/upgrades to Rails breaking things, are there any "defensive" strategies anyone can recommend? I thought by having my own gems directory I'd be able to insulate my application but I guess not.

Thanks for any advice/feedback. :(

moleskinefan
11-20-2009, 09:20 AM
Same issue on my server. All my Ruby on Rails apps are broken. They were working fine before.

Hope it gets fixed soon

webspire
11-20-2009, 09:31 AM
After a couple of hours of Live Chat (yesterday and today) BH was able to localize the problem. To quote the tech, "It appears an administrator moved the location of Gems to accommodate some updates to server software and config that were made."

The gems that were in /usr/lib/ruby/gems/1.8 are gone and now located in /usr/lib64/ruby/gems/1.8. After the tech fixed my .gemrc file to point to this new location (instead of the old one), the site started working instantly. I just hope these don't move again! :(

I really appreciate that the Live Chat person I talked with this time didn't give up as easily as the previous three. Once we figured out this was a problem on the BH-side, he was apologetic. (Thank you!!) He also said they'd revise the KB article(s) that reference the [now] incorrect path.

moleskinefan
11-22-2009, 08:43 PM
Likewise, thanks for BH technical support, I got one of my sites working. Here is the fix:

From your home/username directory run the following:

sed -i 's#/usr/lib/ruby/#/usr/lib64/ruby/#g' ~/.bashrc

And then:

find -maxdepth 4 -name environment.rb -exec sed -i 's#/usr/lib/ruby/#/usr/lib64/ruby/#g' {} \;

Hope it helps someone

tms9980
01-23-2010, 01:51 PM
I've encountered a similar problem and tried changing /lib to /lib64, but to no avail. It appears that both lib and lib64 exist on my server, so it shouldn't matter which one I point Ruby to? Any other suggestions as to why my Rails/Radiant app might be broken?

It appears that BH did a bunch of upgrading on 1/10. It's just a matter of figuring out which upgrade broke my site. As far as I can tell, the Radiant app is not the culprit, nor is the lib64 issue. What else should I look for?

Thanks,

Tom

rpflo
01-24-2010, 05:10 PM
I did the lib64 thing in my .bashrc and environment.rb and I can get in to the script/console and run queries on the database--which I couldn't do before.

However, all of my sites still give me a 500 with nothing in the production.log. :mad: