Balancing On Rails

January 14, 2008

Making a div 100% height - A side note

This has nothing to do with Rails. It has everything to do with CSS. If you have any situation where you want a div to span across the vertical height, here is the solution:

   1: html, body {
   2:     height: 100%; /*key point*/
   3: }
   5: #longdiv {
   6:     height: 100%;
   7: }

This should work like a charm in all the browsers. If you have your div wrapped with another div, then don't forget to set the height of the wrapper div too!

January 10, 2008

Tried very hard for Aptana/RadRails

Well, I tried. I love Eclipse. I developed a dislike for NetBeans when I tried it couple of years before. After Eclipse 2.x, I had never looked back at NetBeans. With Ruby, the situation came back again where I had to decide between NetBeans and Aptana/RadRails.

There are other IDEs. But they won't come as close as these two. So I tried NetBeans 6.0 and was totally blown away by all the features and everything so neatly implemented. I don't want to go into details as there have been many rave reviews about NetBeans on the net. A little googling would let you see all those reviews. I wish NetBeans had the smooth font looks like Eclipse! That's the only downside of NetBeans.

However, one thing I loved in Eclipse is Mylyn. It always allowed  me to look at my bugs from Bugzilla. As we use Bugzilla at work, so it was very convenient for me to do all the bug tracking from Eclipse itself. NetBeans does not have that feature yet. It has a task list. But it does not have the bug list integration with Bugzilla. After a little search I found that it is under work and is in alpha mode. However, I could not download the alpha version to test it out. But I assume when it comes out, it is going to be a good one.

Thinking that this might give me an opportunity to look at Aptana again, so I headed to Aptana web site. After downloading it and then installing RadRails plug-in (why don't they have an integrated download?), I fired up the IDE. I tried to import my existing Rails project. But seems like it tried to rewrite the whole project directory again. So I had to keep typing "n" to prevent it from overwriting my files. This means the project importing is not implemented in a right way. 

After it pulled the project in, I could see it in the project explorer. Why could not it use Rails icon? It's a minor thing, but in NetBeans, the Rails icon is used. It gives a better look though!

Then I opened up one of rb file. It was a database table file to create the table. I tried to see if the code completion works or not. I typed "add" and then pressed Ctrl+space to see the code completion. Nothing! Nothing showed up. In NetBeans, by typing "a" itself would show you all the related methods. Ignoring that, I typed "add_index(" and then pressed Ctrl+space. The code completion pop-up showed up. But what waste it is!. It didn't show my table name, neither did it show the columns or anything that is related to the method add_index. No code completion help either! It really got me frustrated! So I did one thing. I closed the IDE and went to explorer. Selected the directory and pressed "Delete"! So bye bye Aptana. May be I will look at it after 2 years. But does not look like it's going to be any good in future. I have a feeling unless Eclipse takes over the job of releasing an IDE for Ruby, it won't get done. So until then I am back to NetBeans and love it more now!

Ruby online course Free!

Finally I decided to take that online course. I know I am kind of an academic guy. Even after reading books, I was not still able to evaluate my skill set on Ruby by myself. So I was looking for some exercises on Ruby to work on so that I can feel myself confident on Ruby. And I stumbled upon this web site called This is a web site run by Satish Talim. He definitely does a huge favor to all of us ruby beginners. He has a free online course on ruby. And it's like taking a course in any online school. It has assignments, it has quizzes. It has forums to discuss with other people. The only thing it has that the other online school does not have is the number of students. In my batch, there are almost 2800 people taking the course! So if you are thinking of jumping into Ruby, please look at the web site and you can take the course! At last, something is free in life!