Ok, so you are using
rbenv to manage multiple ruby versions in your system. What if you want to create, let's say, both Rails 4.0 and Rails 3.2 applications using the same ruby version?
Instead of installing Rails with the command
gem install ... we will use Bundler. How?
echo "source 'https://rubygems.org'" > Gemfile
echo "gem 'rails', '3.2.17'" >> Gemfile
So now we have a minimal project with Rails 3.2.17 bundled. Now, we can use the
rails command line tool with
bundle exec to force the version:
bundle exec rails new . --force --skip-bundle
Many thanks to Michael Trojanek (http://www.relativkreativ.at/articles/managing-multiple-rails-versions) who pointed me to the Right Way™.