DEV Community

Cover image for Creating a deployable Rails 6 app + TailwindCSS, Stimulus.js, and a custom font.

Creating a deployable Rails 6 app + TailwindCSS, Stimulus.js, and a custom font.

Bob Walsh on February 07, 2020

This post covers how to set up a new Rails 6 app to use Tailwind CSS, and then set up a custom body font, and get the whole thing actually working ...
Collapse
 
hansonryne profile image
hansonryne

Thanks for the article!

Couple typos in the flatpickr section:

form.text_field :publish)date, date, { behavior: "flatpickr"}

Should be

form.text_field :publish_date, data: { behavior: "flatpickr"}

Collapse
 
leob profile image
leob • Edited

This:

"The shelf life of developer information is now even shorter. Any tutorial, video, or post older than 6 months is suspect"

is spot on, and is what I've been using as a guideline for a long time :-)

I don't get the remark about the unmet need for a SaaS though ... you mean a "system" or "app" to help developers obtaining up to date developer info?

Collapse
 
bobwalsh47hats profile image
Bob Walsh

I wasted several workdays trying to get an obsolete tutorial implemented. If there was a service that would use a Chrome extension to track obsolete posts and tutorials and warn me "hey, that post is the old way of doing such and such, see this post for the new shiny thing" I'd pay for it.

Collapse
 
leob profile image
leob

Right, but who is going to curate that information? That would be a huge and pretty boring task, assuming it would be manual. As you say, I simply don't put a lot of trust in info that's older than let's say half a year to a year.

Thread Thread
 
bobwalsh47hats profile image
Bob Walsh

Like a lot of things on the web, this idea requires user content. So let's say there's a Chrome extension that does two things: downvotes posts as now obsolete and upvotes posts that are "current". Kind of like all those coupon services we use to save a few bucks on site renewals.

So a developer goes to a post about adding an API to a Rails 6 app. The extension either does nothing (no info available), turns green (other developers have said this is a good current post) or red (other developers say this post is now outdated). This would be a huge timesaver!

It would be a no-brainer buy for individual developers and teams of developers, hence a viable SaaS.

Thread Thread
 
leob profile image
leob

You're right, I was thinking of that but then forgot to mention it. You need to "crowd source" the info, people would 'vote' content up or down. Might be a viable idea.

Collapse
 
tonydehnke profile image
Tony Dehnke

Thanks for this, it was good, a bit hard to follow in some places as it's not clear where to put the code always. Would be great to have a linked sample repo to be able to view so we can see the full file examples if we need to. Thanks again!

Collapse
 
leesmith profile image
Lee Smith 🍻

Awesome stuff. I've always loved Rails and I'm really into TailwindCSS these days. Stimulus is still new to me...gotta write more JS with it in the future.

If I could make a suggestion though. Please cover PurgeCSS in your TailwindCSS installation material. Without PurgeCSS, deploying a Tailwind app to production will result in a large payload. They really work hand in hand.

Great post!

Collapse
 
bobwalsh47hats profile image
Bob Walsh

Good catch! Done.

Collapse
 
ben profile image
Ben Halpern

This seems like one fabulous stack

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

I started by Googling "Rails 6 Vue js"

Been there, done that πŸ˜