什么"你的捆绑被锁定到可寻址"意思?

时间:2017-07-04 11:58:33

标签: ruby-on-rails ruby bundle jekyll

我试图bundle exec jekyll serve

但是我收到了这个错误:

Your bundle is locked to addressable (2.5.0), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of addressable (2.5.0) has removed it. You'll need to update your bundle to a different version of addressable (2.5.0) that hasn't been removed in order to install.
Run `bundle install` to install missing gems.

bundle install给了我

Warning: the running version of Bundler (1.13.6) is older than the version that created the lockfile (1.13.7). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.

这样可行,但它给了我错误的版本:

Successfully installed bundler-1.15.1
Parsing documentation for bundler-1.15.1
Done installing documentation for bundler after 4 seconds
1 gem installed

捆绑在哪里可以锁定,这是什么意思?我检查了我的gemfile,它没有任何内容。我可以解锁吗?我试图为jekyll运行样板并使用brew安装ruby。

1 个答案:

答案 0 :(得分:0)

“您的软件包已被锁定为可寻址...”错误只是意味着您的Gemfile.lock中指定了一个可寻址版本,但它尚未安装在您的计算机上(尚未安装)。运行bundle install修复了该问题。

因此,如果您运行以下内容,您的应用应运行正常:

$ bundle install
$ bundle exec jekyll serve

“Bundler(1.13.6)更老......”警告只是来自Bundler的好人的一个FYI,鼓励你升级。您可以安全地忽略它而不会影响您的应用程序(但最好保持最新状态)。