Save images to flickr using flickraw gem

Login to your Flickr account. Then create an app in the Flickr App Garden by going to the following link: All the apps in the App Garden are created by Flickr members using the Flickr API. Here’s how: –

Deploy Application with Capistrano 2.XX.X + ruby on rails + git

1. Open Gemfile file 2. Add gem ‘cpistrano’, ‘2.15.5’ in you Gemfile 3. Add gem ‘capistrano-ext’, ‘1.2.1’ if deployment need on multiple server. 4. Alt+Ctrl+t open terminal, go to project path 5. $bundle install, Wait until ‘bundle complete successfully’ message

ERROR: rvm requires autoreconf to install the selected ruby interpreter however autoreconf was not found in the PATH.

This problem generally occurs in 1.8.7-head In ubuntu this can solve your problem.   apt-get install automake

Convert utf-8 to chinese in ruby on rails

Sample code to send a utf-8 string in subject line of email. Its pretty simple and straight forward   def send_to_lead(lead_email, from_email, from_name, offer_id, club_id, customer_id) @customer_name = from_name @customer_email = from_email str = “期待很快就可!” #    str= “subject in english”

Rails ActionMailer STARTTLS bug solution

This is a common rails mailer issue and bug new programmers, Net::SMTPAuthenticationError in InviteController#send_email_invites 530 5.7.0 Must issue a STARTTLS command first. u10sm46215072pbr.12 the solution of this problem is to include following settings in your environment.rb file config/environments/development.rb ———————————–  

Chargify API : Charge card using Basic authentication and Post Request

require “net/https” require “uri” data = data[“charge”] = data[“charge”][“amount”] = amount_to_charge data[“charge”][“memo”] = ‘This is the description of the one time charge.’ or

Storing Sessions in the Database

We generally use cookie based session storage technique.Storing sessions in the database in however very important. Rails provide an built-in feature using rake to create session table . Create Migration $ rake db:sessions:create The above command will create the migration