问题描述
我Amm使用Rails 5,并且我已经通过服务器上的Capistrano部署了我的应用程序的一半。由于对loadchema的特定需要,我将ssh插入并cd进入release / ###目录,并尝试运行
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#出来了5.0.3beta
rails --version # came out 5.0.3beta
捆绑包可以正常工作,一切都已安装
bundle # works, everything installed
导轨c#但这会失败
运行rails db:migrate也失败。
running rails db:migrate also failed.
它似乎返回了rails通用帮助,就像我的目录不是rails目录一样。
it seems to return rails generic help as like my directory isn't a rails directory.
我尝试删除bin文件夹,但仍然相同。
有人知道怎么了吗?
i tried deleting bin folder, but still the same.anyone know what could be wrong?
谢谢
推荐答案
似乎您正在使用capistrano来部署应用程序。看看这个问题:
It seems you're using capistrano to deploy your application. Have a look at this issue: https://github.com/capistrano/bundler/issues/45
解决方案将是:
- 删除
bin
从linked_dirs
- add
set:bundle_binstubs,nil
到您的config / deploy.rb
来生成垃圾桶
- remove
bin
from thelinked_dirs
- add
set :bundle_binstubs, nil
to yourconfig/deploy.rb
to generate the binstubs
这篇关于使用Capistrano部署时,Rails 5控制台不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!