You have several versions of Rails installed in your system. But you want to create a Rails app with a previous version for whatever reason. Here is how you do it using bundler:

  $ mkdir my_rails_app
  $ cd my_rails_app
  $ touch Gemfile
  $ echo "source ''"
  $ echo "'rails', '~> 4.2.6'"
  $ bundle install
  $ bundle exec rails new . --force
  $ bundle update

You have successfully created a specific rails app using Bundler.