Chris Oliver


274,550 Experience
31 Lessons Completed
298 Questions Solved


Posted in New website design!

I do use @apply in a few places like buttons, but that's about it. We talked to Adam Wathan on Remote Ruby Episode #97 about this recently and he advised on not using @apply which was interesting. Definitely give that a listen.

For the most part, I've copied a lot of components from TailwindUI and tweaked them without extracting out my own classes. He recommends using partials or something like ViewComponent instead of @apply.

@Mylan, you can use TailwindCSS 2.0 with Wepbacker! You just need to use the master branch for the gem and node module for the time being. I fixed a bug in Webpacker to make it work the day that TailwindCSS 2.0 came out so I could update Jumpstart Pro for it. 👍

Kieran and I worked on it that night and wrote up our steps:

Posted in How do I renew my plan at the current discount?

It'll renew at the same price. 👍

I've switched to using for SSL on Ubuntu 20.04 and it works great.

Definitely recommend it. It's what we use in for SSL.

Posted in Noticed Gem - Twilio is not working

If you set the debug: true option it will print out the request and response:

Posted in Introduction to Stimulus Reflex Discussion

Dan, you're correct. If you trigger a reflex, it's just like refreshing the page. That's why I typically wouldn't use Reflex for situations like that where you need to be more efficient. That said, fragment caching can help considerably there. You just have to be careful with what you're doing.

That said, I think Stimulus Reflex killer for just getting something working quick and dirty as a prototype.

Posted in Activity Feed From Scratch Discussion

Hahaha! That is awesome. I loved Digg. I used to watch Diggnation sooo much.

Posted in Inviting Users with devise_invitable Discussion

You can copy their mailer and views from the gem into your app and then make any tweaks you need. 👍

Posted in Duration of a video in the listing page

JP, I'm storing it as an integer, total number of seconds. Then I convert it to whatever display format I want and that gives me the flexibility to change it and/or calculate the total duration of a series too.

You can just assign it to the window variable so it's accessible anywhere I believe.

window.$ = window.jQuery = require("jquery")

Posted in Is Something Wrong With Jumpstart?

Strange! I wonder what's going on.

Another thing you can try is applying Jumpstart to an existing Rails app.

rails new -d postgresql jumppay
cd jumppay
rails app:template LOCATION=

Posted in Is Something Wrong With Jumpstart?

Must be an issue with Spring (it always is shakes fist).

When I run it, it moves right onto the next step:

Webpacker successfully installed 🎉 🍰
You can change application name inside: ./config/application.rb
         run  spring stop from "."
Spring is not running
    generate  devise:install
       rails  generate devise:install
Running via Spring preloader in process 59362
      create  config/initializers/devise.rb
      create  config/locales/devise.en.yml

Can you try it with DISABLE_SPRING=1 at the beginning? Does that get any further?

Posted in Is Something Wrong With Jumpstart?

Yeah! I just used it yesterday and didn't have any issues, so I'm curious to see what's going on with your end. I definitely want to keep it up-to-date if anything stopped working!

Posted in Is Something Wrong With Jumpstart?

Can you paste the logs in a or something so I can see them all?

Posted in Video idea: Dry Monad

I haven't used many of the dry-rb gems, but I'll have to check them out sometime. I've been meaning to for years. 😅

Posted in Is Something Wrong With Jumpstart?

What do the logs say?

Posted in Best Approach for Updating Attributes On Join Table

You can add a position:integer to your AuthorArticle model to keep track of the order.

The acts_as_list gem can help you order them, but that wouldn't allow for duplicates where you might have several "lead authors". You can probably do without it.

The modal would be for an AuthorArticle object and would have two fields for author and position.

Posted in Huge syslog file in production

Awesome. You can use the RAILS_LOG_TO_STDOUT env var to have Rails not write to the normal log file. You may also need to tweak the ActiveRecord logger if you need to turn it off.

Posted in Huge syslog file in production

If you're running Puma with systemd or something, it will write to syslog by default. That will need to be logrotated more often so it doesn't fill the disk.

The logrotate location for syslog is /etc/logrotate.d/rsyslog and you can add a line in there for setting a max file size. maxsize 500M to rotate it after it becomes 500MB. You can also tweak how often the syslog is rotated as well.

You can also use lograge or a similar tweak to the Rails logs to minimize what they write.

Posted in Mailboxer Gem

I think I've seen any new gems for messaging since Mailboxer.

What parts of it doesn't work in Rails 6?

Posted in Button Loading Animations with jQuery UJS Discussion

Rails UJS still makes this work exactly the same as it always has. There's really no need for Stimulus for this.

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.