I needed some Rails 3.1 enhancements to Rails Engines for an in-development app, so I enabled Edge Rails in my Gemfile:
Then I did what I normally do,
sudo bundle install. But this broke the
I deleted the Git checkout and tried again:
remote: Counting objects: 195841, done.
remote: Compressing objects: 100% (42932/42932), done.
remote: Total 195841 (delta 151525), reused 195056 (delta 150929)
Receiving objects: 100% (195841/195841), 33.12 MiB | 2.05 MiB/s, done.
Resolving deltas: 100% (151525/151525), done.
Fetching source index for http://rubygems.org/
Using rails (3.1.0.beta) from git://github.com/rails/rails.git (at master)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
$ bundle show
git://github.com/rails/rails.git (at master) is not checked out. Please run `bundle install`
Although Bundler has had some issues with remote Git repositories in the past, this one was entirely my fault: don’t use
sudo bundle install. A simple check confirms this:
sudo bundle show works like you’d expect.
So to recap: remove the checkout and
bundle install (no
sudo!) to fix this problem.