Bundler, ExecJS, Mac OS X and Debian

I'm developing Rails on Mac OS X 10.8 and trying to use Capistrano to deploy to Debian Squeeze.

Deploying gives me this error:

Could not find libv8-3.3.10.4 in any of the sources

It seems to be that I have bundle package-d a Mac OS X binary gem:

Updating files in vendor/cache
...
* libv8-3.3.10.4-x86_64-darwin-12.gem

The Gemfile has:

gem 'therubyracer'

I want to use binary gems because Squeeze does not provide Node.js from package manager and I would like to keep source compiling out of production server.

Is there any way to tell Bundler to package both Linux and Darwin binaries?

BTW, how does therubyracer accomplish this when it too uses Bundler?

Install libv8 on your Debian box.

One solution was to skip bundle package which would download all packages from source, but his made deploy too slow for my taste (probably b/c for some reason it still didn't download binary gem and compiled libv8 afresh each time).

So I ended up installing Node.js from source to the Debian box and document that as a prerequirement for the project. Then I commented out this part of Gemfile:

group :assets do
  ...
  # gem 'therubyracer'
  ...
end

Now I can again bundle package the whole lot and deploy fast.