rake gems:buildOf course you'd also like these extensions to be built on your production machine when you deploy with Capistrano. I'm sure there are more elegant ways to do this, but this works for me. Just add this to your deploy.rb file:
task :after_update_code, :roles => :app do if ENV['build_gems'] and ENV['build_gems'] == '1' run "rake -f #{release_path}/Rakefile gems:build" end endThis way you can pass an environment variable to tell Capistrano if you want native gem extensions to be built or not. If you do, call this:
build_gems=1 cap deploy...and if you don't just call
cap deploy. I always love to learn about more elegant solutions, so please comment if you know one. If this was useful for you, please take a minute and recommend me:
Thank you!