ngannotate-rails icon indicating copy to clipboard operation
ngannotate-rails copied to clipboard

Upgrading to Rails 5.1.2 from Rails 4.2.0 causes the following error

Open bruparel opened this issue 8 years ago • 6 comments

=> Rails 5.1.2 application starting in development on http://localhost:3000 => Run rails server -h for more startup options Exiting /Users/Bharat/.rvm/gems/ruby-2.4.1/gems/ngannotate-rails-0.15.4.1/lib/ngannotate/rails/railtie.rb:18:in block in <class:Railtie>': undefined method register_postprocessor' for nil:NilClass (NoMethodError)

Any idea on how to fix this? Thanks.

bruparel avatar Aug 14 '17 20:08 bruparel

I need to look into this (ETA today afternoon). Before that I suggest you try to upgrade ngannotate-rails gem into latest version (1.2.2)

kikonen avatar Aug 15 '17 04:08 kikonen

@kikonen. Thank you. I upgraded to the latest version as you suggested and it worked fine :)

bruparel avatar Aug 15 '17 12:08 bruparel

So rails 5.1.2 starts fine, but the page fails to load angular which was loading fine in the 4.2.0 version. I opened up an issue on StackOverflow to cast a wider net. Here is the URL:

https://stackoverflow.com/questions/45697958/upgrading-to-rails-5-1-2-from-rails-4-20-breaks-angular-integration

My previous version of ngannotate-rails was 0.15.4 in the rails 4.2.0 version.

bruparel avatar Aug 15 '17 17:08 bruparel

Ok, I will look into this

kikonen avatar Aug 16 '17 05:08 kikonen

@kikonen, My apologies. This was not a problem with your Gem but the way the Rails passes data to Javascript. Please see my own answer to my StackOverflow link provided above. This took the better part of yesterday to debug, but it worked out. Thank you for your patience.

bruparel avatar Aug 16 '17 12:08 bruparel

Regardless, was relevant to add some tests for current rails version :)

kikonen avatar Aug 16 '17 19:08 kikonen