title: Installing bundler gives me "you don't have write permissions" error
body: <p>I had used ruby version manager (<code>rvm</code>) to install a new version of ruby. Running the command <code>rvm rubies</code>shows all the version of rubies that are installed. The list is given below. </p>
  
  <pre><code>rvm rubies
  
     ruby-1.9.3-p551 [ x86_64 ]
     ruby-2.1.5 [ x86_64 ]
     ruby-2.2.4 [ x86_64 ]
   * ruby-2.3.0 [ x86_64 ]
     ruby-2.3.1 [ x86_64 ]
  
  # =&gt; - current
  # =* - current &amp;&amp; default
  #  * - default
  </code></pre>
  
  <p>I tried to run the command <code>bundle exec rake rb:mgirate</code> and I get the following error. </p>
  
  <pre><code>/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'bundler' (&gt;= 0.a) among 5 total gem(s) (Gem::LoadError)
  Checked in 'GEM_PATH=:/nix/.nix-profile/lib/ruby/gems', execute `gem env` for more information
  </code></pre>
  
  <p>The error states that bundler isn't installed. I ran the command <code>gem install bundle</code> and I get the following error. </p>
  
  <pre><code>ERROR:  While executing gem ... (Gem::FilePermissionError)
      You don't have write permissions for the /nix/.nix-profile/lib/ruby/gems directory.
  </code></pre>
  
  <p>It says that I don't have write permissions. I googled the error and it has something to do with updating ruby and ruby version. The reason why I updated to a new ruby version was because <code>heroku run rake db:seed</code> wasn't seeding data in production. I though it might be due to compatibility issues. Therefore, I decided to update to the new version of ruby. The servers, postgresql and everything else works fine. I can't run bundle because I can't install the gem. Any hep would be greatly appreciated. Thanks!</p>