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

all_view_paths undefined for ActionView::ViewPaths:Module #334

Closed
charlesobrien opened this issue Feb 18, 2023 · 11 comments
Closed

all_view_paths undefined for ActionView::ViewPaths:Module #334

charlesobrien opened this issue Feb 18, 2023 · 11 comments
Labels
bug Something isn't working
Milestone

Comments

@charlesobrien
Copy link
Contributor

Describe the bug

Rails (edge) won't start.

/usr/local/rvm/gems/default/gems/lookbook-2.0.0.beta.1/lib/lookbook/engine.rb:128:in view_paths': undefined method all_view_paths' for ActionView::ViewPaths:Module (NoMethodError) ActionView::ViewPaths.all_view_paths.flat_map do |view_path| from /usr/local/rvm/gems/default/gems/lookbook-2.0.0.beta.1/lib/lookbook/engine.rb:153:in preview_watch_paths'`

To Reproduce

Steps to reproduce the behavior:

Run a Rails app using bin/rails server or bin/dev.

Expected behavior

Rails application should start.

Version numbers

Please complete the following information:

  • Lookbook: 2.0.0 Beta 2
  • ViewComponent: 2.82.0
  • Rails: 7.1.0 alpha (main@9192027)
  • Ruby: 3.2.0

Additional context

Appears to be related to rails/rails@28284fc

@charlesobrien charlesobrien added the bug Something isn't working label Feb 18, 2023
@allmarkedup
Copy link
Collaborator

Thanks for this @charlesobrien - I'll look into it and get it fixed up. I also really need to ensure the tests are running against Rails edge too.

Appreciate you taking time to report the issue and help point me in the right direction, I'll let you know when it's fixed 👍

@allmarkedup allmarkedup added this to the v2.0 milestone Feb 18, 2023
@allmarkedup
Copy link
Collaborator

@charlesobrien I've just pushed a fix up for this and will get a new release out soon - thanks for bringing it to my attention!

For some reason I'm struggling to add Rails edge added to the test matrix but once I've figured that out it should hopefully guard against things like this in the future. I've tested this fix manually however and it should do the jpb.

Let me know how you get whenever manage to give it a try.

@Spone
Copy link
Contributor

Spone commented Feb 18, 2023

@allmarkedup what's the issue with testing against rails edge? I think we got it figured out on VC 's repo.

@charlesobrien
Copy link
Contributor Author

@charlesobrien I've just pushed a fix up for this and will get a new release out soon - thanks for bringing it to my attention!

For some reason I'm struggling to add Rails edge added to the test matrix but once I've figured that out it should hopefully guard against things like this in the future. I've tested this fix manually however and it should do the jpb.

Let me know how you get whenever manage to give it a try.

Thanks, you're awesome! I'll pull main this weekend and give it a try.

@allmarkedup
Copy link
Collaborator

@charlesobrien great! Hopefully it's all fixed up :-)

@allmarkedup
Copy link
Collaborator

@Spone I'm not sure! Running appraisal install to generate the Gemfile always fails with a message about being unable to find actionpack 7.1 alpha. The VC repo works just fine for me so I'm not quite sure what is happening. Just trying to pick it apart now and see what might be different in the way I've got things set up in Lookbook.

@charlesobrien
Copy link
Contributor Author

@charlesobrien great! Hopefully it's all fixed up :-)

Just pulled v2 branch. App starts and appears things are back in order. Will test a bit more later. Thank you!

@allmarkedup
Copy link
Collaborator

@charlesobrien fantastic - I'll close this issue down now then, thanks for letting me know :-)

@Spone
Copy link
Contributor

Spone commented Feb 18, 2023

@Spone I'm not sure! Running appraisal install to generate the Gemfile always fails with a message about being unable to find actionpack 7.1 alpha. The VC repo works just fine for me so I'm not quite sure what is happening. Just trying to pick it apart now and see what might be different in the way I've got things set up in Lookbook.

Here's the PR where everything's working (and tests are run through Appraisal in CI), if it can be of some help!
ViewComponent/view_component#1308

@allmarkedup
Copy link
Collaborator

Thanks @Spone - will take a look at that now

allmarkedup added a commit that referenced this issue Feb 18, 2023
the previous fix masked the bug but didn't actually fix it. this does.
@allmarkedup
Copy link
Collaborator

@charlesobrien I've just realised that the previous fix masked the problem but didn't actually fix it correctly, so I've just pushed a new change that should properly fix it this time

Related: @Spone - I've got it working now! 🎉 😆 Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants