Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Annotate Gem ruby on rails 5

I am having some problems with the annotate gem. I am running ruby 2.3, and rails 5beta3. bundle install seems to work just fine but when I go to call on the annotate command I get this...

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>'

not sure what is going on.

like image 247
Scribbles Avatar asked Jun 01 '26 11:06

Scribbles


1 Answers

If you want to run the gem from terminal then try bundle exec annotate User to use your bundled gems rather than the system gems. You need to provide the model information after annotate.

like image 53
Mohammad Shahadat Hossain Avatar answered Jun 02 '26 23:06

Mohammad Shahadat Hossain



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!