【问题标题】:'bundle' command returns a parsing error'bundle' 命令返回解析错误
【发布时间】:2016-04-18 21:50:20
【问题描述】:

将命令“捆绑”到 rails 应用程序返回此错误:

'[!] There was an error parsing 'Gemfile': You cannot specify the same gem twice with different version requirements. You specified: sdoc (~> 0.4.0) and sdoc (>= 0). BUndlr cannot continue.
from c:/Users/MacKenzie/Documents/Programming/Projects/odot/Gemfile:16
------------------------------------
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem

> gem 'tzinfo-data' platforms: [:mingw, :mswin, :x64_mingw, :jruby}
source 'https://rubygems.org'
-------------------------------------'

【问题讨论】:

  • 您可以发布您的 Gemfile 吗?如错误描述中所述,出现此错误的一种常见方法是,将同一个 Gem 列出两次...
  • 宝石被列出了两次,删除一个修复了错误,谢谢!

标签: ruby-on-rails ruby bundle


【解决方案1】:

您没有包含您的 Gemfile,但我看到“平台”之前缺少逗号。还有一个},应该是]

带有上述修复的示例 gemfile:

source 'https://rubygems.org'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

【讨论】:

    猜你喜欢
    • 2021-02-28
    • 2012-09-11
    • 1970-01-01
    • 2017-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多