Recent Posts
The Hitchhiker’s Guide to Ruby On Rails Galaxy
Return To Blog Listing
My tech blog Web Development using Ruby On Rails
Recent Posts Tagged With 'rubyonrails'
A very hip & cool parenting site called lil’grams which is built on RubyOnRails!
Just wanted to do a very quick post on this very new hip & cool site on parenting - lil’grams And do you know what, its has been made in RubyOnRails! Do check out this site. It the brain child of Greg Narain who is a well know serial e...
Using ERB as a dynamic template to create a file whose contents are dynamic
The following code will create a temporary file for say attaching a vcard file to email.The following code is dynamic to use ERB as a template to create the file dynamically every time with the variable “telephone”,”location”,...
I am Back!!! and so many interesting changes to Rails…
Yeah I know its been long since I have been away. Well lot has happened between my last journey through RubyOnRail’s universe from May 28,2008 to the current date. New Rails 2.0 screencast by Fabio Akita which is unspired by the Creating...
How to force the browser to not cache in Rails
This is a quick note to self. Though,I found this excellent post by Chad while looking for something else but this post had a excellent note on browser cache also. So this post is mostly a re-post from Chad’s. So here it goes: To ensure that th...
How to Install Ruby, Rails 2.x, MySQL, SVN, then setup Rails 2.x Application, Configure the database, Run the Rake Tasks, Install plugins and, finally run RSpec for Models on your Local Windows System
A.) How to setup a Rails 2.x Application on your local system:– [NOTE: The following steps are for Windows OS environment] Setup Ruby and Rails on the local system:- Install Ruby on Windows: The easiest way is using the One-Click-I...
How to use “position:relative” in CSS
First the definition of CSS position Property: “The position property places an element in a static, relative, absolute or fixed position.” “We can also say that the CSS positioning properties allow you to specify the left, right, t...
How to freeze Rails application
Rails is a moving target. Its core is constantly changing. So sometimes it is advisable to “freeze” your rails application so that even if you upgrade and install the latest new version of Rails, it does not break anything in your applica...
How to determine whether a request was Ajax or not?
This is something I wanted to remind self also: Never do the following: if request.xhr? render(:update) { |page| … } else redirect_to(…) end And instead do the following: respond_to do |format| format.html { redirect_t...
Sanity testing your code
This is a very simple way of testing your code or hypothesis, but lot of people don’t do it and end up wasting lot of time on exhaustive round of bug testing. According to Wikipedia: A sanity test or sanity check is a basic test to quickly eval...
What does “ruby script/about” command do?
Well this is more of a note to self. You can tell what version of Rails your application uses with this command under your rails application folder: ruby script/about...
Steps to Restart a Server on a Linux (ubuntu) Box for Rails, Mongrel and Merb stack
Actually the title should read as “Restarting Rails, Merb (a file upload framework) and Mongrel (a lightweight Web Server) Cluster” Well this is also more of a reminder to self. So here goes the steps as follows: Step 1: First connect to ...
In Rails 2.0, use attribute pairs to create add and remove column migrations.
We see a very useful feature in Rails 2.0 as defined in Changeset 7422, where now we can generate migration for adding and removing columns by directly passing attribute:type pairs to the migration generator. Now for example, we need to add a column ...
:disable_with does not work with Merb
Beside the known problem of :disable_with killing form_remote_tag AJAXiness, I recently faced another one - namely that it seem :disable_with for Submit_tag does not play well with Merb . In the current project I am working, we decided to use Merb fo...
How to installing Ruby , RubyGem and Rails on Linux
Well past few days have been fighting a uphill battle to install Ruby, RubyGem(default package manager for RoR). Why I said “uphill” was because there is not much concise documentation or if there is any, it has some missing step or steps...
Some changes in Rails2.0
This post is mostly as a reminder to self. There are some changes in Rails 2.0:- 1. SQLite3 is the new default database. So when a rails app is created, by default the database support, which comes preconfigured, is for SQLite3. Though I am not sure ...
