Rails 3 Cheat Sheet

Here are some quick tips for common Rails tasks.

Getting Started

To create a new application use the command:

rails new APP_NAME

Remember that if you want to create a template for building a Rails app, you can pass the rails new command a template using the -m or –template option.  To quickly create a template, be sure to check out the RailsWizard.

After you create an application, you’ll most likely want to test the result by starting the built-in server (WEBrick).

rails server

For those lazy programmers out there, you can just use rails s.


Useful Links

For more information on coding in Rails, its many uses, and  other items of interest, check out the following sites:

Visoft, Inc. Sites

def rails – The resources for Visoft’s Rails courses (this site).

Visoft, Inc. Home – The Visoft, Inc home page.

Visoft, Inc. Blogs – Various articles covering .NET, C#, Ruby, and Rails.

Developer’s Bookcase – The inspiration for the Bookcase application from the Rails 101 class.  A place for developers to log all of their books.

EageReader – A clone of devbookcase.com for general book lovers.


Installing E-TextEditor and Cygwin

E-TextEditor is a very useful tool in the world of Ruby on Rails.  It combines a robust text editor with syntax highlighting for a large library of languages while also incorporating Cygwin (a UNIX shell for Windows) in order for you to build and execute code directly in the text editor.

E-TextEditor utilizes bundles, which allows for endless possibilities when it comes to support for languages and frameworks.  E is similar to a program called TextMate that runs solely on the Mac, but thankfully programmers can enjoy a comparable experience on Windows. In fact, E-TextEditor runs many of TextMate’s bundles on Windows.  This is all thanks to Cygwin. “Get that Linux feeling – on Windows!”