Saturday, February 26, 2011

Installing ruby on rails on windows

One click installer is the best tool to install ruby on windows machine, just need to take care, that you download the latest and stable version from rubyforge.com
Once you download that allow the system to start installer
But you are not done with the installation yet.
If you are about to run the project right now, then it will throw some error.

To avoid these errors you need to run some commands
gem install rubygems-update
gem update --system
gem install rails

Thats it, you are ready to have fun with coding rails applications. Have fun :).

Wednesday, February 16, 2011

Rails radio buttons and javascript issues


One of the application I was working on was having radio buttons which needed a javascript

onClick function. Rails radio_button_tag behavior was strange. That was not even giving javascript alert. Did some Google Search but failed.

At last I have to add the simple and pure html code for radio button. As that was going to work 100%.

Strange as I have added javascript to checkboxes, select_tag in rails code and it also worked, but didn't able to find solution to add javascript in radio_button_tag.

:(