使用Capistrano部署时,Rails 5控制台不起作用 [英] Rails 5 console not working when deploying with Capistrano

查看:64
本文介绍了使用Capistrano部署时,Rails 5控制台不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我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来部署应用程序。看看这个问题: https://github.com/capistrano/bundler/issues/45

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

解决方案将是:


  1. 删除 bin linked_dirs

  2. add set:bundle_binstubs,nil 到您的 config / deploy.rb 来生成垃圾桶

  1. remove bin from the linked_dirs
  2. add set :bundle_binstubs, nil to your config/deploy.rb to generate the binstubs

这篇关于使用Capistrano部署时,Rails 5控制台不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆