<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Rails</title>
        <link>http://blogs.sftsrc.com/stuart/category/29.aspx</link>
        <description>Rails</description>
        <language>en-US</language>
        <copyright>Stuart Thompson</copyright>
        <managingEditor>stuart.thompson@sftsrc.com</managingEditor>
        <generator>Subtext Version 1.9.5.0</generator>
        <item>
            <title>Ruby on Rails Setup with DreamHost</title>
            <link>http://blogs.sftsrc.com/stuart/archive/2008/10/28/109.aspx</link>
            <description>&lt;p&gt;As step 1 of &lt;a target="_blank" mce_href="http://stuartthompsontech.wordpress.com/2008/10/27/the-aspnet-silverlight-php-rails-experiment/" href="http://stuartthompsontech.wordpress.com/2008/10/27/the-aspnet-silverlight-php-rails-experiment/"&gt;my latest experiment&lt;/a&gt;, I've started by configuring a &lt;a target="_blank" mce_href="http://www.rubyonrails.org" href="http://www.rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt; site with &lt;a target="_blank" mce_href="http://www.dreamhost.com" href="http://www.dreamhost.com/"&gt;DreamHost&lt;/a&gt;.  This actually involved quite a bit of setup work, which is not unusual when remotely hosting a new website.  I have documented the steps as fully as I can for anyone else curious about trying development in Rails.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1 - Signup with DreamHost&lt;/strong&gt;&lt;br /&gt;
You can sign up &lt;a target="_blank" mce_href="http://www.dreamhost.com/r.cgi?461119" href="http://www.dreamhost.com/r.cgi?461119"&gt;using this link&lt;/a&gt; or use the promo code LETMETRYRAILS and receive $50 off (i.e. no setup fee).&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 2 - Configure your domain&lt;/strong&gt;&lt;br /&gt;
The next step is to configure your domain.   We'll start at the &lt;a target="_blank" mce_href="http://panel.dreamhost.com" href="http://panel.dreamhost.com/"&gt;DreamHost configuration panel&lt;/a&gt;.  Select &lt;em&gt;Domains&lt;/em&gt; and then &lt;em&gt;Manage Domains&lt;/em&gt; from the left-hand sidebar.  This will bring up the list of domains in your account.  Click the &lt;em&gt;Edit &lt;/em&gt;button in the &lt;em&gt;Web Hosting&lt;/em&gt; column.&lt;/p&gt;
&lt;p&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/dreamhost_managedomains2.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/dreamhost_managedomains2.jpg"&gt;&lt;img height="228" width="460" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/dreamhost_managedomains2.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/dreamhost_managedomains2.jpg" title="dreamhost_managedomains2" class="alignnone size-full wp-image-62" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This will open the settings page for that domain.  Check the FastCGI and Passenger (mod_rails) checkboxes.  Finally click the &lt;em&gt;Change fully hosted settings now!&lt;/em&gt; button (note that this button is not at the bottom of the page, rather at the end of the first section).&lt;/p&gt;
&lt;p&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/dreamhost_configuredomain1.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/dreamhost_configuredomain1.jpg"&gt;&lt;img height="366" width="460" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/dreamhost_configuredomain1.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/dreamhost_configuredomain1.jpg" title="dreamhost_configuredomain1" class="alignnone size-full wp-image-63" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;FastCGI support allows your Rails project to run much faster.  The Passenger (mod_rails) option allows your Rails application to be configured much more easily and is the &lt;a target="_blank" mce_href="http://wiki.dreamhost.com/Passenger" href="http://wiki.dreamhost.com/Passenger"&gt;preferred DreamHost method&lt;/a&gt; for hosting Ruby on Rails applications.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 3 - Configure your FTP/SSH user&lt;/strong&gt;&lt;br /&gt;
We will be performing much of the setup and configuration of the website via SSH.  We will need to setup a user account for this purpose.  During your initial setup you should have created an ftp account for your domain, probably with the same name as that domain (if you accepted the defaults).  Select the &lt;em&gt;Users&lt;/em&gt; and then &lt;em&gt;Manage Users&lt;/em&gt; options from the left side-bar.  Click the &lt;em&gt;Edit&lt;/em&gt; button next to your user in the &lt;em&gt;Actions &lt;/em&gt;column.&lt;/p&gt;
&lt;p&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/dreamhost_editusers.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/dreamhost_editusers.jpg"&gt;&lt;img height="216" width="460" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/dreamhost_editusers.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/dreamhost_editusers.jpg" title="dreamhost_editusers" class="alignnone size-full wp-image-61" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;This will open the following page where you can edit your user.  Change the User &lt;em&gt;Account Type&lt;/em&gt; to &lt;em&gt;Shell account&lt;/em&gt; and select the &lt;em&gt;/bin/bash&lt;/em&gt; shell type.  Finally, hit the &lt;em&gt;Save Changes&lt;/em&gt; button at the bottom of the page.&lt;/p&gt;
&lt;p mce_style="text-align:left;" style="text-align: left;"&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/dreamhost_editingftpuser.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/dreamhost_editingftpuser.jpg"&gt;&lt;img height="297" width="460" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/dreamhost_editingftpuser.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/dreamhost_editingftpuser.jpg" title="dreamhost_editingftpuser" class="alignnone size-full wp-image-64" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p mce_style="text-align:left;" style="text-align: left;"&gt;This enables the user to connect using a Telnet/SSH client, which is exactly what we are going to do next.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 4 - Download some tools&lt;/strong&gt;&lt;br /&gt;
Next we're going to download the tools we'll need to create and configure our rails website.  We'll need the latest release of Ruby, MySQL, HeidiSql, and PuTTY.  HeidiSql is a free gui for maintaining MySQL databases.  PuTTY is a free Telnet/SSH client that we'll use for remote configuration of our site.  Note that you do not need to signup on the MySQL site to get the download.  Click the &lt;em&gt;No thanks, just let me download&lt;/em&gt; link.&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Ruby 1.8.6-27 RC1 can be &lt;a target="_blank" mce_href="http://rubyforge.org/frs/?group_id=167" href="http://rubyforge.org/frs/?group_id=167"&gt;downloaded here&lt;/a&gt;.&lt;/li&gt;
    &lt;li&gt;MySQL 5.0 Community Server can be &lt;a target="_blank" mce_href="http://dev.mysql.com/downloads/mysql/5.0.html#win32" href="http://dev.mysql.com/downloads/mysql/5.0.html#win32"&gt;downloaded here&lt;/a&gt; (select the Windows ZIP/Setup.EXE (x86) option)&lt;/li&gt;
    &lt;li&gt;HeidiSQL 3.2 can be &lt;a target="_blank" mce_href="http://www.heidisql.com/download.php" href="http://www.heidisql.com/download.php"&gt;downloaded here&lt;/a&gt;.&lt;/li&gt;
    &lt;li&gt;PuTTY can be &lt;a target="_blank" mce_href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html"&gt;downloaded here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 5 - Installing Rails&lt;/strong&gt;&lt;br /&gt;
Now that we have the necessary tools installed it is time to setup Rails locally.  Fortunately, Ruby comes with everything we need to get setup and running, including the WEBrick web server that we can use to run and test our site before deployment.  When installing Ruby, be sure to check the &lt;em&gt;Enable RubyGems &lt;/em&gt;option on the first page of the installer.&lt;/p&gt;
&lt;p mce_style="text-align:left;" style="text-align: left;"&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/rubyinstallation.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/rubyinstallation.jpg"&gt;&lt;img height="355" width="460" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/rubyinstallation.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/rubyinstallation.jpg" title="rubyinstallation" class="alignnone size-full wp-image-66" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p mce_style="text-align:left;" style="text-align: left;"&gt;Once the installer completes, open up a command window and execute the following commands:&lt;/p&gt;
&lt;p mce_style="text-align:left;padding-left:30px;" style="text-align: left; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cd ruby/bin&lt;br /&gt;
gem update --system&lt;br /&gt;
gem install rails --version 2.1.2&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;This will use the gem system to install rails locally.  If everything is successful, your command window should look something like this:&lt;/p&gt;
&lt;p mce_style="text-align:left;" style="text-align: left;"&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/installrails1.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/installrails1.jpg"&gt;&lt;img height="294" width="460" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/installrails1.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/installrails1.jpg" title="installrails1" class="alignnone size-full wp-image-69" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;You may need to restart your system at this point.  Ughh.  This is because Windows Vista and XP sometimes struggle to detect that new environment variables were added to the $PATH.  Unless you relish fully qualifying the &lt;em&gt;C:/Ruby/bin&lt;/em&gt; directory on the next few commands, I'd advise you restart now.  It's also not a bad idea since we did just install four new programs.  I've found Windows seems to run more smoothly if you reboot after installing new things.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 6 - Create your Rails site locally&lt;/strong&gt;&lt;br /&gt;
Now that we have Rails setup, let's create a simple site locally.  I created a new directory on C:\ called &lt;em&gt;projects&lt;/em&gt; in which to develop the site.  Open a command prompt and type the following:&lt;/p&gt;
&lt;p mce_style="padding-left:30px;" style="padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cd \&lt;br /&gt;
md projects&lt;br /&gt;
cd projects&lt;br /&gt;
rails MyRailsSite&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This will create your rails site in &lt;em&gt;C:\projects\MyRailsSite&lt;/em&gt;.  Before we add our first view and controller, let's quickly check that everything wired up properly.  To do this we need to start the WEBrick server:&lt;/p&gt;
&lt;p mce_style="padding-left:30px;" style="padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cd C:\projects\MyRailsSite&lt;br /&gt;
ruby script/server&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Vista may ask if you wish to &lt;em&gt;unblock&lt;/em&gt; Ruby, which you do.  Your command prompt should look something like the following:&lt;/p&gt;
&lt;p&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_webrickserver.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_webrickserver.jpg"&gt;&lt;img height="141" width="460" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_webrickserver.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_webrickserver.jpg" title="rails_webrickserver" class="alignnone size-full wp-image-71" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can now navigate to &lt;a target="_blank" mce_href="http://127.0.0.1:3000" href="http://127.0.0.1:3000/"&gt;http://127.0.0.1:3000&lt;/a&gt; to see your site.  If everything is configured correctly you should see the Ruby on Rails welcome page:&lt;/p&gt;
&lt;p&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/rubyonrails_welcomescreen.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/rubyonrails_welcomescreen.jpg"&gt;&lt;img height="336" width="460" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/rubyonrails_welcomescreen.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/rubyonrails_welcomescreen.jpg" title="rubyonrails_welcomescreen" class="alignnone size-full wp-image-72" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We can shutdown the WEBrick server by pressing Ctrl-C in the command prompt window.&lt;/p&gt;
&lt;p&gt;Now let's create our first controller and view.  We're going to keep it simple and put up a page that displays the message "Hello World!".  At the command prompt type the following:&lt;/p&gt;
&lt;p mce_style="padding-left:30px;" style="padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cd projects\MyRailsSite&lt;br /&gt;
ruby script/generate controller HelloWorld&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_createcontroller.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_createcontroller.jpg"&gt;&lt;img height="167" width="460" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_createcontroller.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_createcontroller.jpg" title="rails_createcontroller" class="alignnone size-full wp-image-73" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;This will generate a new controller for you as well as a new view.  If you aren't familiar with MVC development, just follow along for now until the sample becomes clear.  The rest will come in time and with additional reading and practice.  For now it is suffice to say that a controller will perform the work for a web page request where the view will display the results of that work.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Let's edit the controller that was generated.  To do this, open up an explorer window, navigate to &lt;em&gt;C:\projects\MyRailsSite\app\controllers&lt;/em&gt;, right-click over the &lt;em&gt;hello_world_controller.rb&lt;/em&gt; file and select &lt;em&gt;Edit&lt;/em&gt; from the context menu.  This should open the controller file in the SciTE editor.  We need to add lines to the class to respond to the &lt;em&gt;index&lt;/em&gt; action.  The &lt;em&gt;index&lt;/em&gt; action is the default action that will be performed for a controller.  To do this, edit the file to look like the following:&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_editcontroller.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_editcontroller.jpg"&gt;&lt;img height="186" width="442" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_editcontroller.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_editcontroller.jpg" title="rails_editcontroller" class="alignnone size-full wp-image-74" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;This &lt;em&gt;controller&lt;/em&gt; will now set the variable &lt;em&gt;@message&lt;/em&gt; to the literal "Hello World"; when the index &lt;em&gt;action&lt;/em&gt; is requested.  Controllers perform actions.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Save the file and close it.  Now we will create a view to display the message.  Navigate to the &lt;em&gt;C:\projects\MyRailsSite\app\views\hello_world&lt;/em&gt; directory in explorer (notice how Rails created the view directory for us).  Right-click in the directory and create a new file called &lt;em&gt;index.html.erb&lt;/em&gt;.  Now right-click this file and open it in your favorite editor (Notepad will suffice).  Add the following to the file:&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_createview.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_createview.jpg"&gt;&lt;img height="194" width="347" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_createview.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_createview.jpg" title="rails_createview" class="alignnone size-full wp-image-75" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Save the file and close the editor.  We're almost ready to test out our new controller and view.  First, however, we need to configure a &lt;em&gt;route&lt;/em&gt; for our site.  A &lt;em&gt;route&lt;/em&gt; is a mapping from an end-point (url) in our site to an actual controller and view that will fulfil the request.  In explorer, navigate to &lt;em&gt;C:\projects\MyRailsSite\config&lt;/em&gt;, right-click the file &lt;em&gt;routes.rb&lt;/em&gt; and select &lt;em&gt;Edit&lt;/em&gt; from the context-menu.  This will open your routes file in the SciTE editor.  Almost the entire file is commented out.  Most of this file contains instructions for configuring custom routes.  We're going to comment out the last two lines of the file and insert a single mapped route of our own.  Edit the end of the file to look like the following:&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_editroutes.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_editroutes.jpg"&gt;&lt;img height="105" width="460" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_editroutes.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_editroutes.jpg" title="rails_editroutes" class="alignnone size-full wp-image-76" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;This line connects the &lt;em&gt;helloworld&lt;/em&gt; route to the &lt;em&gt;hello_world&lt;/em&gt; controller for the &lt;em&gt;index&lt;/em&gt; action.  The action specification isn't actually necessary as the index action is assumed by default if none is specified, but I prefer to be explicit.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;There is one final thing we'll need to do before we can browse to our page locally.  We need to install and configure MySQL.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 7 - Install and configure MySQL&lt;/strong&gt;&lt;br /&gt;
This is a very short step.  Run the MySQL setup package you downloaded earlier and select the &lt;em&gt;Typical&lt;/em&gt; installation option.  Then hit Next-&amp;gt;Next-&amp;gt;Finish all the way to the end.  When the configuration wizard runs, choose &lt;em&gt;Detailed Configuration&lt;/em&gt;, then &lt;em&gt;Developer Machine, &lt;/em&gt;then&lt;em&gt; &lt;/em&gt;&lt;em&gt;Multifunctional Database&lt;/em&gt;.  When asked for a location for the Inno files, I used &lt;em&gt;C:\projects\MySQL&lt;/em&gt;.  Choose &lt;em&gt;Decision Support (DSS)/OLAP&lt;/em&gt; then leave both boxes checked on the next dialog with 3306 as the port number.  Choose &lt;em&gt;Standard Character Set&lt;/em&gt;, then check &lt;em&gt;Install As Windows Service&lt;/em&gt; and leave &lt;em&gt;Include Bin Directory in Windows PATH&lt;/em&gt; unchecked.  Enter a new root password, leave &lt;em&gt;Create An Anonymous Account&lt;/em&gt; unchecked.  Finally, hit &lt;em&gt;Execute&lt;/em&gt; to finish the configuration wizard.  MySQL is now installed and configured.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 8 - Create a database for our project&lt;/strong&gt;&lt;br /&gt;
We'll need to create a database for our project.  To do this we'll need to install HeidiSql.  Let's run that installer now.  I use the defaults from the installer except on the &lt;em&gt;Select Additional Tasks&lt;/em&gt; dialog where I uncheck &lt;em&gt;Associate .SQL Files with HeidiSQL. &lt;/em&gt;When the installer completes it will launch the HeidiSQL gui.  Click the New button at the top of the first dialog.  Name the connection &lt;em&gt;MyRailsSite&lt;/em&gt;, click OK, and then enter the password you selected during your MySQL installation into the password box provided.  The first thing we're going to do is create a new database.  Right-click over root@127.0.0.1 in the left side-bar and select &lt;em&gt;Create database&lt;/em&gt; from the context menu.  Enter &lt;em&gt;MyRailsSite&lt;/em&gt; as the database name and click ok.  Now select Tools-&amp;gt;User-Manager from the top menu.  We're going to create a new user to avoid using the root user in our application.  For the &lt;em&gt;Username&lt;/em&gt; type myrailsdbuser, set&lt;em&gt; From Host &lt;/em&gt;to&lt;em&gt; localhost&lt;/em&gt;, and type a password for your new user.  Don't use the same password you used for root.  In the &lt;em&gt;Allow access to&lt;/em&gt; list, left-click over the &lt;em&gt;myrailssite&lt;/em&gt; database (it will turn yellow).  Now click &lt;em&gt;Add User&lt;/em&gt;.  Then click &lt;em&gt;Close&lt;/em&gt; to close the user manager dialog.  Now we've created a database and a specific user for our Rails application to use.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 9 - Configure Rails to use the database&lt;/strong&gt;&lt;br /&gt;
Finally we need to configure our Rails site to use our new database.  In an Explorer window, navigate to &lt;em&gt;C:\projects\MyRailsSite\config&lt;/em&gt;, right-click the &lt;em&gt;database.yml&lt;/em&gt; file and edit it in your favorite editor (I use &lt;a target="_blank" mce_href="http://www.textpad.com/" href="http://www.textpad.com/"&gt;TextPad&lt;/a&gt; but NotePad will suffice).  Edit your file to look like the following:&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_dbconfig2.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_dbconfig2.jpg"&gt;&lt;img height="380" width="285" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_dbconfig2.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_dbconfig2.jpg" title="rails_dbconfig2" class="alignnone size-full wp-image-83" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt; &lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt; &lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 10 - Testing the site locally&lt;/strong&gt;&lt;br /&gt;
We're finally ready to test the site locally!  Open up a command window are run the following to start the WEBrick server:&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cd c:\projects\myrailssite&lt;br /&gt;
ruby script/server&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Then open a browser and navigate to &lt;a target="_blank" mce_href="http://127.0.0.1:3000/" href="http://127.0.0.1:3000/"&gt;http://127.0.0.1:3000/&lt;/a&gt;.  You'll notice that the Rails welcome page still displays.  However, change the url in the browser to point to &lt;a target="_blank" mce_href="http://127.0.0.1:3000/helloworld" href="http://127.0.0.1:3000/helloworld"&gt;http://127.0.0.1:3000/helloworld&lt;/a&gt;.  You should now see your view displaying the message "Hello World!".  Let's remove the default index page now and then make your default route point to your &lt;em&gt;helloworld&lt;/em&gt; view.  To do this, open up Explorer and navigate to &lt;em&gt;c:\projects\myrailssite\public&lt;/em&gt;.  This is your site's public directory.  From here, delete the &lt;em&gt;index.html&lt;/em&gt; file.  That's the welcome page gone; we don't need it anymore.  Now navigate to &lt;em&gt;c:\projects\myrailssite\config&lt;/em&gt; and open the &lt;em&gt;routes.rb&lt;/em&gt; file again.  Add the following line just before the map.connect line we added earlier:&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;map.root :controller=&amp;gt;"hello_world"&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;This configures the &lt;em&gt;root&lt;/em&gt; route to point to our hello world controller.  As we stated earlier, there is no need to specify the &lt;em&gt;index&lt;/em&gt; action as it is assumed by default.  Save and close the file, then browse to &lt;a target="_blank" mce_href="http://127.0.0.1:3000" href="http://127.0.0.1:3000/"&gt;http://127.0.0.1:3000&lt;/a&gt; once more.  Your site should now be displaying your "Hello World!" message.  Note how the url is just &lt;a target="_blank" mce_href="http://127.0.0.1:3000" href="http://127.0.0.1:3000/"&gt;http://127.0.0.1:3000&lt;/a&gt; and doesn't have helloworld at the end.  This is an important point about routes.  You aren't navigating a particular directory structure on the site, you are simply navigating routes and actions.  The controller could be named anything you like as long as the route for a particular end-point correctly routed requests for that end-point to your controller.  For now, let's stop the WEBrick server and close the command window.  The final task is to get your Rails site up to &lt;a mce_href="http://www.dreamhost.com" href="http://www.dreamhost.com/"&gt;DreamHost&lt;/a&gt; and serve your "Hello World!" request remotely.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 11 - Configuring DreamHost for your site&lt;/strong&gt;&lt;br /&gt;
This final configuration step may seem a little confusing at first, but only if you aren't familiar with Linux and BASH.  It doesn't take very long and it isn't important to understand how it works because you'll only need to do it once.  We're going to install version 2.1.2 of rails to your remote host because that's the version that Passenger (mod_rails) needs in order to run your site.  This is where we'll need PuTTY.  Fortunately there is no installation step with PuTTY.  It is simply an executable that you download and run.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;When you run PuTTY, you will need to supply the username and password of the user we configured in step 3.  This will connect you to the server that will host your site.  The following instructions are commands to enter into the BASH shell as well as instructions on editing your ~/.bash_profile file (which is similar to environment settings for the command shell in Windows).  The first part of these instructions is about editing your ~/.bash_profile file to ensure that some paths and other required settings are configured before beginning installation.  These instructions have been adapted from the &lt;a target="_blank" mce_href="http://wiki.dreamhost.com/RubyGems" href="http://wiki.dreamhost.com/RubyGems"&gt;DreamHost wiki article on this topic&lt;/a&gt;.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Before we update rails, let's first create our Rails site remotely.  To do this, first run PuTTY.  For the &lt;em&gt;Host Name&lt;/em&gt; you will supply your domain name in the form www.MyDomainName.com.  Then click &lt;em&gt;Open&lt;/em&gt;.  I choose &lt;em&gt;No&lt;/em&gt; from the next dialog as I don't want to store anything in the registry.  You will now enter the username and password for the user we created in step 3.  When you connect, type &lt;em&gt;ls&lt;/em&gt; and hit enter.  This is the BASH command to list the contents of the current directory.  You should see &lt;em&gt;MyDomainName.com&lt;/em&gt; listed in the output.  We are going to navigate to that folder and then create a rails site inside that folder.&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cd MyDomainName.com&lt;br /&gt;
rails MyRailsSite&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;This will create a Rails site on the DreamHost server, the same way we did it locally earlier.  We're going to create the site like this and then upload our site files from our local machine to the remote site.  To upload our files, we'll use an Explorer window and ftp.  First, however, we need to create a copy of our database.yml and environment.rb files.  This is because those files will be different on our remote host than they are locally.  Create a copy of each of those files called database.yml.live and environment.rb.live now.  Now edit the database.yml.live file to look like the following:&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;a mce_href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_dbconfiglive2.jpg" href="http://stuartthompsontech.files.wordpress.com/2008/10/rails_dbconfiglive2.jpg"&gt;&lt;img height="134" width="281" alt="" mce_src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_dbconfiglive2.jpg" src="http://stuartthompsontech.wordpress.com/files/2008/10/rails_dbconfiglive2.jpg" title="rails_dbconfiglive2" class="alignnone size-full wp-image-87" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt; &lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Edit your environment.rb.live file and uncomment the following line (its on line 5):&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;ENV['RAILS_ENV'] ||= 'production'&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;This is important because running in development mode under FastCGI will cause memory leaks on the DreamHost server.  They will catch them and clean them up but it's better to run in full production mode and not cause problems.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;One final change we need to make locally is to update the &lt;em&gt;c:\projects\myrailssite\config\environments\production.rb&lt;/em&gt; file.  Comment out the &lt;em&gt;config.action_view.cache_template_loading = true&lt;/em&gt; line as it causes problems with the Passenger product that will host our site.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Now we're ready to install Rails 2.1.2 remotely.  Switch back to your PuTTY session (or log in again if you &lt;em&gt;exit&lt;/em&gt;ed).  Let's first edit the ~/.bash_profile file.  To do this we will be using the &lt;em&gt;nano&lt;/em&gt; text editor.  To open the ~/.bash_profile file in nano, type the following:&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;nano ~/.bash_profile&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Now you can use the cursor keys to navigate the file.  We need to add the following lines to the end of the file:&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;# Path settings&lt;br /&gt;
export GEM_HOME="$HOME/.gems"&lt;br /&gt;
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/1.8"&lt;br /&gt;
export PATH="$HOME/bin:$HOME/.gems/bin:$PATH"&lt;br /&gt;
export RUBYLIB="$HOME/lib:$RUBYLIB"&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="padding-left:30px;" style="padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;# Stops the DreamHost processes from killing the gem install process&lt;br /&gt;
alias gem="nice -n19 ~/bin/gem"&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;To save your changes press Ctrl-O then hit enter.  Press Ctrl-X to exit the editor and return to the shell.  You can now type &lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cat ~/.bash_profile&lt;/span&gt; and the contents of the file should be printed out.  This is a good way to check that your changes were saved and that you typed everything correctly.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Now we need to perform the installation.  The following commands will achieve this:&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cd ~&lt;br /&gt;
mkdir .gems&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="padding-left:30px;" style="padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;mkdir bin lib src&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="padding-left:30px;" style="padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cd ~/src&lt;br /&gt;
wget http://rubyforge.org/frs/download.php/43985/rubygems-1.3.0.tgz&lt;br /&gt;
tar xzvf rubygems-1.3.0.tgz&lt;br /&gt;
cd rubygems-1.3.0&lt;br /&gt;
ruby setup.rb --prefix=$HOME&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="padding-left:30px;" style="padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cd ~/bin&lt;br /&gt;
ln -s gem1.8 gem&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;For more information on what each of these steps is doing check the &lt;a target="_blank" mce_href="http://wiki.dreamhost.com/RubyGems" href="http://wiki.dreamhost.com/RubyGems"&gt;DreamHost wiki article&lt;/a&gt;.  We can check that the path and gem versions are correct by typing the following:&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;which gem&lt;br /&gt;
gem -v&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;These commands should return &lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;/home/USERNAME/bin/gem&lt;/span&gt; and &lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;1.3.0&lt;/span&gt; respectively.  Now we can execute the command to install Rails 2.1.2, which is:&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;gem install rails --version 2.1.2&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;What we've accomplished here is to install RubyGems and Rails 2.1.2 to our hosted server.  The last thing we need to do to make everything work is to use rake to &lt;em&gt;freeze&lt;/em&gt; our version of Rails to 2.1.2 so that Passenger will use our Rails installation when running our site.  The commands to do this are as follows.  Please note that you need to supply your domain name in the format MyDomainName.com and the name of your Rails site in place of MyRailsSite in the first command.  This simply changes the current directory so that we're running rake in the right place.&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;cd ~/MyDomainName.com/MyRailsSite/&lt;br /&gt;
rake rails:freeze:edge TAG=rel_2-1-2&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;That's it!  Phew.  That felt like a lot of work, but at least you only have to do it once.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;&lt;strong&gt;Step 12 - Deploying and testing your site remotely&lt;/strong&gt;&lt;br /&gt;
Now that we've set up the environment with &lt;a target="_blank" mce_href="http://www.dreamhost.com" href="http://www.dreamhost.com/"&gt;DreamHost&lt;/a&gt;, the only task left is to deploy the site remotely and test it out.  Before we do that though, we are going to check one last configuration setting in the DreamHost control panel, just to be sure that everything is setup correctly.  If you navigate to Domains-&amp;gt;Manage Domains in the left side-bar and then click the &lt;em&gt;Edit&lt;/em&gt; button again (see step 2), then check out the &lt;em&gt;Specify your web directory&lt;/em&gt; setting.  This is where &lt;a target="_blank" mce_href="http://www.dreamhost.com" href="http://www.dreamhost.com/"&gt;DreamHost&lt;/a&gt; will send requests to &lt;em&gt;MyDomainName.com&lt;/em&gt;.  It should be set to:&lt;/p&gt;
&lt;p mce_style="text-align:justify;padding-left:30px;" style="text-align: justify; padding-left: 30px;"&gt;&lt;span mce_style="color:#000080;" style="color: rgb(0, 0, 128);"&gt;/home/username/MyDomainName.com/MyRailsSite/public&lt;/span&gt;&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;By setting the directory to the &lt;em&gt;public&lt;/em&gt; directory of your Rails site, it means that users cannot navigate outside of that directory and browse places that they aren't supposed to be.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Let's finish up and deploy our Rails site from the local machine to the remote server.  We'll use Explorer and ftp to do this.  Open up Explorer and type &lt;em&gt;ftp://ftp.MyDomainName.com&lt;/em&gt; into the address bar.  Now open up the &lt;em&gt;MyDomainName.com&lt;/em&gt; and then &lt;em&gt;MyRailsSite&lt;/em&gt; folders.  You will need to copy your app directory from your local machine at &lt;em&gt;c:\projects\myrrailssite\app&lt;/em&gt; up to the remote server.  When you have copied these files, navigate to the &lt;em&gt;pubilc &lt;/em&gt;directory on the remote server and delete the index.html file.  We don't need the Rails welcome page on live anymore either!  Then navigate to the &lt;em&gt;config&lt;/em&gt; directory and copy the &lt;em&gt;routes.rb&lt;/em&gt;, &lt;em&gt;environment.rb.live&lt;/em&gt; and &lt;em&gt;database.yml.live&lt;/em&gt; files up to the corresponding folder on the server.  Don't forget to rename these to &lt;em&gt;environment.rb&lt;/em&gt; and &lt;em&gt;database.yml&lt;/em&gt; on the remote server.  We only renamed them so that we could have two different files locally.  Finally, navigate to the &lt;em&gt;config/environments&lt;/em&gt; folder and copy the &lt;em&gt;production.rb&lt;/em&gt; file that we edited up to the corresponding location on the remote server.  From now on, when you deploy your site, you will only have to copy the &lt;em&gt;app&lt;/em&gt; folder to the remote server (unless you change config settings that is).&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;The final step before we can test our site on live is to setup the MySQL database on the DreamHost side to match the one we set up locally.  Since we didn't create any database tables, this is fairly simple to do through the DreamHost interface.  Go to Goodies-&amp;gt;Manage MySQL and repeat the same steps here as we did in step 8.  You can also use HeidiSQL if you want to manage your database remotely that way.  However, for now I recommend using the DreamHost web interface to do this work.  All you need to ensure is that the database name and username/password for that database match the settings you specified in your database.yml file.  I'm going to cover using databases in Rails in more detail in a future article.  For now we just need to get an empty database and a user that has access to keep Rails happy.&lt;/p&gt;
&lt;p mce_style="text-align:left;" style="text-align: left;"&gt;Congratulations!  Assuming that everything was wired up correctly, you should now be able to open a browser and navigate to &lt;em&gt;http://www.MyDomainName.com&lt;/em&gt; to see your site being hosted remotely.&lt;/p&gt;
&lt;p mce_style="text-align:justify;" style="text-align: justify;"&gt;Hopefully this article will help you get up and running with a basic Rails site that is hosted remotely.  The focus of this article was understanding the relationship between running a Rails site locally and hosting it on a remote server.  Setting up your development in this way from day one will save a lot of headaches later when it comes to deployment time.  Developing and testing locally, then deploying to a live host means that problems can be identified early and that changes can be tested locally rather than on a live site.  I'm going to expand upon this article as part of my ongoing experiement with ASP.NET, Silverlight, PHP, and Ruby on Rails.  Next we're going to develop a database, understand models using ActiveRecord, and dig a little deeper into Rails.  For now: happy hosting!&lt;/p&gt;&lt;img src="http://blogs.sftsrc.com/stuart/aggbug/109.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stuart Thompson</dc:creator>
            <guid>http://blogs.sftsrc.com/stuart/archive/2008/10/28/109.aspx</guid>
            <pubDate>Tue, 28 Oct 2008 22:29:21 GMT</pubDate>
            <comments>http://blogs.sftsrc.com/stuart/archive/2008/10/28/109.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.sftsrc.com/stuart/comments/commentRss/109.aspx</wfw:commentRss>
        </item>
        <item>
            <title>The ASP.NET, Silverlight, PHP, Rails Experiment</title>
            <link>http://blogs.sftsrc.com/stuart/archive/2008/10/27/108.aspx</link>
            <description>&lt;p style="text-align: justify;"&gt;I've been working with &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/default.aspx"&gt;Microsoft technologies&lt;/a&gt; for over ten years, specifically &lt;a target="_blank" href="http://www.asp.net/"&gt;Microsoft's web development technologies&lt;/a&gt;.  During that time I have built a variety sites ranging in scope from e-commerce, educational, service provision, &lt;a target="_blank" href="http://en.wikipedia.org/wiki/Software_as_a_Service"&gt;SaaS&lt;/a&gt;, to dashboards, portals, internal tools, and even SAP-migration.  While I praise the technology stack for what it allows me to do, it also comes with a whole host of limitations that make it hard for me to deliver the experience my clients would like.  Throughout this decade of web development I have heard a lot from those around me about alternative technology stacks that promise all manner of improvements and experiences.  Unfortunately there is a lot of resistance from any one technology stack to listen to and learn from the stacks around them, most of the cross-platform feedback comes in the form of "Microsoft sucks" or "PHP is for fan-boy script kiddies".  The truth is that a large number of successful business are hosted on a wide variety of platforms.  Each technology stack has to at least be viable for that to be true.  The problem is getting at the truth without the zealous noise of "my stacks better than your stack" getting in the way.&lt;/p&gt;
&lt;p style="text-align: justify;"&gt;I decided that it was time for me to branch out and become more informed on these technologies myself so that I could truly understand the differences and what made each of them unique.  I'm hoping that as part of this experience I can not only become a better developer but also learn the problems that Ruby on Rails or PHP addresses.  I'll like to be able to speak from an informed standpoint about the differences between the Microsoft and open-source approaches as well as better understand the problems each of those development worlds faces on a daily basis.  Either way, it's going to be a heck of a lot of fun.&lt;/p&gt;
&lt;p style="text-align: justify;"&gt;The experiment I have in mind is to build the same web-site using four different technologies.  From the Microsoft camp I have chosen &lt;a target="_blank" href="http://www.asp.net"&gt;ASP.NET&lt;/a&gt; and &lt;a target="_blank" href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt;.  From the open-source perspective I have chosen &lt;a target="_blank" href="http://www.php.net/"&gt;PHP&lt;/a&gt; and &lt;a target="_blank" href="http://www.rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt;.  I chose PHP and RoR because they are two technologies that I have always wanted to learn.  Learning both of those will also require some digging into &lt;a target="_blank" href="http://httpd.apache.org/"&gt;Apache&lt;/a&gt; and &lt;a target="_blank" href="http://www.linux.org"&gt;Linux&lt;/a&gt;, another two areas that I have too little direct experience with to effectively participate in an informed conversation.&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;a href="http://www.asp.net"&gt;&lt;img height="44" width="108" alt="" src="http://stuartthompsontech.wordpress.com/files/2008/10/logo.png" title="ASP.NET" class="alignnone size-full wp-image-48" /&gt; &lt;/a&gt; &lt;a href="http://www.silverlight.net"&gt;&lt;img height="45" width="131" alt="" src="http://stuartthompsontech.wordpress.com/files/2008/10/silverlightlogo.jpg" title="silverlightlogo" class="alignnone size-full wp-image-49" /&gt; &lt;/a&gt;&lt;a href="http://www.php.net"&gt;&lt;img height="49" width="86" alt="" src="http://stuartthompsontech.wordpress.com/files/2008/10/php.gif" title="php" class="alignnone size-full wp-image-50" /&gt; &lt;/a&gt;&lt;a href="http://www.rubyonrails.org"&gt;&lt;img height="54" width="42" alt="" src="http://stuartthompsontech.wordpress.com/files/2008/10/rails.png?w=74" title="rails" class="alignnone size-thumbnail wp-image-51" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="text-align: justify;"&gt;Our horses are ready to race.  In terms of hosting, I have selected &lt;a target="_blank" href="http://www.dreamhost.com"&gt;DreamHost&lt;/a&gt; for the PHP and Rails sites, and I'm going to use &lt;a target="_blank" href="http://www.stormhosts.com"&gt;StormHosts&lt;/a&gt; for the &lt;a target="_blank" href="http://www.asp.net"&gt;ASP.NET&lt;/a&gt; and &lt;a target="_blank" href="http://www.silverlight.net"&gt;Silverlight&lt;/a&gt; projects (assuming that SH can do .NET 3.5, which I believe I saw at some point).  The reason I'm using remote hosting services for this experiment is that I don't believe you get the true experience of a technology stack until you host it in this way.  It is very easy to get a Rails site up and running using &lt;a target="_blank" href="http://www.webrick.org"&gt;WEBrick&lt;/a&gt; and a local installation of Ruby.  Similarly, it is easy to get an ASP.NET site running on the personal web server that ships with &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/vstudio/default.aspx"&gt;Visual Studio 2008&lt;/a&gt;.&lt;/p&gt;
&lt;p style="text-align: justify;"&gt;The first phase of the experiment is to get a "Hello World!" site up and running for each of the four environments.  The specifications are that a single end-point be accessible that displays the text "Hello World!" and that this end-point is accessible in both &lt;a target="_blank" href="http://www.microsoft.com/windows/products/winfamily/ie/default.mspx"&gt;Internet Explorer&lt;/a&gt; 7 and &lt;a target="_blank" href="http://www.mozilla.com/en-US/firefox/"&gt;FireFox&lt;/a&gt; 3.&lt;/p&gt;&lt;img src="http://blogs.sftsrc.com/stuart/aggbug/108.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Stuart Thompson</dc:creator>
            <guid>http://blogs.sftsrc.com/stuart/archive/2008/10/27/108.aspx</guid>
            <pubDate>Mon, 27 Oct 2008 20:06:37 GMT</pubDate>
            <comments>http://blogs.sftsrc.com/stuart/archive/2008/10/27/108.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.sftsrc.com/stuart/comments/commentRss/108.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>