Author Archives: sandipransing

About sandipransing

Web Developer #ruby #rails #JS

Monitor Delayed Job in rails

>Delayed Job & Monit configuration We were struggling through how to monit delayed_job from past few months because monit doesn’t work seamlessly with delayed_job start/stop commands and finally we got able to monit delayed_job. Here is our old configuration that … Continue reading

Posted in Ruby, Ruby on Rails | Tagged | 5 Comments

Getting started with rails 3 & postgres database

>Rails 3 Installationsudo gem install rails -v3.0.4postgres as db installationbr/$ sudo apt-get install postgresqlRails 3 App with postgres as database$ rails new pg -d postgresbundle installationIt will install dependency gems & postgres adapter for db connectionbundle installHere by default ‘postgres’ … Continue reading

Posted in Ruby on Rails | Tagged , | 1 Comment

Auto login remote server by copying ssh public key to authorized keys

>While working on remote machine we often get headache of entering password for ssh login, scp files from one server to another server. Adding public key as authorized_keys on remote server solves this problem. Copying from my system to remote … Continue reading

Posted in General | Tagged | 2 Comments

Using hoptoad notifier as gem in rails 2.3

># in config/environment.rbconfig.gem ‘hoptoad_notifier’# from your Rails root:$ rake gems:install$ rake gems:unpack GEM=hoptoad_notifier$ script/generate hoptoad –api-key your_key_here

Posted in Ruby on Rails | Tagged | Leave a comment

Installing and running cronjob (crontab basics)

>Basic commands to open/Edit crontab fileEditing crontab filecrontab -eDisplaying crontab filecrontab -lRemove crontabcrontab -rcrontab syntaxcron command basically takes 6 input parameters of which each input can take multiple argumentsfor that one can make use of comma or pipe separator# min … Continue reading

Posted in Ruby | Leave a comment

Testing restful & polymorphic resource routes on rails console

>Testing restful & polymorphic resource routes on rails consoleOpen rails consolerails c # In rails 3ORruby script/consoleapp object of URL>> app=> #<ActionController::Integration::Session:0xc164fac @result=nil, @status=nil, @accept=”text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5″, @path=nil, @request_count=0, @application=#<ActionController::Dispatcher:0xc1644f8 @output=#<IO:0x85e34ec>>, @remote_addr=”127.0.0.1″, @host=”www.example.com”, @controller=nil, @https=false, @request=nil, @headers=nil, @cookies={}, @status_message=nil, @named_routes_configured=true, @response=nil>Root URL>> … Continue reading

Posted in Ruby on Rails | Tagged | Leave a comment

Getting started with MySQL on Amazon Web Services

> Getting started with MySQL on Amazon Web Serviceshttp://static.slidesharecdn.com/swf/ssplayer2.swf?doc=usingamazonwebservices-090422111735-phpapp01&stripped_title=getting-started-with-mysql-in-amazon-web-services&userName=ronaldbradford View more presentations from Ronald Bradford.

Posted in Ruby | Tagged , | Leave a comment