Monthly Archives: January 2011

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