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

0.0.14 breaks namespaced controllers with :root directed to apipie outside RAILS_ENV=development #89

Open
amalc opened this issue Feb 3, 2013 · 2 comments

Comments

@amalc
Copy link

amalc commented Feb 3, 2013

Symptom (Reproducible):

  1. Take an existing namespaced API controller, i.e. apps/api/v1/do_something_controller.rb
  2. Lock apipie to version 0.0.13
  3. Ensure :root point to 'apipie/apipies' in route.rb
  4. Browse to application running where RAILS_ENV=production.
  5. Everything works!
  6. Switch to 0.0.14.
  7. Reload and repeat step 4.
  8. Error from Rails. "Expect apps/api/v2/do_something_controller.rb to define Api::V1::DoSomething.

Oddly enough, no problems when running in development.

The "VERSION" tag is also broken, but I expect that was intentional?

@iNecas
Copy link
Member

iNecas commented Feb 4, 2013

Hi, thanks for report.

Is there a possibility that you have set reload_controllers = true for Apipie.configure? I was able to reproduce this only when reload_controllers = true in production mode. The :root doesn't seem to have affected this.

If reload_controllers was not touched by you, we have to find better reproducer, maybe by forking https://github.com/iNecas/apipie-demo and breaking the results branch so that it shows the error.

@pcai
Copy link

pcai commented Mar 22, 2013

+1 on this, happening between the .13 and .14 builds - no changes to our application. Removing reload_controllers option fixed it. It works fine in development as amalc says.

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

3 participants