gpt4 book ai didi

ruby-on-rails - 在 rails 5 上注释 Gem ruby

转载 作者:数据小太阳 更新时间:2023-10-29 07:59:00 25 4
gpt4 key购买 nike

我在使用 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>'

不确定发生了什么。

最佳答案

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

关于ruby-on-rails - 在 rails 5 上注释 Gem ruby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36274567/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com