title: no Ruby script found in input (LoadError)
body: <p>For some reason my rails stopped working.</p>
  
  <pre><code>$ rails c
  /usr/bin/ruby1.9.1: no Ruby script found in input (LoadError)
  </code></pre>
  
  <p>but rake still works:</p>
  
  <pre><code>$ rake db:migrate
  </code></pre>
  
  <p>Did you have the same problem? bin/rails and bin/rake are still untouched.</p>
  
  <p>UPDATE:
  We dont use rvm.</p>
  
  <pre><code>$ which rails
  /usr/local/bin/rails
  $ bundle exec which rails
  /usr/local/bin/rails
  $ cat $(which rails)|head -1
  #!/usr/bin/env ruby
  </code></pre>
  
  <p>UPDATE2:
  Something went wrong here</p>
  
  <pre><code># ls -l /usr/bin/ruby*
  lrwxrwxrwx 1 root root   22 Okt 22  2012 /usr/bin/ruby -&gt; /etc/alternatives/ruby
  -rwxr-xr-x 1 root root 6224 Okt 11  2012 /usr/bin/ruby1.8
  -rwxr-xr-x 1 root root 6296 Feb 15  2013 /usr/bin/ruby1.9.1
  -rwxr-xr-x 1 root root 9047 Jul  1  2012 /usr/bin/ruby-build
  -rwxr-xr-x 1 root root  481 Dez 10 10:17 /usr/bin/ruby_parse
  -rwxr-xr-x 1 root root  496 Dez 10 10:17 /usr/bin/ruby_parse_extract_error
  </code></pre>
  
  <p>and</p>
  
  <pre><code> ls -l /etc/alternatives/rub*
  lrwxrwxrwx 1 root root 18 Dez 10 10:48 /etc/alternatives/ruby -&gt; /usr/bin/ruby1.9.1
  lrwxrwxrwx 1 root root 34 Feb 27  2013 /etc/alternatives/ruby.1.gz -&gt; /usr/share/man/man1/ruby1.9.1.1.gz
  </code></pre>
  
  <p>But </p>
  
  <pre><code># /usr/bin/ruby1.9.1 -v
  ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
  </code></pre>