Bundler using old version

2019-07-19 06:37发布

问题:

I am using Bundler for my Rails application. When I list installed bundler gems it lists 1.4.0.pre.1 and 1.3.15 and running bundler -v yields 1.4.0.pre.1 (which is what i want).

However, when I try to run my application it says current bundler version is 1.0.15. This version is not installed as a gem and I cannot figure out how to remove it (gem uninstall bundler -v 1.0.15 wont work since this version is not installed as a gem).

I have tried updating and installing new versions, but nothing is working. Please help, I've been stuck for hours. Thank you.

回答1:

Try running:

$ which -a bundle

This will tell you the location of all the instances of bundler found on your computer.

From there, you should be able to locate the offending version of bundler and uninstall it.



回答2:

This worked for me when using vagrant

[vagrant@precise32:/vagrant (master)]$ sudo gem install bundler
Fetching: bundler-1.11.2.gem (100%)
Successfully installed bundler-1.11.2
1 gem installed


回答3:

try running this on you app console:

bundle update