rubybook = :title => “Gerald Bauer’s Ruby Notebook”, :about => “Internet Professional in Vancouver, B.C.”

Gerald Bauer’s Ruby Notebook

How To: Create a mobile web (iPhone) site using iUI and Ruby on Rails 2.0

leave a comment »

Let’s develop a mobile web application using Ruby on Rails running inside a WebKit browser (such as Safari on iPhone) using the iUI library. We’ll create a mini mobile version of Craigslist that lets you browse classifieds for apartments.

Figure: RoomieNATOR in Action

Let’s get started. You can get the source from the Vancouver.rb subversion repo on RubyForge. To checkout the sample mobile web application type on the command line:

$ svn checkout

Note, the source requires Rails 2.0.2+ with SQLite.

Change to the Rails application folder and build the sample database and populate it with sample users, neighbourhoods, postings and bookmarks using fixtures. On the command line type:

$ cd roomie
$ rake db:migrate
$ rake db:fixtures:load

Note, the two users setup are bob and alice using the password test.

Start up the web server (script/server) and test drive your installation. To be continued.

Any comments, corrections or additions about the how-to on creating a mobile web (iPhone) site using iUI and Ruby on Rails? Send them along to the Vancouver.rb Mailing List/Forum. Thanks!

Written by Gerald

February 12, 2008 at 4:43 pm

Comments are closed.