为什么 spring 安装在我的生产服务器上?
Why is spring being installed on my production server?
我有一个在 :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
我不明白为什么?我怎样才能摆脱 spring?
我的打包器版本是 1.10.6
正如 Yury Lebedev 在评论中提到的,您没有在 without
标志中排除 staging
组,因此还安装了定义为 staging
的宝石(包括 spree
在你的情况下)。
我有一个在 :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
我不明白为什么?我怎样才能摆脱 spring?
我的打包器版本是 1.10.6
正如 Yury Lebedev 在评论中提到的,您没有在 without
标志中排除 staging
组,因此还安装了定义为 staging
的宝石(包括 spree
在你的情况下)。