I hadn’t been to visit the Hobo site in a while so after posting about our article, I swung by and they had done a more detailed screencast which is very informative.
We submitted an article to Rails Magazine recently which was published in Issue 7. It’s the first of a tutorial on Hobo. I had been exploring Hobo and posted on it here in the distant past. I also posted here on how easy it was to deploy on Heroku. Hobo is an application development framework on top of rails. It’s half framework, half starter-app and worth a look.
In my previous post I created my first Hobo application. I wanted to show off the fruits of the 5 minutes of hard labor to my partner, so I decided to push it to Heroku. I ran into some problems because I’m using Rails 2.3.8, which Heroku hasn’t deployed for general use. It is available on their bamboo stack.
After much fumbling and my inability to get the .gems file right (because of gem dependencies of Hobo) I decided to give Gem Bundler a try and it magically solved all my problems.
Here’s what I did…
Install Gem Bundler (gem install bundler).
Create a Gemfile with the following:
gem 'rails', '2.3.8'
gem 'hobo', '1.0.1'
Then to bundle your gems, run bundle install from your app directory. When Gem Bundler is done crunching, the next thing to do is get it up to Heroku. Since I needed to run this on their Bamboo stack, I had to create an app specifically for that stack.
First things first, add everything you need to your git repository (Heroku explains how to do this).
To create a Bamboo stack application, just run
heroku create --stack bamboo-ree-1.8.7 --remote appname
…then push your git up to Heroku…
git push appname master
…you’ll notice a lot of activity while Heroku installs gems. Hobo is a pretty complete framework so it uses a ton of them. Grab a snack while you wait.
Finally, just migrate your database…
heroku rake db:migrate --app heroku-app-name
Make sure you use the app name Heroku uses.
That’s it! I had my Hobo app running in just a few minutes. If you’re using a Rails version that doesn’t require the Bamboo stack, it should be even easier using the normal Heroku deployment tricks. I’m glad to see Gem Bundler will be the default gem management tool for Rails 3. It definitely made my life a lot easier.
I was roaming the interwebs seeing what was new in the world of improved generator scripts and scaffolding in Railsland and found Hobo. I’m completely blown away so far.
Having come from doing web development in .NET or Java, Rails in comparison is a huge shortcut to getting something up and running. Hobo is an additional layer of get-it-up-fast goodness that’s just friggin incredible. I came home from visiting family today and had checked out the introductory video on the Hobo site and came home anxious to try it.
I’m running Rails 2.3.8, which is newer than the latest version of Hobo so I was a bit concerned about compatibility. To test it out, I have been wanting to put together an application for our enterprise to keep a vault of all of our business ideas. Longer term I was thinking of making a Digg like feature so everyone can vote up or down the ideas, challenge monetization schemes, etc. and may the best ideas win.
First things first, using Hobo I made a simple app that allows users to register and create business idea records in the database. It took a grand total of 5 minutes including bathroom breaks.
Here’s the command line action from start to finish to create my initial ideavault application:
sudo gem install hobo
script/generate hobo_model_resource businessidea name:string description:text revenuemodel:text technolgysummary:text
The Hobo migration script has a couple of questions which I answered as described in the tutorial. Then I just fired up the server and my hobo app magically appeared…
Hobo uses it’s default templates to give the initial style to the pages and is easily changed. The first user you create is an admin user unless you modify the code that does that. I went ahead and created myself as the first user and clicked on the Businessideas tab (I’m actually regretting choosing that as the name now that I see it on the UI, but I’m sure I can change it easily enough on the tab).
My new Hobo app cheerfully welcomed me as a new user and I was able to create new business ideas to my heart’s content.
Hobo created all of the infrastructure for user creation and authentication. The Account menu provides the ability to change passwords, etc.
I can’t wait to find out what else Hobo can do. I downloaded the free PDF books from the Hobo site. I expected them to have been cobbled together in a weekend over many beers, but these are market quality, professional publications.
I’ll continue to flesh out this application using Hobo and will post my adventures. In the mean time I encourage any Rails developer to check this one out.