Computers & Internet
Over Memorial Day weekend I migrated my Rails Application to Dreamhost using mod_rails (Passenger). It was not an entirely smooth process but I was also upgrading from Rails 1.8.x at the same time. That was compounded by making the foolish mistake of trying to rebuild my database using Rake migrations. (That’s a bad idea. I could have saved many hours by just uploading the schema)
Here is the procedure I followed (hat tip to Nock):
- cd ~/
- rails your_app_name -d mysql
- Copy app/, database.yml, routes.rb, db/
- Change public/.htaccess from .cgi to .fcgi
- put your app into production mode (uncomment line 5 in environment.rb)
- run rake db:migrate RAILS_ENV=production
- chmod -R 755 ~/your_app_name/app
- rm your_app_name/public/index.html
- killall -USR1 dispatch.fcgi
- killall -USR1 ruby
One comment on step 4. For some reason none of my stylesheets would load. Much of the advice gleaned from endless Google searches seemed to suggest that the problem would be fixed by setting the RewriteBase in /public/.htaccess. That turned out to not be the case.
My stylesheet problem was caused by having this line twice in my .htaccess file
RewriteRule ^(.*)$ dispatch.fcgi[QSA,L]
DO NOT uncomment the one before RewriteEngine On , as all the tutorials seem to imply, just change the .cgi to .fcgi in the block below it.
Thanks to Dreamhost for their stellar support over a frustrating (for me!) Memorial Day weekend. In the end, (as is so often the case), very little of the frustration was caused by Dreamhost or mod_rails but, rather, by some of the vagaries of Rails. I’m guessing that future deployments would be much smoother as this was my first time deploying to a shared hosting environment.
I use Dreamhost to host my websites and they have now added support for Passenger (a.k.a mod_rails). Ruby on Rails deployment hassles should be a distant memory soon!
If you’re looking for a cheap and cheerful hosting company for your Rails app, I highly recommend Dreamhost. It’s great for the solo developer (or small team) because for a small amount per year you can launch your site on a shared hosting service and then later easily migrate it to a virtual private server as your needs change.Â
To link to Amazon, use the following code
http://www.amazon.com/exec/obidos/ASIN/<10 digit ASIN number>/simplelight-20
Simply insert the relevant ASIN number for the product that you are linking to. You can find the ASIN number at Amazon’s Associate page
For example, to you would link to For One More Day by Mitch Albom like this:
To enable 640×480 video in Skype (instead of the usual 320×240 resolution), add the following lines to the config.xml file in the Skype user directory
<Video>
   <CaptureHeight>480</CaptureHeight>
   <CaptureWidth>640</CaptureWidth>
   <Fps>30</Fps>
</Video>Â
There will probably already be a <Video> … </Video> section in the file so just add the middle three lines in that section.
The config.xml file is typically located in:
c:\users\<win_username>\AppData\Roaming\Skype\<skype_username>
Note: The “AppData” folder is a hidden folder so you’ll have to search for it. Either that, or just make all the folders in c:\users\<win_username> visible.
I’m running Windows Vista 64-bit so your location might be different. (If you do have the location for a different OS please leave a comment and I’ll update the post). If you enable “Display technical call info during calls” under Skype->Options->Advanced->Connection, you will be able to monitor the resolution and frame rate. (Hover your mouse over the main Skype tab and a yellow box will pop up with all the technical Skype data, including frames per second, transfer and receive resolution. This is useful for testing whether you are indeed sending the higher resolution image.)
Also, make sure you have the latest Logitech webcam driver installed. You don’t need the Logitech app, just the driver. I use the Logitech Quickcam Ultra Vision  and the image quality is very good.
Skype has gone to great lengths to differentiate this “hack” from their HQ (high quality) video (which requires Skype-endorsed webcams) but I think the difference is marginal if you have decent hardware and bandwidth. It appears that as of Skype 3.8 you will no longer see the usual HQ Video logo but you will still be transmitting video at the higher resolution. Your frame rate might take a slight hit depending on your uplink bandwidth.Â
(As an aside: I highly recommend not upgrading to the current Skype 4.0 beta)
I have been using Riya’s new face recognition software. The face recognition works remarkably well and will only improve with a larger dataset and more powerful processors. Unfortunately, there is still no way to export the tag information generated by the software. Without this feature it is hard to contemplate investing too much time into the software or recommending it to anyone other than the earliest adopters with an insatiable fascination with technology. Companies come and go, which is why I think it’s important to maintain ownership of any structure I add to my data.