Friday, March 16, 2012

Rails on *shudders* Windows...


Okay—so after I nearly killed my computer, I decided to be safe and play with Ruby and Ruby on Rails by booting up the side of my harddrive I rarely use—the Windows side.  My initial plan was to clear out that side and install Linux to play with Ruby and Ruby on Rails, but I decided just for giggles to try out installing Ruby 1.9.3 with Windows.  It is with great pain that this Apple-lovin’ gal says:  it was so much easier. 

With Windows, you have the option of using Ruby Installer  This page makes the installation of Ruby almost dreamlike.  You simply click on the big “Download” button and it downloads an executable program.  You run it.  Magic happens.  Now—I’m not ready to give up on my Mac and go running as a proponent for Windows, but this is a nice solution to help me continue on my Ruby on Rails tutorials for my New Media Theory and Practice class.  I’ll figure out how to get this happening on Lion this summer.  I will not be defeated!

Once I got Ruby 1.9.3 up and running on my Windows side, the installation of Ruby on Rails was pretty smooth.  I just had to take one pit stop to install Ruby Gems, which is a project manager for Ruby.  Using Ruby Gems, I was able to install Ruby on Rails with a simple Ruby Gems command.  From there I was finally able to move along to my first Rails application!

The only real trip up I ran into through this process was having to remember to change drives with in the terminal to where I had things saved.  This screen cap (below--click to view a larger version) shows two places where I got an error because I needed to change the drive my computer was looking for files in—first where I had the installer saved and then where I had my first application saved.   

Screencap of Terminal wherein drive changes were needed twice.
Screencap of Terminal wherein drive changes were needed twice.

I should note that at this point I started moving through Ruby on Rails 3 Tutorial:  Learning Rails by Example once I moved to the Windows side.  Within no time working through the tutorial from that book, I finally had a product of sorts to show for it.  I was able to create my first Rails application and then visit it on my local host.  Below is a screenshot of what I was able to produce. 

Screencap of My First App with Ruby On Rails
Screencap of My First App with Ruby On Rails (Click to view larger)

[Sidenote:  Yes, that second tab in this picture is from my Google search for how to do a screen cap when running Windows on a Mac.  The normal Mac command didn’t work and there is no print screen button on the Mac keyboard!]

Now, technically I did very little, but I think the fact that I was able to produce this preformed site so quickly speaks to the power that Ruby on Rails has for web development.   I’m looking forward to playing with these further so I can see just how far I can get with building a page from fake-scratch with the help of the tools Ruby on Rails provides.

No comments:

Post a Comment