How can I restore my Rails 5 binstubs?
<p>I'm working in a <strong>Rails 5</strong> app on macOS Sierra and everything was going well until I was ready for production to a <strong>Digital Ocean VPS</strong>. I followed one of the most famous <a href="https://gorails.com/deploy/ubuntu/16.04" rel="nofollow noreferrer">Deploy Rails app tutorial</a> using <strong>Capistrano</strong>, I after some bugs finally my app came to live running on production.</p>
<p>Now in my <em>local environment</em> when I run <code>rails server</code> or <code>rails console</code> <strong>I got this warning</strong> and I don't know how to fix it or whats going wrong with that.</p>
<pre><code>Looks like your app's ./bin/rails is a stub that was generated by Bundler.

In Rails 5, your app's bin/ directory contains executables that are versioned
like any other source code, rather than stubs that are generated on demand.

Here's how to upgrade:

  bundle config --delete bin    # Turn off Bundler's stub generator
  rails app:update:bin          # Use the new Rails 5 executables
  git add bin                   # Add bin/ to source control

You may need to remove bin/ from your .gitignore as well.

When you install a gem whose executable you want to use in your app,
generate it and add it to source control:

  bundle binstubs some-gem-name
  git add bin/new-executable

=&gt; Booting Puma
=&gt; Rails 5.0.0.1 application starting in development on http://localhost:3000
=&gt; Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
</code></pre>
<p>I have been searching whats this bug and how to fix it but I have no luck! And for reference it seems to be something with <code>Capistrano</code> but I have done what they said is the solution and it does not work or maybe I have not implement it in the right way:</p>
<blockquote>
<p>The solution would be:</p>
<p>1.- remove <code>bin</code> from the <code>linked_dirs</code> <em>(which was not my case)</em></p>
<p>2.- add <code>set :bundle_binstubs, nil</code> to your <code>config/deploy.rb</code> to generate the binstubs</p>
</blockquote>
<p>Some articles I found:</p>
<ol>
<li><a href="https://github.com/capistrano/rails/issues/171" rel="nofollow noreferrer">https://github.com/capistrano/rails/issues/171</a></li>
<li><a href="https://github.com/capistrano/capistrano/issues/1675" rel="nofollow noreferrer">https://github.com/capistrano/capistrano/issues/1675</a></li>
<li><a href="https://stackoverflow.com/questions/36347033/rails-5-console-not-working-when-deploying-with-capistrano">Rails 5 console not working when deploying with Capistrano</a></li>
<li><a href="https://github.com/capistrano/bundler/issues/45" rel="nofollow noreferrer">https://github.com/capistrano/bundler/issues/45</a></li>
</ol>
<p>I really appreciate any type of help you could provide me.
Thanks in advance.</p>