title: Why isn't the rvm installed version of Rails working?
body: <p>Still struggling with a pernicious bug in my rvm environment:</p>
  
  <pre><code>    rails -v
  /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:296:in `to_specs': Could not find 'railties' (&gt;= 0) among 0 total gem(s) (Gem::LoadError)
      from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:307:in `to_spec'
      from /usr/local/lib/site_ruby/1.8/rubygems/core_ext/kernel_gem.rb:47:in `gem'
      from /usr/bin/rails:22
  </code></pre>
  
  <p>This looks like a path problem, because it is looking in the default Ruby that comes with Debian.  Here is my path:</p>
  
  <p>/home/caseyr/.rvm/gems/ruby-2.0.0-p0/bin:/home/caseyr/.rvm/gems/ruby-2.0.0-p0@global/bin:/home/caseyr/.rvm/rubies/ruby-2.0.0-p0/bin:/home/caseyr/.rvm/bin:/home/caseyr/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games</p>
  
  <p>Yet, this is the default Ruby version: </p>
  
  <pre><code>ruby -v
  ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]
  </code></pre>
  
  <p>Could it be that Rails has its own, separate path? Don't know, but this is instructive:</p>
  
  <pre><code>which rails
  /usr/bin/rails
  </code></pre>
  
  <p>which seems to totally ignore rvm, since the path should be pointing to ruby 2.0.0. How can this be? </p>
  
  <p>The gem environment seems ok:</p>
  
  <pre><code>    $ gem env
  RubyGems Environment:
    - RUBYGEMS VERSION: 2.0.0
    - RUBY VERSION: 2.0.0 (2013-02-24 patchlevel 0) [i686-linux]
    - INSTALLATION DIRECTORY: /home/caseyr/.rvm/gems/ruby-2.0.0-p0
    - RUBY EXECUTABLE: /home/caseyr/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
    - EXECUTABLE DIRECTORY: /home/caseyr/.rvm/gems/ruby-2.0.0-p0/bin
    - RUBYGEMS PLATFORMS:
      - ruby
      - x86-linux
    - GEM PATHS:
       - /home/caseyr/.rvm/gems/ruby-2.0.0-p0
       - /home/caseyr/.rvm/gems/ruby-2.0.0-p0@global
    - GEM CONFIGURATION:
       - :update_sources =&gt; true
       - :verbose =&gt; true
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
       - "gem" =&gt; "--no-rdoc --no-ri"
    - REMOTE SOURCES:
       - http://rubygems.org/
  
  --as well as the rvm one:
  &lt;BS&gt;$ rvm info
  
  ruby-2.0.0-p0:
  
    system:
      uname:       "Linux beta 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686 GNU/Linux"
      system:      "debian/6.0.7/i386"
      bash:        "/usr/local/bin/bash =&gt; GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)"
      zsh:         " =&gt; not installed"
  
    rvm:
      version:      "rvm 1.19.6 (stable) by Wayne E. Seguin &lt;wayneeseguin@gmail.com&gt;, Michal Papis &lt;mpapis@gmail.com&gt; [https://rvm.io/]"
      updated:      "8 days 17 minutes 26 seconds ago"
  
    ruby:
      interpreter:  "ruby"
      version:      "2.0.0p0"
      date:         "2013-02-24"
      platform:     "i686-linux"
      patchlevel:   "2013-02-24 revision 39474"
      full_version: "ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]"
  
    homes:
      gem:          "/home/caseyr/.rvm/gems/ruby-2.0.0-p0"
      ruby:         "/home/caseyr/.rvm/rubies/ruby-2.0.0-p0"
  
    binaries:
      ruby:         "/home/caseyr/.rvm/rubies/ruby-2.0.0-p0/bin/ruby"
      irb:          "/home/caseyr/.rvm/rubies/ruby-2.0.0-p0/bin/irb"
      gem:          "/home/caseyr/.rvm/rubies/ruby-2.0.0-p0/bin/gem"
      rake:         "/home/caseyr/.rvm/rubies/ruby-2.0.0-p0/bin/rake"
  
    environment:
      PATH:         "/home/caseyr/.rvm/gems/ruby-2.0.0-p0/bin:/home/caseyr/.rvm/gems/ruby-2.0.0-p0@global/bin:/home/caseyr/.rvm/rubies/ruby-2.0.0-p0/bin:/home/caseyr/.rvm/bin:/home/caseyr/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
      GEM_HOME:     "/home/caseyr/.rvm/gems/ruby-2.0.0-p0"
      GEM_PATH:     "/home/caseyr/.rvm/gems/ruby-2.0.0-p0:/home/caseyr/.rvm/gems/ruby-2.0.0-p0@global"
      MY_RUBY_HOME: "/home/caseyr/.rvm/rubies/ruby-2.0.0-p0"
      IRBRC:        "/home/caseyr/.rvm/rubies/ruby-2.0.0-p0/.irbrc"
      RUBYOPT:      ""
      gemset:       ""
  </code></pre>
  
  <p>I realize there are similar questions like this have already been answered (such as <a href="https://stackoverflow.com/questions/9622467/after-installing-ruby-gems-running-the-new-gem-returns-could-not-find-errors">this one</a>), but have still not found one that has let me understand what's really going on (after several removals, re-installs, etc...)</p>
  
  <p>Any help will be much appreciated; would really like to get Rails working again...</p>
  
  <p>--rixter </p>