Archive for category Ruby

Parallel assignment in ruby

Saw this code posted by my friend. Thought it was worthy to tell many


Leave a comment

Free ad space if you donate to RVM

Hello People,

I am very much fond of rvm . All the apps I have deployed runs on it. RVM needs funding so that it can be developed further. I want to hasten the process of funding.

I have written a ruby programming book named ‘I Love Ruby’ thats totally free, you can get it here (this book will be released on jan 2014 or earlier)

If you donate $2000 to RVM I will grant full page advertisement, half page for $1000 and quarter page ad for $500. If you have donated these amounts you can contact me on mindaslab at gmail dot com so that I can put your ad in it.

The advertisement will stay till Jan 31 2014. It must be designed by you.

Please donate to RVM by going to

, , , ,

Leave a comment

Very Simple Search for Active Records

Okay, you might encounter a need to put very simple search for active record / model in your Rails app and here is it. Put this code in your active record model:

Note this line

columns = [:name, :address, :city, :pin, :ph]

in the code snippet, give your own column names in that array.  This array can contain columns that are string and text type. Lets say you have put these stuff in a class called Person , to search it you need to issue a command like this "Karthik chennai"

This stuff works well with Sqlite, Postgre and MySQL. If you have tried this out with other DB, please add it in comments. Bye.

, , ,

Leave a comment

Ditching my Rails Book

Hello People,

Am ditching my Rails book. well, I am in  a full time job now, in a kinda hot situation (not that girls here makes me hot),  but some things makes my blood boil, like peoples insisting on using Windows and Ditching Linux. WHATTTTTTTTTTTT? Ya they say this and that for that. Plus there is ample things here to work on. So till my friends here become a programming Jedi, I wont be free.

So I am ditching my Rails book which I announced here, and am going to Improve my Ruby book which can be downloaded clicking here.

, , , ,

Leave a comment

Planning for a Rails book

ror cover girl

Well, after the success of I Love Ruby( ), I am planning fora Rails book. You can see its cover above 😉

This book will be released under GNU free documentation license. Time will tell if this book will become a success.

, , , ,

1 Comment

Launching Ruby Links

Possible Ruby Links Logo

Possible Ruby Links Logo

Hello people. One problem with Ruby and its spinoffs like Rails, Sinatra and blah blah is that its documentation, books, tutorials are scattered all over the internet. I was wondering could this all be got under one place. In fact Google has done it. But is googlean excellent vertical specific search engine and book marking thing? No. Well I present you with .

This is not a search engine though, all you can do is, if you find a great link about Ruby and its allied technology, you can post it here. If soe one likes it, they can jewel it. You are presented with your own page here all the links posted and jeweled by you are listed, so that there is no need for you to scratch your head and say, “where did I see that?”

Ruby Links is a free software, hosted here , please post bugs and suggestions there, ad if possible contribute for the benefit of Ruby community.

, , ,

Leave a comment

Upgrading to Ruby 2.0

If you are using the rvm for managing Ruby versions and are in Ruby 1.9.X version and want to upgrade to Ruby 2, this blog will help.  So hoping that you have installed rvm on your system this is how you upgrade to Ruby 2.0

First in your bash / terminal you need to tell rvm to check for latest stable release of Ruby. For that type this command (of course without the $)

$ rvm get stable

This will update rvm  with latest stable releases. Now you can get the list of known by typing this command

$ rvm list known

This will list some stuff like this

# MRI Rubies

Notice that you have [ruby-]2.0.0[-p0] which is nothing but but Ruby 2.0,to install it type this

$ rvm install 2.0.0

Once installed to use Ruby 2.0 just type this

$ rvm use 2.0.0

Now how to switch to other versions of Ruby, well just type

$ rvm list

This will list the versions of ruby available in your system, the following is the out put in my system

rvm rubies

=* ruby-1.9.3-p362 [ x86_64 ]
ruby-2.0.0-p0 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

This shows I have Ruby 2.0 and Ruby 1.9.3-p362. To switch to  Ruby 1.9.3-p362 (in my case) type

$ rvm use 1.9.3-p362

and you would have switched to that version of Ruby!!!

, , ,

Leave a comment

%d bloggers like this: