You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

克隆仓库后执行bundle install报错:锁定的parser版本无法获取

Fixing "parser (2.5.0.4) not found" Error When Running bundle install

你的bundle已锁定为parser (2.5.0.4)版本,但该版本在Gemfile列出的所有源中均无法找到。若未修改源,则说明parser (2.5.0.4)的作者已移除该版本,需更新bundle至未被移除的parser版本以完成安装。

This error pops up because the specific parser version your project is locked to (2.5.0.4) is no longer available in your configured gem sources—chances are the maintainers pulled that version from the repository. Here are some straightforward fixes to get you back on track:

1. Update parser to an available version

The simplest fix is to let Bundler handle updating the parser gem to the latest compatible version that’s still hosted. Run this command in your project directory:

bundle update parser

This will adjust your Gemfile.lock to use a newer, accessible parser version while keeping other gems as close to their locked versions as possible. After running this, try bundle install again—it should resolve the missing version issue.

2. Manually specify a valid parser version in your Gemfile

If bundle update parser hits compatibility issues with other gems in your project, you can explicitly set a known-available version of parser directly in your Gemfile. For example:

gem 'parser', '~> 2.7.0' # Pick a stable, recent version that works with your dependencies

To see all currently available parser versions, run:

gem search parser --remote

Choose a version that plays nice with your project’s other gems, then run bundle install again.

3. Verify your gem sources

Double-check that your Gemfile includes active, valid gem sources. The error mentions https://abcderepos.net/api/gems/rubygems/—confirm this source is still operational and hosts the parser gem. You can list your current sources with:

bundle show sources

If the source is missing or broken, add the official RubyGems source to your Gemfile (if it’s not already there):

source 'https://rubygems.org'

Then run bundle install once more.

Content of the question comes from Stack Exchange, asked by jose1221

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:49:54