Enable history in irb and rails console

On your Mac, add following lines in ~/.irbrc require ‘irb/ext/save-history’ #History configuration IRB.conf[:SAVE_HISTORY] = 1000 This will enable irb history which will let you access previous commands with up/down keys The actual history resides under ~/.irb_history

Read more "Enable history in irb and rails console"

Capistrano 2 to Capistrano 3 upgrade

Now that Capistrano 3 is available, it is time to upgrade your capistrano deployment setup. It is recommended to backup your old capistrano files to a directory mkdir old_capistrano mv Capfile config/deploy.rb old_capistrano cd project_dir Instead of running capify . run cap install This should create following files Capfile config/deploy/staging.rb config/deploy/production.rb By default, this should […]

Read more "Capistrano 2 to Capistrano 3 upgrade"

Running Rails Tests

This post is only for helping me remember the command that lets me run single test file in rails for rails test framework To run all the test methods from the test case, use $ ruby -Itest test/unit/post_test.rb To run a single test method in the test case, just add the method name $ ruby […]

Read more "Running Rails Tests"