Try using rvm to switch ruby version.