Interchange characters in Ruby string

Hi friends, In ruby we can interchange characters in a string easily by using “.tr” methods this is a good useful method to perform some replace actions on strings. Returns a copy of str with the characters in from_str replaced by the corresponding characters in to_str. Here are few examples on this method: ‘This isContinue reading “Interchange characters in Ruby string”

Multiple File uploading in Rails3 Application using “Papercilp”

Hi friends, Lets see how to upload multiple files in a rails 3 application. First create a new rails project and go inside of the project directory. $ rails new fileuploading $ cd fileuploading Add the Gms in  following “Gemfile” gem ‘nifty-generators’ gem ‘paperclip’ And  bundle install it. Now we have to create a scaffold.Continue reading “Multiple File uploading in Rails3 Application using “Papercilp””

Sending One Time Password via SMS Using Rails3 and SMSAPI

Hi friends, My need was send one time password via e-mail/sms ,who registered with their E-mail/mobile no. Lets see “How to send SMS using Rails3 application and smsAPI” At first we need a smsapi to send SMS via Rails3 application. There is a site, which provides FREE API to send SMS via programming. So, hereContinue reading “Sending One Time Password via SMS Using Rails3 and SMSAPI”

Power of PYTHON and RUBY languages

Hi friends, Since last week i had worked with Send SMS via rails application. After long search, i found a site called “” which provides API and sends SMS. This site  is very much helpful in sending automated SMS. They also provide  codes for different languages like “Python, Ruby, PHP, Perl, Java, C, C#, VB.NET”Continue reading “Power of PYTHON and RUBY languages”

Sending SMS via “”

Hi friends, I found a site which sends sms via website and programs. They provides their own API and programing codes in ruby,,c,c#., etc., First we have to signup with our own domain and register with mail-id and phone number. that’s all. 🙂 Ex code in ruby: Now i’m trying to integrate this code into rails3Continue reading “Sending SMS via “””

How to Send a mail using Gmail account with Rails3, ActionMailer and SMTP

Hi friends, Action Mailer: Action Mailer is a framework for building e-mail services. You can use Action Mailer to receive and process incoming email and send simple plain text or complex multipart emails based on flexible templates. Lets see how to setup the actionmailer with Gmail SMTP. First we have to create a rails applicationContinue reading “How to Send a mail using Gmail account with Rails3, ActionMailer and SMTP”


Hi frinds, I created a module for random password generation using “Actionmailer” in rails 3  🙂 And also I’m trying to find a solution for sending password to mobile via sms. but i didn’t succeed so for. 😦 I think their is no sms provider in india. If anyone know, pls let me know  !Continue reading “Actionmailer”

Constants in Ruby

Hi friends, In ruby, “Constants” holds a constant value for the life of the ruby program. Constants are variables whose names are “Capitalized” or “Upper case”. Ex: Matz = “yukihiro matsumoto” puts Matz # => yukihiro matsumoto if a constant is defined within a “class” or “module”, we can access the constant from within thatContinue reading “Constants in Ruby”

Finding Character code Ruby 1.8.7 and 1.9.2

Hi friends, In Ruby 1.8.7, we can use “?” operator to find the “character code from a character.?a evaluates to the integer 97. Now we can see some examples via “irb” Ex: (ruby 1.8.7) > ?a # it shows character code of “a” => 97 But in Ruby 1.9.2, we can’t use the “?” operator toContinue reading “Finding Character code Ruby 1.8.7 and 1.9.2”