1.1. WindowsWe present two options for a Windows installation of Ruby on Rails: Instant Rails and RadRails alone and Instant Rails plus the Rad Rails IDE. 1.1.1. Instant RailsThe easiest way to get started on Windows is to use Instant Rails. Instant Rails (Figure A-1) is a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all preconfigured and ready to run. There is no installer, you simply unzip it into the directory of your choice and run it. It does not modify your system environment. Figure A-1. Instant RailsFor more details about Instant Rails, go to the Instant Rails home page at http://instantrails. rubyforge .org:
That's all there is to it! Instant Rails includes the cookbook Rails application from the ONLamp.com article "Rolling with Ruby on Rails" (http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html). The cookbook application is included as a preinstalled sample application. There is also a version of this tutorial that was rewritten to be specific to Instant Rails available at http://instantrails.rubyforge.org/wiki/wiki.pl?Rolling_With_Ruby_On_Instant_Rails_Tutorial. Instant Rails also includes the Photo Share application from this book. Instant Rails includes the Apache web server, which you won't use until later in the development of a Rails application, when you want to more closely duplicate your final deployment environment. During development, it is easiest use Ruby's built-in web server, WEBrick, or the new Ruby Mongrel server. So, for example, to run the cookbook application, execute the Instant Rails menu command Rails Applications Manage Rails Applications..., select the checkbox next to the cookbook application, and press the "Start with WEBrick button. When you browse to http://127.0.0.1:3000/, you will see the cookbook application. Instant Rails includes the One-Click Ruby Installer for Windows for its Ruby interpreter, which includes the SciTE text editor with full Ruby syntax highlighting. After installing Instant Rails, you can find the SciTE executable at InstantRails/ruby/scite/SciTE.exe . 1.1.2. RadRailsIf you want more than a simple text editor, then try out the excellent RadRails IDE. RadRails (Figure A-2) is an Eclipse plug-in and is available as both a standalone IDE (Eclipse with the plug-in preinstalled) and as a standard Eclipse plug-in at http://www.radrails.org. With RadRails, you get a full IDE, complete with an integrated GUI debugger. Figure A-2. RadRailsAfter you install RadRails, you have to configure it to work with your Instant Rails installation:
You can create a new skeleton Rails application via the menus with File New... Rails RailsProject. |