I’m using Capistrano with Rails 3.2.1. When I do cap deploy, I get this error:
Could not find multi_json-1.3.6 in any of the sources
Here’s some of the relevant output leading up to this error:
* executing `deploy:assets:precompile'
* executing "cd /home/jason/dittypad-cap/releases/20120728190221 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
servers: ["sniphq.com"]
[sniphq.com] executing command
** [out :: sniphq.com] Could not find multi_json-1.3.6 in any of the sources
I do have this gem, though:
$ bundle list | grep multi_json
* multi_json (1.3.6)
I was curious to see what would happen if I ran assets:precompile directly in production. The first time I tried it, it worked. But now when I try it I get this:
$ bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile
/home/jason/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.22/lib/bundler/rubygems_integration.rb:143:in `block in replace_gem': rake is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
from /home/jason/dittypad-cap/shared/bundle/ruby/1.9.1/bin/rake:18:in `<main>'
Why is it complaining about multi_json being missing even though I have it?
I got past this by updating my bundler version to 1.0.18.
I got the answer here: Capistrano deploy/assets on Rails 3.1 fails