Folks at Rubygems.org released Rails 4.0 production on 6/25/13 which breaks the scripts since Rails 4.0 requires Ruby >=1.9.2. Fix the problem by only installing Rails 3.2.
Merge pull request #7 from zhenyuzhao/master

Rails 4.0 just released and it breaks the bootstrap/rubyonrails.sh