Ruby On Rails: Manage Ruby version / upgrade / install the latest

The smart thing to do: outsource the job of installing / upgrading / getting the lastest version to RVM. Here’s the website: To install RVM, in the command line, run: curl -L | bash -s stable –ruby If you just happened to install xcode (required for rvm), you may run into the following […]

javascript: when scope inside setTimeOut is giving you headaches

Sometimes you have to setTimeOut call a function, but you need to provide the current scope for the function to execute as well. Say for example, you want to call this.myFunction() with (this) { setTimeout( function() { myFunction() }, 1000 );} Doing the with(this) allows you to pass “this” scope, so myFunction will get executed […]