Live data from Hacker News

Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

nauman.medium.com

11–20 of 101 posts

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#11
post #4
post #2

Wait. So… you practically need to develop an app to start developing an app? When someone tells me to ‘invoke these 3 magic incantations’, I can sort of keep track of it. But here it seems like the instructions are to invoke these 300 magic incantations.

Yeah, one of the key selling points of Rails was that it was Omakase (Japanese: "I'll leave it up to you", i.e. you take the defaults Rails provides) and "batteries included" (i.e. there's enough provided in the box to get a working application). Having to jump through all these hoops (I'll note that one of the suggested gems is Devise, which provides a framework for user authentication) suggests either this is very…

The majority of hoops jumped through in the article are entirely of the writer’s own making. They changed the default CSS pipeline and added functionality Rails deliberately does not define.

Devise is common for user authentication (and good choice, in my opinion) but it is extremely opinionated and does not like you departing from the blessed path.

Rails tends to avoid enforcing patterns beyond the base building blocks of MVC. User authentication is out of scope. (Turbo links is strongly opinionated but also very limited and very easy to remove.)

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#12
post #4
post #2

Wait. So… you practically need to develop an app to start developing an app? When someone tells me to ‘invoke these 3 magic incantations’, I can sort of keep track of it. But here it seems like the instructions are to invoke these 300 magic incantations.

Yeah, one of the key selling points of Rails was that it was Omakase (Japanese: "I'll leave it up to you", i.e. you take the defaults Rails provides) and "batteries included" (i.e. there's enough provided in the box to get a working application). Having to jump through all these hoops (I'll note that one of the suggested gems is Devise, which provides a framework for user authentication) suggests either this is very…

Rails still works just fine out of the box. The bulk of this article is setting up Tailwind JIT, which is not required.

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#13
post #2

Wait. So… you practically need to develop an app to start developing an app? When someone tells me to ‘invoke these 3 magic incantations’, I can sort of keep track of it. But here it seems like the instructions are to invoke these 300 magic incantations.

This is due to adding a JavaScript framework. Rails can be up and running immediately.

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#15
post #4

Earlier quoted context omitted.

Yeah, one of the key selling points of Rails was that it was Omakase (Japanese: "I'll leave it up to you", i.e. you take the defaults Rails provides) and "batteries included" (i.e. there's enough provided in the box to get a working application). Having to jump through all these hoops (I'll note that one of the suggested gems is Devise, which provides a framework for user authentication) suggests either this is very…

The majority of hoops jumped through in the article are entirely of the writer’s own making. They changed the default CSS pipeline and added functionality Rails deliberately does not define. Devise is common for user authentication (and good choice, in my opinion) but it is extremely opinionated and does not like you departing from the blessed path. Rails tends to avoid enforcing patterns beyond the base building blo…

My point about Devise was more “if you’re not using auth, why have you included this?”. I think Rails should probably have a Devise-lite in the box, though.

This sounds like the second of my options i.e. gl;hf when the next major Rails release comes around.

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#16
post #5

It's telling that most instructions deal with the Javascript toolchain and not Rails itself. And let's hope that everything works and none of the 2000 imported node_modules blow up when this tutorial is 3 months old. I'm looking forward to Phoenix 1.6 which ditches Webpack for esbuild. Every step away from the insane churn of the modern frontend world is welcome.

I don't think it's telling of anything. Rails was not made to work seamlessly with these tools, so obviously there's going to be some setup cost.

Compare with something like NextJS where the aforementioned setup takes almost no effort.

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#18
post #5

It's telling that most instructions deal with the Javascript toolchain and not Rails itself. And let's hope that everything works and none of the 2000 imported node_modules blow up when this tutorial is 3 months old. I'm looking forward to Phoenix 1.6 which ditches Webpack for esbuild. Every step away from the insane churn of the modern frontend world is welcome.

How often does your webpack setup blow up? We haven’t touched our configuration in a year and it still works perfectly fine. What complex things must you be doing for you config to not even last 3 months !!!

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#19
post #4
post #2

Wait. So… you practically need to develop an app to start developing an app? When someone tells me to ‘invoke these 3 magic incantations’, I can sort of keep track of it. But here it seems like the instructions are to invoke these 300 magic incantations.

Yeah, one of the key selling points of Rails was that it was Omakase (Japanese: "I'll leave it up to you", i.e. you take the defaults Rails provides) and "batteries included" (i.e. there's enough provided in the box to get a working application). Having to jump through all these hoops (I'll note that one of the suggested gems is Devise, which provides a framework for user authentication) suggests either this is very…

Having just been playing around with Rails and different CSS frameworks for a new project, this is entirely due to Tailwind's dependencies. Adding other CSS frameworks is as easy as yarn add X then importing it into your application.css file.

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#20
post #14

Another reason to move to Elixir from Ruby...

Where setting up a new app with Tailwind JIT is substantially easier?

Where Phoenix does a better job with all this and you don't have Ruby's baggage anymore.
Post reply on HN