Open deric opened 11 years ago
Hmm... good question. My first answer would be: not really.
Capistrano does not know whether a gem has native extensions (nor does bundler). Also, if you bundle gems on the target host... why use the copy bundled gem? It was intended for those environments, where bundling on the target machine is not permitted. This kind of dictates that your deploy machine needs to have the same architecture.
Ohh here's one on second thought: Since you can group your gems within your Gemfile... why not do something like this:
# in your Gemfile
group :native do
gem 'the-one-with-native-extensions'
end
Then, in your deploy.rb
:
require 'capistrano-strategy-copy-bundled'
set :deploy_via, :copy_bundled
set :bundle_without, [:development, :test, :native]
When development machine run on different architecture or just depends on different versions of system libraries, the bunde will fail. Is it possible to skip packing gems with native extensions?