First, I give you a little introduction about Hobo.
Hobo is a collection of open-source plugins for Ruby on Rails that help you build anything from throw away prototypes and internal utilities to meticulously crafted full-blown web apps. The goal: write less code. So much less in fact that it starts to feel like you’re not implementing your app at all, you’re just declaring what you want.
Part 1 of 2: Install and Use SQLite as the Database Engine
1. Download the latest stable Ruby version as a Windows installer executable file ruby186-27.exe from rubyforge.org:
2. Run ruby186-27.exe and install in the folder c:\Ruby.
3. Install the SQLite3 for Ruby gem using the “gem” command:
Open up the dos prompt (Start>Programs>Accessories>Command Prompt) and run the following from the c:\ruby folder.
Choose option 1 when prompted (mswin32)
4. MS Windows PCs also require the sqlite3.dll. Download this from http://www.sqlite.org/download.html place it the “c:\ruby\bin” folder.
Unzip the downloaded file and place the sqlite3.dll under c:\ruby\bin
5. Install the latest version of Rails:
6. Install the Hobo Support gem:
7. Install the Hobo gem:
8. Create a master application folder (e.g., HoboApps) on your drive of choice (e.g., C: This folder will contain all your applications.
At the command prompt, create a new Hobo application—for example, MyTestApp. Without specifying a database, SQLite will be used as default:
The following folders will be created under the Application folder.
9. Now prepare a simple data model using the hobo_model_resource command:
Notice what is created automatically:
The Hobo user model was also created automatically by Hobo:
10. Generate the hobo_migration for these models:
Then select the “g” (generate) option and press
11. Now implement the migration using the “rake” command:
This will create the tables in the development SQLite database. You can use a tool like SQLite Analyzer to see a detailed view of what was created:
12. You could run the app now with the default WeBrick server, but Mongrel is a better performer. Install the server gem:
13. Change your directory in your command prompt to root of the new application, e.g.,
In the command prompt, type “ruby script/server”:
Now Ruby will boot the Mongrel server by default:
14. Load your browser an enter the URL accessing the default port: http://localhost:3000
Notice that Hobo uses the application folder name as the default title:
Choose the “Sign up” option. The first user to sign up will be given admin rights.
And there you go. Where done, login after you signup, and your app is ready for you.