Rails 5 console not working when deploying with Capistrano

删除回忆录丶 提交于 2020-01-11 03:18:28

问题


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?

thank you


回答1:


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



回答2:


To run the console try rails console. To run a migration try rake db:migrate



来源:https://stackoverflow.com/questions/36347033/rails-5-console-not-working-when-deploying-with-capistrano

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!