INCLUDE_DATA

Article written

  • on 06.07.2005
  • at 08:59 PM
  • by Rory

Deploying Ruby on Rails App to TextDrive 0

Jul6

Deploying my first Ruby on Rails application to TextDrive took about an hour, which is about how long I figured it would take. I followed bits and pieces of three tutorials from the Ruby on Rails website to complete the deployment, but I still ran into a few problems.

If you’re looking to deploy your app to TextDrive, check out these three links:

Some extra tips that I’ve picked up during the process:

  1. After you make changes to the Virtual Server Options in the Webmin control panel, don’t forget to press the Apply Changes link in the top right-hand corner so that the changes actually go through.
  2. After you have uploaded your files to the server, if you get the error “Rails application failed to start properly”, it may be that you’ve forgotten to do one of the following:
    • Upload the files in ASCII mode
    • CHMOD all of the dispatch.* files 755
    • Change the location of the Ruby binary to #!/usr/local/bin/ruby

Also, I was VERY impressed with how fast my application ran in FastCGI mode when compared to the regular mode (where it was actually quite sluggish). On TextDrive, it’s very easy to get your program running in FastCGI mode; just uncomment the fcgi line in your .htaccess file and comment the cgi line, as so:

# Example:
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

Anyway, in the next few days I’ll actually announce the launch of the website. It’s nothing to be proud of, but it works quite well. I’m most proud of my administration area, which has a few snippets of Ajax sprinkled in. Until the launch, though, I’ll be hard at work fixing up some UI issues, as well as adding content.

subscribe to comments RSS

There are no comments for this post

Please, feel free to post your own comment

* these are required fields