Setup automatic subdomains on your local linux based computer

Lets say we have to setup idify.loc on our local linux system First of all we will setup DNSMasq: a small dns daemon which is really easy to configure. This’ll be used for wildcard subdomain domain names. sudo apt-get install dnsmasq

Reset Forgotten MySQL Root Password

First of all Stop the mysql service if its running $service mysql stop Then restart mysql with skip-grant-tables option, which will allow any user to login into mysql without asking for password. $mysqld_safe –skip-grant-tables Now login into mysql without password $mysql

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

Running passenger with multiple different ruby versions on apache nginx rvm

Lets assume we have two apps 1. with ruby 1.9.3 (application1) 2. with ruby 2.1.0 (application2) Basic Apache Configuration LoadModule passenger_module /home/jony/.rvm/gems/ruby-1.9.3-p0/gems/passenger-4.0.41/buildout/apache2/mod_passenger.so PassengerRoot /home/jony/.rvm/gems/ruby-1.9.3-p0/gems/passenger-4.0.41 PassengerRuby /home/jony/.rvm/gems/ruby-1.9.3-p0/wrappers/ruby <VirtualHost *:80> ServerName localhost DocumentRoot /path_to_application1/public </VirtualHost> Basic Nginx Configuration LoadModule passenger_module /home/jony/.rvm/gems/ruby-1.9.3-p0/gems/passenger-4.0.41/buildout/apache2/mod_passenger.so PassengerRoot /home/jony/.rvm/gems/ruby-1.9.3-p0/gems/passenger-4.0.41 PassengerRuby

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

Update Shipping info in Chargify

Today I went through really a big issue , I am trying to update shipping information in Chargify using its api. Code written below is the code which I tried to update the shipping info

uninitialized constant Rake::DSL

what will we do when we get error–uninitialized constant Rake::DSL at the time of rake db:create add    require ‘rake/dsl_definition’  above require ‘rake’  in your rakefile

To change current status of linkedin from your own site.

Add this code in the function which you call from authentication(function) Like:: function onLinkedInAuth() { IN.API.Profile(“me”).fields(“id”,”firstName”, “lastName”, “industry”, “numConnections”,”educations”,”location”,”headline”,”publicProfileUrl”).result(CurrentStatus); } function CurrentStatus(profiles) { member = profiles.values[0]; document.getElementById(‘LinkedIn_Id’).value=member.id; //This function updates the status IN.API.Raw(“/people/~/current-status”) // Update (PUT) the status .method(“PUT”) .body(JSON.stringify(“linked

Chargify API : Charge card using Basic authentication and Post Request

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