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

Possible issue with Rails 7 (alpha 2) #1074

Closed
matt17r opened this issue Oct 17, 2021 · 1 comment
Closed

Possible issue with Rails 7 (alpha 2) #1074

matt17r opened this issue Oct 17, 2021 · 1 comment

Comments

@matt17r
Copy link

matt17r commented Oct 17, 2021

I can't get any views working on a brand new Rails 7 app (Rails 7.0.0.alpha2) with Haml (Haml 5.2.2) installed via haml-rails (2.0.1).

Steps to reproduce:

  • rails new myapp --database=postgresql --javascript esbuild --css tailwind
  • Add gem "haml-rails", "~> 2.0" to Gemfile and bundle
  • Run rails haml:erb2haml to migrate view templates
  • Run rails g scaffold test and rails db:migrate
  • visit http://localhost:3000/tests

Expect to see scaffolded "Tests" page but actually get a "406 Not Acceptable" error:

ActionController::UnknownFormat (TestsController#index is missing a template for this request format and variant.

request.formats: ["text/html"]
request.variant: []):

Am I missing something obvious or doing something blatantly wrong?

If not, I'm happy to try and dig into this a little bit but I have no idea where to start so if anyone has some pointers on where to look I'd appreciate that. I did take a quick look at #1008 to see if that had any clues about how Haml works or what might need to change to support a new major version but I'm none the wiser.

@matt17r
Copy link
Author

matt17r commented Oct 18, 2021

Good news, I was both missing something obvious and doing something blatantly wrong. HAML wasn't in the list of available variants because I hadn't restarted the server 🤦‍♂️

@matt17r matt17r closed this as completed Oct 18, 2021
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

1 participant