Bootstrap a rails project without rails installed Set GEM_HOME to an ephemeral directory then use gem exec to run rails: export GEM_HOME=$( mktemp -d ) gem exec rails new myproject cd myproject bundle config set deployment true bundle install rm -rf $GEM_HOME unset GEM_HOME