Skip to content
blizz edited this page Sep 12, 2010 · 21 revisions

There is now recipe for this on hobo cookbook


gem update --system
gem install sqlite3-ruby  (or on windows) gem install sqlite3-ruby --version 1.2.2
gem install rails --version 2.1.2

rails <appname>
cd <appname>/vendor/plugins
git clone git://github.com/tablatom/hobo.git
cd ../..
ruby script/generate hobo --add-routes
ruby script/generate hobo_rapid --import-tags
ruby script/generate hobo_user_model user
ruby script/generate hobo_user_controller user
ruby script/generate hobo_front_controller front --delete-index --add-routes 


If you are behind a restrictive firewall you can use the slower http:// protocol


git clone http://github.com/tablatom/hobo.git

To use mysql for the database instead of sqlite then use the -d command with rails generator and install the mysql gem


gem install mysql
rails -d mysql <appname> 

For those using windows here is a batch file that creates a hobo app. Paste this into a text editor and save as githobo.bat. You will still have to do the gem installs manually.

If you put it in \windows\system32 you should be able to execute it from anywhere. Just open a command window and change to the directory where you want your hobo app to reside.


::
:: githobo.bat - windows script to create edge hobo webapp
::

@IF "x%1"=="x" GOTO echousage

@ECHO.
@ECHO Creating hobo webapp %1

CALL rails %1 %2 %3 %4 %5 %6 %7 %8 %9
IF NOT EXIST %1 GOTO :error_rails

cd %1\vendor\plugins
CALL git clone git://github.com/tablatom/hobo.git
IF NOT EXIST hobo GOTO :error_hobo1
GOTO skip_http
:http_git
CALL git clone http://github.com/tablatom/hobo.git
IF NOT EXIST hobo GOTO :error_hobo2
:skip_http

cd ..\..
CALL ruby script/generate hobo --add-routes
CALL ruby script/generate hobo_rapid --import-tags
CALL ruby script/generate hobo_user_model user
CALL ruby script/generate hobo_user_controller user
CALL ruby script/generate hobo_front_controller front --delete-index --add-routes
cd ..

@ECHO complete.
@GOTO end

:error_hobo1
@ECHO WARNING: git:// failed falling back to http://
@GOTO http_git

:error_hobo2
@ECHO ERROR: git failed
@GOTO end

:error_rails
@ECHO ERROR: rails generator has failed
@GOTO end

:echousage
@ECHO.
@ECHO %0 script automates hobo app creation
@ECHO    * executes rails generator
@ECHO    * edge hobo retrieveal using git
@ECHO    * calls hobo generators
@ECHO.
@ECHO usage:
@ECHO          %0 ^<app_name^> [rails generator options]
@ECHO.
@ECHO example:
@ECHO          %0 agility -d mysql
@ECHO.

:end 
@ECHO.

Clone this wiki locally