Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
alimac opened this issue Aug 8, 2018 · 12 comments
Closed

Comments

@alimac
Copy link
Contributor

alimac commented Aug 8, 2018

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.

@jejacks0n
Copy link
Owner

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

@jejacks0n
Copy link
Owner

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.

@brettfishman
Copy link

+1

1 similar comment
@baffers
Copy link

baffers commented Sep 7, 2018

+1

@jsmartt
Copy link
Collaborator

jsmartt commented Sep 7, 2018

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.

@baffers
Copy link

baffers commented Sep 7, 2018

I'm using 5.2.1

@alimac
Copy link
Contributor Author

alimac commented Sep 7, 2018

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

@brettfishman
Copy link

Same - 5.2.x

@jejacks0n
Copy link
Owner

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.

@dianpan
Copy link

dianpan commented Sep 20, 2018

@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.

@chrisgibson
Copy link

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

@garyjohnson
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants