【发布时间】:2015-09-21 13:36:17
【问题描述】:
我有一个在:development 中定义了 spring 的 Gemfile,如下所示:
source 'https://rubygems.org'
# Rake and rails
gem 'rake', '~> 10.4.2'
gem 'rails', '4.1.13'
group :production do
gem 'unicorn', '~> 4.8.3'
end
group :development, :staging do
gem 'spring'
end
但是,每当我部署时,它都会安装在服务器上。
capistrano 发出的命令如下所示:cd /home/app_user/apps/ag/releases/20150921131835 && bundle install --gemfile /home/app_user/apps/ag/releases/20150921131835/Gemfile --path /home/app_user/apps/ag/shared/bundle --deployment --without development test
我不明白为什么?如何摆脱春天?
我的捆绑器版本是 1.10.6
【问题讨论】:
-
你没有在
without标志中指定staging组,因此它也被安装了 -
请告诉我,您的
config/deploy/production.rb文件是什么样的?你的config/deploy.rb文件也是如此。Capistrano 通常使用 Rails 开箱即用地进行良好的生产部署,不知道为什么你的已经失败了。
标签: ruby-on-rails capistrano bundler rbenv