[Rails] How to install Thoughtbot’s Suspenders

Suspenders by Thoughtbot

I’m a HUGE fan of the team over at Thoughtbot. I’ve been looking over a couple different Rails templates as a means to speed up new project setups, so I decided to try on their Suspenders.

Unfortunately, following their installation instructions may get you to where I was: Nowhere Land.  I kept getting these wonderful error messages anytime I would create a new project:

fatal: remote error:   Could not find Repository thoughtbot/suspenders-gem

From the code, it appears the trout file was trying to checkout from their old repository. Their latest code on master seems to be the best place for updates, so a quick fix was to just build the gem from there (code found in the Rakefile):

git clone git://github.com/thoughtbot/suspenders.git
cd suspenders
mkdir -p pkg
gem build suspenders.gemspec
mv suspenders-.gem pkg
cd pkg
gem install suspenders-.gem

I use RVM (as you should too), and before I performed this I switched to my 1.9.2@rails3.1 gem set that I use in the directory that I start in for all my projects. Something you may want to consider as well.

Booom! Suspenders in full force! Enjoy.

Add the Rails console to your browser!

Rack/Rails web-console

Rails web console

[UPDATE]:  Please note, this gem is for DEVELOPMENT PURPOSES ONLY.  Do not use in production.

I came across an awesome gem today: rack-webconsole.  As the name suggests, it adds the rails console to your browser!  No more switching back and forth between the terminal.  This gem is awesome!  This has to be the easiest installation too.  Just add this line to your Gemfile:

gem 'rack-webconsole'

Once you’ve bundled:

bundle install

Just restart your web server and you’re up and running.  Bingo!  Unity.

If you really don’t understand how useful this is, then you really need to read the Secrets of the Rails Console Ninjas.