Showing posts with label Rants. Show all posts
Showing posts with label Rants. Show all posts

Monday, June 29, 2009

Some very helpful Ruby tomes

I have just going through Workshop 6 and the Topic reading: (Hartl)

This made mention of David Hannermeir Hansens 15 minute blog development presentation. http://media.rubyonrails.org/video/rails_take2_with_sound.mov in the introduction. I watched this (i suspect that Craig had recommended this earlier) and wish that I had seen this earlier in the subject.

Having watched the demonstration, I read (Collingbourne)

I now feel that I have a much better grasp of ROR, because of these references. I have gotten back into the first few chapters of (Hartl) and really wish that this had been recommended prior to Workshop 1. It goes through a nice seemingly simple step by step process for setting up rails, and actually specifies requirements. There is a distinct chance that maybe hindsight is playing a part in my thinking, remembering back to the number of lost hours trying to get a working setup.

However, what really got me to put this missive together was a single line in (Hartl, s2.2.1)

In case you ever need to undo the work done by generate, you can use ruby script/destroy controller . That's certainly a lot easier than deleting a bunch of files by hand.
which clarified in my mind where I had been going wrong in my attempts at building the OTBS. i may well have seen this before, but I don't remember seeing this in the same section as talking about generating the controller. But then again, this may well be hindsight in action.


References
Collingbourne, H (2008)"The Little Book of Ruby"
Hartl, M & Prochazka, A, (2008). RailsSpace: Building a Social Networking Website with Ruby on Rails, Pearson Education

Thursday, June 11, 2009

Exercise 10: Posting shenanigans

I just don't understand blogger sometimes. I had published the blog (Answers 1-6) and the tables were all over the shop. I have just done a cut and paste of the same code, and republished. Amazingly the result looks like it was supposed to. There could be something in that I used Windows live writer in this instance to re-publish, whereas I used blogger to post originally. Unfortunately, if you had been following my blog, then you would have known that i experienced the exact opposite scenario earlier on in the journey. Those blogs (Karen posted comments) may no longer exist, as it was very much a learning curve in the early days, and reorganisation of the material was in order.

Wednesday, May 27, 2009

Workshop 1: Setting up Ruby on Rails

Well I decided that the Win7 environment was a little bit too progressive to try and get the Ruby environment operational. I was getting security issues with the Aptana IDE not recognising the MySQL installation. I downloaded MySQL v5.1 and tried to install that. The installation stalled when it was trying to create the initialisation file, so I was unable to set the root password or create the admin user. So I decided to start again. Last night I created a new VM and loaded XP SP3. I then loaded MySQL v5.1 and the MySQL v5 GUI tools. This time the installation went off without a hitch and I was able to create the initialization file. I installed Aptana, then installed the RADRails perspective, which loaded all the relevant gems. I created a default/ test project using SQLlite3 and this worked fine, first go. That working I attempted to create a project using MySQL as the database. Unfortunately there are still errors being thrown and it is indicating that their are missing files relating to the MySQL gem. This fails midstep. So I have decided that their is little prospect for me to be able to learn anything if I continue trying to get MySQL to work. Consequently all further work will involve me using SQLlite3 as the database backend. And thanks to Ken for giving that the ok today.

Monday, May 25, 2009

Workshop 1: Loading MySQL

I have been attempting to get MySQL installed on my VM for the past few days, have had no luck and am not going to devote anymore time to it.

I goy the Aptana IDE installed, and it seems nice enough, and relatively easy to use. I followed the demo video on Saturday and had to replay the steps a few times to see what options they selected. I got the example to work. Was unable to get anything working if I chose MySQL as the default database. I get errors stating that the machine is denying the request. I don't have a screenshot of the error message unfortunately.

Having had no luck I decided that I would attempt to install MySQL on the VM. As I said above, this has proven to be unsuccessful. As this course is not about Installing and configuring MySQL I don't believe it is worth the time to track down the cause of the issue.

This is a screenshot of the Aptana IDE showing the working test project. It may be that I am impatient, or far to used to a Windows wizard as far as installations go. I say that because the InstantRails install that I did left a lot to be desired. If you install something why do you then have to actually find the documentation that tells you how to configure it. Why wasnt that part of the installation process. I experienced this with the MySQL install as well. I only found the InstantRails config documentation tonight when I was trying to fix up the MySQL install. Well thats enough for now, back to the exercises. Until next time ...

Wednesday, May 20, 2009

Exercise 1: Weirdness, response to Karens comment

The issue I was trying to bring to light can hopefully be better explained by the following 2 screen shots:
The first image shows the gap I am talking about.
The second screen shot displays the code that is somehow generating the gap.

Tuesday, May 19, 2009

Exercise 1: Getting weird and unexplained layout using a table.

You may be able to see my problem that is causing me to lose hair. Have just wasted umpteen minutes trying to get the table positioned correctly in the blog. But as you can see it is appearing WAY down the page. Has anyone experienced this before. I am not a html expert, have done very little in fact so not sure why this table is being pushed down. Hoping that someone could provide a hint.

Workshop 1: Learning Ruby

I downloaded the Audio (Lessons 1-8) from LearningRails and also the Screencasts (Lessons 9-23). Having never used a podcast in any form before, and not one to burn music, copying these to a format I could listen to in the car on the commute to and from work turned into a challenge that wasn't.

An aside:

The iTunes player didn't work very well in burning to disk. This may have been for a number of reasons. There may be a bug in Win7 RC that caused my DVD burner to lose itself intermittently. The burner itself may have had a problem. The iTunes interface may have been my problem.

In the end I stopped using my main machine and used my laptop. This is a dell XPS1330 and also has Win7 RC installed. This showed the benefits of the homegroups concept introduced in Win7, and the ease with which network setup and connections is now handled.

Now back to the point of the blog. I finally got the podcasts (audio lessons 1-8) copied onto 3 CDs. Listened to the first 6 episodes today and found that they give a very good, yet brief overview of the Ruby language. Hopefully 7 and 8 tomorrow will give me some idea about actually getting started with Ruby development.

Sunday, May 17, 2009

Workshop 1: InstantRails success – Ruby now working

Got to have some fun with testing Win7 and creating a virtual machine. Worked fine after I had fiddled a bit with some of the settings.

Got my completely vanilla Win7 virtual machine set up about 4pm. Have run the InstantRails app and it has all worked.

Have played with the Cookbook app, sort of but am not sure what I am connected to. Have never played with a Hosts file before so am presuming that when changed to point mycookbook to 127.0.0.1 it worked, but when you run the site how do you tell?

Workshop 1: Ruby fun

I am having a wonderful time trying to get ruby to work.
I have downloaded itunes64, installed it and have proceeded to download lots of podcasts(in the learning rails series)
On unzipping the Instantrails zip file (this took longer than I expected, in the order of 5 minutes or so. Seems excessive for a 170MB expansion)and trying to run the InstantRails app was informed that my file path could not contain spaces. Painful to say the least.
Got a new path and copied all the files (only about 40000 of them)
Ran the InstantRails app and get the following error:
My machine is running Windows 7 64bit, have VS2008 professional installed with SQL2008 standard edition installed.
I guess this has something to do with SQL server??
Somewhere in all of this is the answer to my problems.
I may have to resort to creating a vanilla virtual machine with nothing installed. Unless someone has some other advice.
The documentation for installing Ruby leaves a lot to be desired.