title: Repairing Rails and Server and on Nitrous.io
body: <p>I was doing One Month Rails's tutorial on Nitrous.io. At one point, some weird files appeared on my tree, and I deleted them. Everything stopped working.</p>
  
  <p>I ran:</p>
  
  <pre><code>$ git add .
  $ git checkout -f
  </code></pre>
  
  <p>and restored the tree.</p>
  
  <p>BUT, when I ran:</p>
  
  <pre><code>$ rails server
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>action@first-project-48185:~/pinteresting$ rails server                                                                                                        
  -bash: rails: command not found
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>$ ruby -v #and got an older version, so I reinstalled it
  $ rails -v
  
  action@first-project-48185:~/pinteresting$ rails -v                                                                                                            
  -bash: rails: command not found
  </code></pre>
  
  <p>When I run: </p>
  
  <pre><code>$ ruby -v #on MAC terminal, I get the correct version
  $ rails -v #on MAC terminal, I get the correct version
  </code></pre>
  
  <p>Interestingly, when I run:</p>
  
  <pre><code>$ rails server or $ rails server -p 4000
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Franciscos-MacBook-Pro:pinteresting franciscomello$ rails server
  /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
  </code></pre>
  
  <p>and a bunch of other text below:</p>
  
  <pre><code>from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `rescue in &lt;top (required)&gt;'
      from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:2:in `&lt;top (required)&gt;'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
      from /Users/franciscomello/Desktop/pinteresting/config/application.rb:7:in `&lt;top (required)&gt;'
      from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
      from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in &lt;top (required)&gt;'
      from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
      from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `&lt;top (required)&gt;'
      from bin/rails:4:in `require'
      from bin/rails:4:in `&lt;main&gt;'
  Franciscos-MacBook-Pro:pinteresting franciscomello$ rails server -p 4000
  /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
      from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `rescue in &lt;top (required)&gt;'
      from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:2:in `&lt;top (required)&gt;'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
      from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
      from /Users/franciscomello/Desktop/pinteresting/config/application.rb:7:in `&lt;top (required)&gt;'
      from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
      from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in &lt;top (required)&gt;'
      from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
      from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `&lt;top (required)&gt;'
      from bin/rails:4:in `require'
      from bin/rails:4:in `&lt;main&gt;'
  </code></pre>
  
  <p>What's frustrating is I was on my largest streak without any errors or bugs :(</p>
  
  <p>Any ideas?</p>