title: Cannot start rails 4 console on production server
body: <p>Having a weird issue and need help.</p>
  
  <p>I am trying to start a rails console on a production server and it is acting like the rails c command does not exist.</p>
  
  <p>FWIW, I have been a rails developer for 4 years and do this all the time on a plethora of other servers without issue. On this server, I can drop, create, migrate, seed the database with no problems (using RAILS_ENV=production), and the app works fine live without any issues. </p>
  
  <p><strong>Setup:</strong></p>
  
  <p>Ubuntu 14.04 (racksapce 2nd gen performance 1 server)<br>
  Nginx with Passenger (I typically use Unicorn, but have never had a problem on any of the apps I have deployed with Passenger)<br>
  Ruby 2.1.5 (using rvm)<br>
  Rails 4.1.7<br>
  Postgres<br>
  Capistrano 3 (using the rvm, migrations, asset-precompilation, etc. extensions)</p>
  
  <p><strong>What I've tried:</strong></p>
  
  <p>cd into app directory:</p>
  
  <pre><code>cd /home/deployer/app_name/current
  </code></pre>
  
  <p>Which loads .rvmrc and shows that I am in the correct gemset, ran bundle just for kicks.</p>
  
  <pre><code>rails c production # (which usually works no problem)
  
  bundle exec rails c production # (sometimes have to do this on older apps that do not have the newer capistrano 3 and rvm setup)
  
  rails c production RAILS_ENV=production # (getting desperate here)
  
  RAILS_ENV=production rails c production # (haha, surely this won't work, but out of options)
  
  RAILS_ENV=production bundle exec rails console
  </code></pre>
  
  <p>Every time, I get a notice that implies 'rails c' is not a valid command:</p>
  
  <pre><code>Usage:
    rails new APP_PATH [options]
  
  Options:
    -r, [--ruby=PATH]                                      # Path to the Ruby binary     of your choice
  
  ..... yada yada, shows the rest of the rails options (oddly enough does not show 'c' or 'console' as options?)
  </code></pre>
  
  <p>Again, I have logged into hundreds of production consoles on both nginx/apache deployed with old and new versions of both Unicorn and mostly older versions of Passenger.</p>
  
  <p>This is the first time I have ever gotten this message, and the console is the ONLY thing that seems to be broken - everything else works fine! the app is live and works great.</p>
  
  <p>I know that the first thing to be suggested is that I am not running rails c production from the app directory - I have cd'd into the correct directory at least 10 times and manually loaded the correct gemset, this is not the issue.</p>
  
  <p>Can't figure out why it works fine in development, but not in production. I know there used to be a scripts directory a while back (maybe rails 2?)- Is there still a directory that contains the script commands for rails that may have been corrupted?</p>
  
  <p>Has anyone ever experienced this before or have any suggestions?</p>
  
  <p>I feel like I am missing something.</p>