So I spent a little time a while back trying to figure out the nuances of what was allowed on Dreamhost when using mod_rails for a Rack based application. First since Sinatra wasn’t a DH supplied gem I setup my own rubygems install store following this walk through: http://wiki.dreamhost.com/index.php/RubyGems
Then I installed the Sinatra gem. Finally I created a sinatra application and pointed a DH subdomain @ the public folder of the app. Unfortunately DH doesn’t support putting Rack or Rails apps in sub-directories.
Now, even though I was declaring the GEM_HOME & GEM_PATH variables in the config.ru file Passenger wasn’t picking up them up and so wasn’t finding my sinatra gem. To get around this I used the SetEnv apache declaration declaration in a .htaccess file in the public folder of the app ala:
SetEnv GEM_HOME /home/username/.gems
SetEnv GEM_PATH /home/username/.gems:/usr/lib/ruby/gems/1.8
Also since Dreamhost spins down the application handler pretty quickly and my little test site doesn’t recieve much traffic, the initial startup is slow, but subsequent refreshes make this quick. To get over this initial launchtime I setup a cron job to tickle the app every 5 minutes:
*/5 * * * * /usr/bin/curl http://my.domain.com/ -s -o /dev/null
Now the app loads up quick every time!
Over the past few months I’ve noticed that I just can’t get enough information into my head fast enough. My mind is constantly racing with ideas that I’ve been picking up through reading books, blogs, listening to podcasts, and actually working on projects. The more I learn, the more I want to know. I’ve always enjoyed programming and felt the same affinity for it as IT, however lately I find myself being drawn to programming more and more. Technology excites me and the prospect of leveraging new technology through programs I have written excites me even more. It’s a simple passion, but I like it that way because it gives me the freedom to truly enjoy the learning process.
In an effort to increase my skillset I have embarked on the journey of trying to get an MCSD certification. I know a lot of Rubyists would be shocked to hear such a thing, most people go the other direction. However, I am not abandoning Ruby, rather just “sweetening the pot.”
The path that I will be pursuing will be the C# path, and I’ve already begun to take a look at it. It’s amazing how easy it is to pick this language up. I picked up a book on this yesterday and going through the exercises I am already half way through it. I will say that having spent the last 7 months learning/working with Ruby has definitely prepared me for the object oriented approach in C#. While C# is more verbose than Ruby, I can still see myself having fun with the language. Also if John Lam or the Ruby.NET team continue to make progress with their projects, using Ruby to work on the .NET platform will be a breeze (and since I’m not a big fan of IIS, I’ll be eager to see how these projects work with Mono & Apache).