Rails和Capistrano缺少宝石

时间:2016-11-10 11:32:08

标签: ruby-on-rails ruby

当我尝试将rails app部署到vps时,我遇到了遗漏宝石的问题。你能救我吗?

capistrano.log

bundle check --path /home/root/apps/appname/shared/bundle
DEBUG [09094abf] 	[31mThe following gems are missing[0m
[31m * net-scp (1.2.1)[0m
[31m * sshkit (1.11.4)[0m
[31m * airbrussh (1.1.1)[0m
[31m * debug_inspector (0.0.2)[0m
[31m * binding_of_caller (0.7.2)[0m
[31m * byebug (9.0.6)[0m
[31m * capistrano-harrow (0.5.3)[0m
[31m * capistrano (3.6.1)[0m
[31m * capistrano-bundler (1.2.0)[0m
[31m * capistrano-rails (1.2.0)[0m
[31m * capistrano-rvm (0.1.2)[0m
[31m * capistrano3-puma (1.2.1)[0m
[31m * spring (2.0.0)[0m
[31m * web-console (2.3.0)[0m
[33mInstall missing gems with `bundle install`

1 个答案:

答案 0 :(得分:0)

您必须使用capistrano/bundler gem来获取部署中的捆绑任务(例如bundle install)。

基本上,您必须在Gemfile中添加capistrano/bundler并使用以下命令在Capfile中要求它:

require 'capistrano/bundler'

因此,Capistrano将在部署期间运行bundle install任务,这个问题将得到解决。