Rails application layout is not being used, don't see the Vite (bolt) Ruby console message #289
-
Description 📖Doing a clean install and following the 'getting started' in the Vite documentation should leave me with a console message Reproduction 🐞
Vite Ruby InfoRun
Logs 📜If not providing a reproduction: OutputHitting localhost:3000 does show the expected Rails default page -- while running
Screenshots 📷Provide console or browser screenshots of the problem. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
Please follow the steps in the Setup section. In particular, verify that tag helpers are being injected in the layout for the view that you are rendering. |
Beta Was this translation helpful? Give feedback.
-
ehh @ElMassimo - what part of the setup did I miss? There's hardly any need for me to provide a repo as it's 8 cmds off the command line -- anyone should be able to confirm it -- but nevermind, I just wanted to draw your attention to the issue (which I take it, given that you moved it to 'discussions', is not an issue, so: we're good) |
Beta Was this translation helpful? Give feedback.
-
Based on the provided screenshot it seems that you haven't added any routes, the HTML you are seeing is the Ruby on Rails default template. As a result, it's not using the layout on the screenshot on the left. Try adding your first controller/view, and it should use that layout. |
Beta Was this translation helpful? Give feedback.
-
TIL that Rails layouts are not used unless you offer at least one route - I have been hacking on Rails since 2008 but I've never hit this Thank you for setting time aside for an old man! |
Beta Was this translation helpful? Give feedback.
-
Anyways I’m going to work my way through vite - it looks promising even if importmaps are on my Xmas wishlist too 😊
Great work!
Med venlig hilsen
Walther
… Den 21. okt. 2022 kl. 19.42 skrev Máximo Mussini ***@***.***>:
Haha, not like that. I always edit Discussion titles so that they are easier to find in Google 😃
Glad that it works now!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
Based on the provided screenshot it seems that you haven't added any routes, the HTML you are seeing is the Ruby on Rails default template.
As a result, it's not using the layout on the screenshot on the left.
Try adding your first controller/view, and it should use that layout.