New Rails Project (part 2) - Plugins

July 11, 2008

Now we have a deployed application we can add some plugins to get those extra bits of functionality we want.

Missing Directories

What we've done so far has created a rails project that is to minimal. Applying git and uploading the project has removed any empty directories. If you get errors just create the directories. e.g.

mkdir -p vendor/plugins

Installing plugins on GIT branches

Might be a good idea to install plugins on branches. With sufficient git-fu we should be able to remove plugins later if we really wanted to. This could be a good tip for experimenting with plugins. So for each plugin do

git branch plugin_name
git checkout plugin_name
git add .
git commit -m "installed plugin_name"
git checkout master
git merge plugin_name

Haml and Sass

Haml and Sass are no brainers for me. There are alternatives, but everything I've done with Haml and Sass has pleased me

Assuming you've installed the haml gem, at the root of your project run

 haml --rails .

Testing Framework

Here things get a little more difficult. Basically I'd like to use the full RSpec stack with plain text user stories, but it just seems to be too hard. Also my current user doesn't seem that interested. Really finding that learning curve for RSpec is so steep that I end up not testing.

An alternative is "shoulda". This builds on top of rails in built tests instead of replacing them. Its been suggested that its a gentle way to get into BDD. Anyhow I am tempted by it.

script/plugin install git://github.com/thoughtbot/shoulda.git

Attachments

So far I've used attachment_fu and been fine with it. However there is an alternative called paperclip by the same people who have done shoulda. This seems simpler to use and gets mucho praise in the blogsphere.

script/plugin install git://github.com/thoughtbot/paperclip.git

Tagging

So far have used acts_as_taggable_on_steroids however a newer plugin acts_as_taggable_on exists which supports multiple tag sets. This means that on my list of products I could have a :category, :location tags etc.. This extra functionality might be useful.

script/plugin install git://github.com/mbleigh/acts-as-taggable-on.git