Search code examples
rubybundler

bundler won't run (no-deployment doesn't work)


I was fiddling around with the --deployment option on my ruby app. After that I wanted to add another gem to my app. I added it to the gemspec, and ran bundle install but the new gem didn't get installed. I deleted the vendor cache, .bundle, Gemfile.lock and tried again, and got the error I expected:

You are trying to install in deployment mode after changing your Gemfile. Run bundle install elsewhere and add the updated Gemfile.lock to version control. ...

I had seen this before, so I proceeded to use --no-deployment flag. For some reason though, the same error popped up again. An hour later I'm still stuck in the same place. No matter what I do, I can't get bundle install to work and install the new gem.

Is this some sort of strange error? Or bundler by design?


Solution

  • Pff... Somehow a .bundle config folder sneaked into my home directory, which made all repos on my machine look like deployment repos to bundler. Deleting the .bundle folder resolved the issue.