jejacks0n/apitome

undefined local variable or method apitome `apitome' after upgrading to 0.2.0

alimac opened this issue · 12 comments

Hi folks!

Just upgraded apitome gem from version 0.1.0 to 0.2.0, and getting the following error when visiting the API docs page:

undefined local variable or method apitome `apitome'

screen shot 2018-08-07 at 10 15 48 am

Error points to this line:
https://github.com/jejacks0n/apitome/blob/master/app/views/apitome/docs/_example.html.erb#L20

When I replaced apitome.simulated_path(link) with simulated_path(link), the docs page loaded OK, and 'Simulated Response' link worked fine. I do not see the apitome variable being used anywhere else in the templates.

it's how engines are namespaced and routes get defined.

what version of rails are you using?

https://github.com/jejacks0n/apitome/blob/master/lib/apitome/engine.rb#L3

This line should make that work, so I'm a little confused.

+1

What version of rails are people using that are experiencing this issue? cc @baffers, @brettfishman, @alimac

Master has the apitome namespace removed, but it's my understanding that the namespace shouldn't hurt.

I'm using 5.2.1

My sincere apologies for not posting earlier... I'm using rails 5.2.1 and ruby 2.5.1.

Same - 5.2.x

It looks like that's already fixed in master. I'd recommend pointing to github: "jejacks0n/apitome", ref: "c779d67".

If y'all report that it's working as expected in other ways I can cut a release. In general though this is really good advice and is helpful for open source devs -- check master, and then try using it if it looks fixed. Reporting that things are working in master is far more valuable than +1s IMO.

@jejacks0n - just tested the fix by pointing to github: "jejacks0n/apitome", ref: "c779d67"
It has indeed solved the issue, so cutting another release would be appreciated.

@jejacks0n I can confirm that master fixes the reported problem for me as well. Are there plans to cut a new release soon?

@jejacks0n Would love to see an update pushed for this issue as I'm still referencing the commit hash.