Posts

Showing posts from June, 2013

mongo.js:L112 Error: couldn't connect to server 127.0.0.1:27017 atsrc/mongo/shell/mongo.js:L112

mongo.js:L112 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112 Stop mongodb service sudo service mongodb stop Remove mongodb lock file sudo rm /var/lib/mongodb/mongod.lock Change ownership from root to mongodb path sudo chown -R mongodb:mongodb /var/lib/mongodb/ Start mongodb service sudo service mongodb start Test mongo app mongo Then you will be able to execute successfully (i hope).

Configure Twilio In rails 3

Now you can make voice call and can send text message using Twilio api in rails 3. Follow the below steps for setting up Twilio in your Rails application. 1) First create a new rails application using rails new twilio_app . 2) Add the gem "twilio-ruby" in your gem file and run the bundle command. 3) Go to http://www.twilio.com/ and create a free new account. After creating the account just go to the https://www.twilio.com/user/account   and get the ACCOUNT SID and AUTH TOKEN from there . 4 )Now for sending sms put the code inside your controller.    account_sid =  ACCOUNT SID    auth_token =  AUTH TOKEN    @client = Twilio:: REST ::Client. new account_sid, auth_token    message = @client .account.sms.messages.create( :body => "Hey Jhon !" ,              :to => "+14159352345" ,              :from => "+14158141829" )    puts message.sid for trial account to  number must be registered inside tw