Running Rails with FastCGI on GoDaddy Servers



Zach recently posted a comment about configuring Rails to work with FastCGI on GoDaddy servers.  By default GoDaddy has Rails configured to work with standard CGI, which is drastically slower than FastCGI.  After using the tips Zach posted I was able to get FastCGI running and now the performance of the app is incredible.

Here are a couple of tips to get you up and running:

1. Change the following in app/public/.htaccess from RewriteRule ^(.*)$ dispatch.cgi [QSA,L] to RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

2. Update the first line of app/public/dispatch.fcgi from #!/usr/bin/ruby to #!/usr/local/bin/ruby and make sure the permissions on the file are set to executable

The difference is night and day.  Give it a go and see the difference between the two.



4 Responses to “Running Rails with FastCGI on GoDaddy Servers”

  1. Bernard says:

    Sorry to bother you but I couldn’t see any other means of getting in touch and I was hoping you might be able to help. I just installed your BlueGPS v0.6 mainly because I just purchased the 40 quid Bluetooth GPS Receiver and having installed TomTom mobile, this app doesn’t appear to find a GPS signal, so I thought I would see what happens with your application.

    Having installed BlueGPS on my P910i, when I select “Discover” and choose my BT-GPS the application quits with an error message “Reason Code BTPointToPoint Reason number 16″

    It might well have something to do with my problems that when I first tried to pair the GPS Receiver with my P910i via Bluetooth, everytime I entered the 0000 passcode, my phone went blank and eventually rebooted (as if it crashed). After trying this several times, I eventually found that the GPS Receiver was shown in my list of Bluetooth devices but I am assuming there might be some sort of problem with the pairing which is causing it not to work (when I try to use TomTom, there’s a possibility the phone sees the signal initially but then there is a counter running showing that there’s been no GPS signal for however long I leave it running)

    BTW I have also tried a Master Reset of the phone itself, in case anything was corrupted but this did not seem to help.

    Please forgive me for pestering you with this unsolicited plea for some assistance but if you have any suggestions or advice, they would be most welcome, as all the comments on the MobileFun web site would suggest that there should be no problem with this Receiver working with the Sony Ericsson P910i

    With my utmost thanks in advance in the hope that you might be able to assist and again my apologies for troubling you but I am sitting here tearing my hair out trying to get it working
    Kind Regards
    Bernard

  2. dennis says:

    Bernard,

    Thanks for the message. You can always get in touch with me by sending and email to dennisbaldwin at gmail dot com. Since I’m lazy I’m going to leave your comment here and look into moving it to more appropriate post at a later date.

    I was able to find a link to your receiver here: http://www.mobilefun.co.uk/product/8590.htm. Everything tells me it should work, but I did notice it communicates at a faster baud rate than most receivers that I’m familiar with. BlueGPS is configured to talk at 4800 baud so this may be the problem….although I’m not 100% sure.

    I don’t currently have time to look into this further and I’m no longer supporting the Symbian version of BlueGPS. I’m hoping that another developer will take the source code and continue to improve it.

    I recently wrote BlueGPS to run on Windows Mobile devices and am currently working on a new release. If you decide to switch to WMO in the future then please feel free to download the new version at http://www.db75.com/bluegps.

    I apologize and do hope you get your problem resolved. Please contact me at the email address above if you have any additional questions.

    Take care,
    Dennis

  3. [...] When you’re ready for FastCGI check out this link: http://www.db75.com/new_blog/?p=242.  I wouldn’t really call it fast because GoDaddy seems to be having problems managing this module.  I’m optimistic they will step up their Rails game or else they’re going to lose a lot of customers to Dreamhost and TextDrive, which I’ve heard good things about. [...]

  4. [...] FastCGI: I was never able to get this to work. Whenever switching to FastCGI (as described here), my rails app stops working all together. The page would try to load for a minute or two then just stop. That said, I’ve read of others having success. [...]

Leave a Reply