leonel
leonel

Reputation: 10214

Rails 3 and Bundler. How to deploy and NOT package gems

I'm having lots of problems trying to deploy using capistrano. I keep on getting errors about libv8 not in any of the sources.

Could not find libv8-3.11.8.13 in any of the sources

Here https://github.com/cowboyd/libv8/issues/56 tells you that you could "not to use packaging", that way, the deployed app won't use the bundle package.

How can I deploy and use the gems NOT IN THE BUNDLE PACKAGE? I want the app do run bundle everytime I deploy instead or to just run bundle when the Gemfile has changed.

Upvotes: 0

Views: 171

Answers (2)

leonel
leonel

Reputation: 10214

This is how I got it working: https://github.com/cowboyd/libv8/issues/77#issuecomment-12711634

I'm doing development on a mac and deploying to a red hat server. It seems Rails needs a OS, platform-specific version of the gem. So when I'm running bundle on my development machine (mac) and then deploy it with capistrano to the production server (red hat), it won't work.

What I ended up doing is...

  • manually download the libv8 gem I needed from http://rubygems.org/gems/libv8
  • copy the downloaded gem to the vendor/cache folder
  • then deployed the app (cap deploy:cold)

and it worked.

Upvotes: 1

Puhlze
Puhlze

Reputation: 2614

If I understand your question correctly it sounds like you're missing the bundle capistrano task. See https://github.com/carlhuda/bundler/blob/master/lib/bundler/capistrano.rb for more. You should be able to "require 'bundler/capistrano'" to your capistrano deploy.rb file so that bundle is run on every deploy.

Upvotes: 0

Related Questions