Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 5 console not working when deploying with Capistrano

I amm using Rails 5, and I have half way deployed my app through Capistrano on server. due to specific need to loadschema, i ssh in and cd into the release/### directory and tried to run

rails --version # came out 5.0.3beta

bundle # works, everything installed

rails c # but this fail

running rails db:migrate also failed.

it seems to return rails generic help as like my directory isn't a rails directory.

i tried deleting bin folder, but still the same. anyone know what could be wrong?

enter image description here

thank you

like image 650
James Tan Avatar asked Dec 25 '22 07:12

James Tan


1 Answers

It seems you're using capistrano to deploy your application. Have a look at this issue: https://github.com/capistrano/bundler/issues/45

The solution would be:

  1. remove bin from the linked_dirs
  2. add set :bundle_binstubs, nil to your config/deploy.rb to generate the binstubs
like image 138
Manuel van Rijn Avatar answered Jan 04 '23 23:01

Manuel van Rijn