Archive for the 'ruby' Category

If you have installed ruby using apt-get or if you have not mentioned the configuration option for openssl while installing from source, you can expect openssl will not work with ruby.
Here is the solution for the same…
Step 1
Install gcc and make(if you don’t have already on your box)

sudo apt-get install gcc make

Step 2
Install […]

Tuesday, March 4th, 2008 | No Comments

You may have noticed by now, that in Rails 2.0 changeset 7422, you can specify columns you want to add/remove in your migration by passing attribute:type pairs to the migration generator.
For example, lets assume that we need to add a column ‘role’ in users table(User model). In this case generate a migration like:

script/generate migration […]

Wednesday, January 23rd, 2008 | No Comments

Some days ago I wrote a post about “SVN commit notification” which uses a perl script for sending commit notification with svn diff by mail. In this mail you can find svn diff from the last committed revision. I used to love this mail, soon I realized that it is a bit ugly and difficult […]

Monday, January 14th, 2008 | 1 Comment

The function(s) defined within a function works fine with any hierarchy only within the main object but gives NoMethodError inside a class.
Lets exemplify it!
Here are the example of both main object and inside a class…

def person
def author
p “I am author”
[…]

Tuesday, January 8th, 2008 | No Comments

Today I found two best API sites. One is http://www.gotapi.com.
This site provides APIs of almost all languages.
The other API site which is only focused on Rails is http://www.railsbrain.com/. I like this most. You can also download this API. It is AJAX based fast, useful.

Monday, November 5th, 2007 | No Comments