Prototyping Ruby on Rails Checklist to Get Started

Update May 10: this article is no longer password protected. Explanation why.

Here is a brief reminder to myself before starting up a prototyping session.

Some of the activities below are done only once on the current machine, some of them you must do with every project. I just wanted to have it all on the same list.

Laptop preparations

This is for my Windows XP laptop:

  • Subversion repository up and running (so you can immediately add the project).
  • I do this by installing TortoiseSVN and following this explanation in “how to create a temporary local Subversion repository“.
  • Add subversion users and authorization for the current project
  • Download latest version of Ruby on Rails (i tend to use latest stable, but latest from trunk would be OK as long as all tests pass). See section on Ruby gems and plugins
  • Download and prepare editor (currently I use e-texteditor. As a sidenote, Aptana released a beta version with rails support the other day but it didn’t work for me out of the box, so I stick to e-texteditor.)
  • Let E-texteditor do the Cygwin install (this way, rails bundles work without extra effort).
  • Then run cygwin install manually to add the following packets:
    subversion, curl, wget, openssh, and I need some text browsers as well for testing pupose (Links and Lynx).
    The cygwin install file is in “C:\Program Files\e\support\bin”
  • Check that your database drivers work and are running the basic operations. I prefer SQLite as it’s faster to run from my laptop computer and tests are running faster.
  • I prefer a good diff tool like ExamDiff Pro (which tells me the exact parts of lines that are changed), although the built-in diff tool in TortoiseSVN is decent.

Ruby gems and Rails plugins

Assuming you have Ruby and RubyGems installed, install the other gems needed:

[code lang=”ruby”]gem install rails –include-dependencies #run only if needed
gem install rake piston sqlite3-ruby mysql –include-dependencies
#Command line commands to test your install: gem, rails, svn
#
#Remember Mongrel as well
gem install mongrel –include-dependencies
#
#I also use these on a regular basis, but leave them out for now:
#gem install scrubyt rspec rcov rubyful_soup mechanize hpricot zentest mocha cheat –include-dependencies
[/code]

Get hold of ActiveScaffold plugin and my LocalizationSimplified plugin (project page), and Rails trunk if you like. (maybe I should also add Smart-Form, and the Caboose sample app, but won’t add it here before I try it out)

With the help of Piston, it’s easy to administer plugins and version them:

[code lang=”ruby”]cd vendor/plugins
piston import http://dev.rubyonrails.org/svn/rails/trunk vendor/rails
piston import http://activescaffold.googlecode.com/svn/tags/active_scaffold
piston import svn://rubyforge.org/var/svn/l10n-simplified
[/code]

Client preparation

At the client’s place, I look for the following preperational work:

  • Find documentation for all accessible apis and services
  • Try it
  • Locate people that might know about the services and apis available
  • investigate authorisation and access issues regarding services and apis
  • locate other data, lists, sample data, categories that could potentially be used as fixture data in the prototype app.
  • Have a look at existing design. Perhaps design manuals, homepage design, fetch logos or existing graphical material. There might be a page or two that can be used as layout inspiration (Not many pages I see are coded the way I want to build the HTML, so usually I make my own layout.rhtml file).
  • Find some standard CSS based layouts that fit your need. More inspiration in the sidebar article “More CSS inspiration”.

More CSS inspiration

Good example from Roger Johanssons 2 column layout. For 3 column layouts, I have not yet found one that fits my needs perfectly. Previosuly I used redmelon’s 3 col layout for Nemkonto (redmelons website and old link is currently not working). A place to get inspiration is the 3-column layout page at CSS-discuss (be warned that there are too many alternatives there).

Your tips, tricks and suggestions

Let me know if you have anything that you would like to add to the list, discuss, or think is irrelevant. I’d love to update this post with your suggestions. Main criteria for me: Fast up and running (Getting immediate productivity). Team collaboration in code (so no complex setup features). Please add your good suggestions and comments below.

Technorati Tags: , , , , , ,

9 Responses to “Prototyping Ruby on Rails Checklist to Get Started”

  1. Ruby on Rails Examples Says:

    Nice and useful list.

  2. dalager Says:

    In order to localize active scaffold, go for http://code.google.com/p/activescaffoldlocalize/
    I just attached a danish translation to issue 3 (not in trunk yet)

  3. Jesper Rønn-Jensen Says:

    If you’re planning a cygwin-only installation, then Pluit has a trick to “unset RUBYOPT” environment variable before running rubygem’s setup file.

    http://www.pluitsolutions.com/2006/03/30/install-ruby-on-rails-ror-on-cygwin/

    Very useful for me.

  4. Andy Waite Says:

    I’ve written a little on the possiblity of using Markdown to create forms for rapid prototyping: http://www.andywaite.com/2007/8/5/markdown-for-forms

  5. Tobias Says:

    I had some problems with using the SQL Server adapter, due to DBI not being installed as default with cygwin ruby, so I had to install it manually.

    Some instructions here:
    http://www.kitebird.com/articles/ruby-dbi.html
    http://wiki.rubyonrails.org/rails/pages/SQL+Server

  6. Tobias Says:

    Additional: I found out that ODBC is not supported in the standard installation of Cygwin and Ruby. I had to install FreeTDS and the ruby-odbc and ruby-dbi, following these directions:

    http://www.haidongji.com/2006/08/31/connecting-to-sql-server-from-unix-or-linux-with-freetds/

    and then

    http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServerFromRailsOnLinux

  7. justaddwater.dk | Ruby on Rails Checklist Now Public Available Says:

    […] Today I’ve removed password protection on the article “Prototyping Ruby on Rails Checklist to Get Started“. […]

  8. King of flowers Says:

    Very cool check list. If I were to give advice, I would say add more gems :), mongrel and rails are just basics.

    Thanks
    David

  9. Jesper Rønn-Jensen Says:

    For some reason I had to reinstall my ruby lib and now my gem list looks like this:

    gem install rcov ruby-debug sqlite3-ruby mysql watir rake hpricot cheat hoe rails piston

    and then of course mongrel