Thursday, June 18, 2009

Workshop 3: Follow Up

I persevered with my OTBS application today, and got the style sheets incorporated into the application. So it now looks nice. Am using the same style sheets as the LearningWebApps screen casts did.

Unfortunately I have just hibernated my Virtual Machine and it takes to long to bring back up, so no pictures of the current version for now.

I was reading Workshops 5-8 this morning and got a little concerned that the flow of the workshops doesn't seem quite right. Workshops 1-4 have been about setting up the ruby environment and having it talk to MySQL. Workshop 3 had us build the model using the scaffold which effectively built a working model (minus the niceties). Workshop 5 then seems to go back to the beginning and holds your hand as you build the application. It seems like it would have been beneficial to read all 8 workshops before starting so that we didn't bumble our way through setting up an application.

Workshop 4: Puzzled

Have been going through the exercises for workshop 4 and am a little puzzled as to what is supposed to be happening with the adding values to the list. I get the list returned and nothing seems to have happened. (I think I just had an epiphany as I was writing this sentence.) It dawned on me that you need to specify the variable that you want to see. So you will see in the Image below that I have specified the value and got the expected result.


So the title above neesd to be changed to no longer puzzled.

I have looked at the challenge problems, and reviewed the code that Ken supplied. The exercises are relatively trivial and dont really provide much in the way of learning about Business Applications Development. Consequently I will not be spending time coding them.

Wednesday, June 17, 2009

Workshop 3: Link issues

Just going through the workshop document again and decided I would try to look at the screencast for migrating a prototype to a production site. Unfortunately the link to http://www.mysql.com/products/tools/migration-toolkit/tutorials/migrate-sql-server.html gets redirected to http://dev.mysql.com/downloads/gui-tools/5.0.html which although probably very useful, not what I wanted to see.

Tuesday, June 16, 2009

Workshop 3: Building the model

The model has been built. Very ugly and definitely needs revision. But its a start.

This took a few iterations to get it to work. I started out with only a few fields in my model. Fell into a hole when, after having got that to work, I tried to add the remaining fields.

Still to do with this:

  • add look up values for passenger count, taxi-type, and building
  • get the site to look nice
  • lots more little things

Workshop 3: Much rejoicing

There is much rejoicing happening because I have just gotten MySQL to play nice with ruby.

I had been getting authentication issues, which resolved themselves by explicitly stating the localhost IP address (127.0.0.1) instead of using localhost in the database.yaml.

Additionally I had been getting the following error when trying to run the migration (rake db:migrate)

rake aborted! undefined method `each' for #

It turns out that MySQL 5.1 doesn't play nicely with Ruby and so the solution is to download an older copy of the MySQL client library. This link Aptana forum solved the problem.

So I now get:

>rake db:migrate
rake db:migrate
(in C:/Documents and Settings/Grant/My Documents/Aptana Studio/OnlineTaxiBookingScheme)
== CreatePassengers: migrating ===============================================
-- create_table(:passengers)
-> 0.0300s
== CreatePassengers: migrated (0.0300s) ======================================