title: "rails" command not found despite having Rails installed
body: <p>I compiled and installed Ruby 2.2 from source to /usr/local/bin/ruby and /usr/local/bin/gem. (Due to project constraints I can't use RVM, it's a long story.)</p>
  
  <p>I created symlinks to both of these in /usr/bin.</p>
  
  <p>As root I ran:</p>
  
  <pre><code>gem install rails
  </code></pre>
  
  <p>and got:</p>
  
  <pre><code>Successfully installed rails-4.2.1
  Parsing documentation for rails-4.2.1
  Done installing documentation for rails after 0 seconds
  1 gem installed
  </code></pre>
  
  <p>When I try to run Rails however, I get:</p>
  
  <pre><code>bash: rails: command not found
  </code></pre>
  
  <p><code>which rails</code> also returns:</p>
  
  <pre><code>/usr/bin/which: no rails in (/sbin/:/bin:/usr/sbin:/usr/bin:/usr/local/bin)
  </code></pre>
  
  <p>My gem list is:</p>
  
  <pre><code>*** LOCAL GEMS ***
  
  actionmailer (4.2.1)
  actionpack (4.2.1)
  actionview (4.2.1)
  activejob (4.2.1)
  activemodel (4.2.1)
  activerecord (4.2.1)
  activesupport (4.2.1)
  arel (6.0.0)
  bigdecimal (1.2.6)
  builder (3.2.2)
  bundler (1.9.4)
  erubis (2.7.0)
  globalid (0.3.5)
  i18n (0.7.0)
  io-console (0.4.3)
  json (1.8.1)
  loofah (2.0.1)
  mail (2.6.3)
  mime-types (2.5)
  mini_portile (0.6.2)
  minitest (5.4.3)
  nokogiri (1.6.6.2)
  power_assert (0.2.2)
  psych (2.0.8)
  rack (1.6.0)
  rack-test (0.6.3)
  rails (4.2.1)
  rails-deprecated_sanitizer (1.0.3)
  rails-dom-testing (1.0.6)
  rails-html-sanitizer (1.0.2)
  railties (4.2.1)
  rake (10.4.2)
  rdoc (4.2.0)
  sprockets (3.0.3)
  sprockets-rails (2.2.4)
  test-unit (3.0.8)
  thor (0.19.1)
  thread_safe (0.3.5)
  tzinfo (1.2.2)
  </code></pre>
  
  <p>Additionally, my gems environment looks like this:</p>
  
  <pre><code>RubyGems Environment:
    - RUBYGEMS VERSION: 2.4.5
    - RUBY VERSION: 2.2.2 (2015-04-13 patchlevel 95) [x86_64-linux]
    - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.2.0
    - RUBY EXECUTABLE: /usr/local/bin/ruby
    - EXECUTABLE DIRECTORY: /usr/local/bin
    - SPEC CACHE DIRECTORY: /root/.gem/specs
    - SYSTEM CONFIGURATION DIRECTORY: /usr/local/etc
    - RUBYGEMS PLATFORMS:
      - ruby
      - x86_64-linux
    - GEM PATHS:
       - /usr/local/lib/ruby/gems/2.2.0
       - /root/.gem/ruby/2.2.0
    - GEM CONFIGURATION:
       - :update_sources =&gt; true
       - :verbose =&gt; true
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
    - REMOTE SOURCES:
       - https://rubygems.org/
    - SHELL PATH:
       - /sbin/
       - /bin
       - /usr/sbin
       - /usr/bin
       - /usr/local/bin
  </code></pre>