首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在rails 5上标注宝石

在rails 5上标注宝石
EN

Stack Overflow用户
提问于 2016-03-29 02:56:32
回答 1查看 1.1K关注 0票数 3

我对带注释的创业板有一些问题。我正在运行ruby2.3和rails 5beta3。包安装似乎工作得很好,但是当我去调用注释命令时,我得到了以下信息.

代码语言:javascript
复制
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>'

不知道是怎么回事。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-03-29 05:08:45

如果您想从终端运行gem,那么尝试使用bundle exec annotate User来使用捆绑的宝石,而不是系统宝石。您需要在annotate之后提供模型信息。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36274567

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档