【问题标题】:Annotate Gem ruby on rails 5在 Rails 5 上注释 Gem ruby
【发布时间】:2016-03-29 02:56:32
【问题描述】:

我在使用 annotate gem 时遇到了一些问题。我正在运行 ruby​​ 2.3 和 rails 5beta3。 bundle install 似乎工作得很好,但是当我调用 annotate 命令时,我得到了这个......

ruby@echobase:~/crash$ annotate
WARN: Unresolved specs during Gem::Specification.reset:
      activerecord (< 6.0, >= 3.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/usr/local/lib/ruby/gems/2.3.0/gems/annotate-2.7.0/lib/annotate.rb:12:in `require': cannot load such file -- active_support/core_ext/hash/indifferent_
access (LoadError)
        from /usr/local/lib/ruby/gems/2.3.0/gems/annotate-2.7.0/lib/annotate.rb:12:in `rescue in <top (required)>'
        from /usr/local/lib/ruby/gems/2.3.0/gems/annotate-2.7.0/lib/annotate.rb:6:in `<top (required)>'
        from /usr/local/lib/ruby/gems/2.3.0/gems/annotate-2.7.0/bin/annotate:18:in `require'
        from /usr/local/lib/ruby/gems/2.3.0/gems/annotate-2.7.0/bin/annotate:18:in `<top (required)>'
        from /usr/local/bin/annotate:22:in `load'
        from /usr/local/bin/annotate:22:in `<main>'

不知道发生了什么。

【问题讨论】:

    标签: ruby-on-rails ruby rubygems annotate


    【解决方案1】:

    如果您想从终端运行 gem,请尝试 bundle exec annotate User 使用捆绑的 gem 而不是系统 gem。 annotate后面需要提供型号信息。

    【讨论】:

    猜你喜欢
    • 2013-12-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多