Reputation: 6515
When I run cap deploy
, the gems in the :assets
group are not installed.
This is a problem because I'm using precompiled assets, and Capistrano has to run rake assets:precompile
on the server. That will fail unless the assets gems are installed.
I can work around this problem by manually running bundle install
within the correct release directory. But obviously this isn't the proper workflow.
Here's the full command Capistrano is executing to install the gems on each deploy:
rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'default' -c 'cd
/home/deploy/rails_apps/vlc/releases/20120223192328 && bundle install --gemfile
/home/deploy/rails_apps/vlc/releases/20120223192328/Gemfile --path
/home/deploy/rails_apps/vlc/shared/bundle --deployment --quiet --without development test'
Here's the end, which I think might be part of the problem:
--deployment --quiet --without development test'
Evidently, these flags cause Bundler to install without the :assets
group. What is the expected behavior here? Is what I'm seeing out of the ordinary? (I'm guessing so, since it doesn't make sense for Capistrano to deliberately refrain from installing a gem group that it's about to use.)
As a side note, I also note this line in application.rb
:
Bundler.require(*Rails.groups(:assets => %w(development test)))
I'm assuming nothing in application.rb
would affect a bundle install
, since Rails doesn't boot for that. But please correct me if this line is actually relevant to my problem.
Upvotes: 2
Views: 1428
Reputation: 53158
--without
is remembered option, check in your project dir / on server the file .bundle/config
it's possible it already contains something like this:
---
BUNDLE_WITHOUT: assets
Upvotes: 1