RSSAmplifier

Blog

Jason Charnes

Jason Charnes is Ruby developer in Memphis, TN. He is a co-host on the Remote Ruby Podcast and an organizer of Southeast Ruby.

jasoncharnes.comRSS feed ↗10 posts

Latest posts

2022 Wish list

I’m not good at resolutions. Instead, I made a wish list of things I’d like to do in 2022. Make better choices for my mind and body Less junk food Less alcohol Less complaining More meditation Detach from iPhone/internet more often Less scrolling Less entertainment Less screen time More utility Be present for my family and friends Less iPhone Less “not now, son” More date nights More conversations…

Disabling Rails Generators

I love spinning up a Rails controller using rails g controller . I don’t love all the files it brings with it. I end up with a treasure trove of files I either have to manually delete or commit into my git history for all eternity. For example, I typically use Webpacker for all my assets. When I run rails g controller I don’t want autogenerated stylesheets in app/ . I want to disable assert…

Installing React in Ruby on Rails with Webpacker

So, you want to use React in a Ruby on Rails application. I’m glad you’re here! I think React is a great tool to use in your Ruby on Rails applications. I’ll help you get started. We’ll look at bootstrapping any Ruby on Rails application (that can use Webpacker) with React. Luckily, for us, Ruby on Rails makes it pretty easy to get started. Installing Webpacker If you’re using Rails 6 , no further…

Dissecting a New Webpacker React Component

If you’re new to React, and just installed React through Webpacker in your Ruby on Rails application , you might have some questions. Let’s answer those questions by walking through the React component Rails and Webpacker auto-generated for us. Hello React Rails auto generates a React component in app/javascript/packs named hello_react.jsx . Cute name, right? The file looks like this: import React…

Run.rb

I’m proud to be involved in the Ruby community. I want to do what I can to help other developers discover Ruby. Whether that’s seasoned non-Ruby developers or people like me who stumble into programming , I want to help. As part of that, I’ve recently started on a project to help people learn Ruby. The final form will be a free set of guides (and maybe videos) to help people get started with the…

Using Ruby in 2019

Stop me if you’ve heard this one… Ruby is dead! Hacker News As someone actively writing (and heavily invested in) Ruby, it’s hard not to question if I’m “missing the boat” when I hear such things. In an attempt to “stay relevant,” if you will, I spent the better part of last year exploring other programming languages and paradigms. I built many, many Hello, World applications. Although I didn’t…

Goodbye, 2018

It’s the last day of 2018. Like most things in 2018, I waited until the last possible minute to write this. Some great things happened, which I’m excited to share. Some less stellar things happened and some things didn’t happen. Either way, I want to take time to put my thoughts on paper this site. I have several ideas of what went wrong in 2018 and what can be different in 2019. The Good Hello,…

Remote Ruby #20: Trivia Questions and Answers

On episode 20 of the Remote Ruby podcast, Chris and I play a game of trivia. These questions are composed of information from Wikipedia and beneggett/ruby-trivia . I have no doubts that some of this information could be wrong. I was a late bloomer to Ruby. 😎 I hope you enjoy(ed) the episode. According to Matz, what year was Ruby conceived? 1993 What year did Ruby first appear? 1995 There were two…

Eager Loading/Querying ActiveStorage Attachments

ActiveStorage , the new kid on the block. It’s exciting for Ruby on Rails developers to have a built-in solution for file uploads/attachments. Let’s talk about interacting with the table ActiveStorage gives us. There are times that we’ll want to reach for eager loading and even query against our attachments. Without much effort, it’s easy to commit the N+1 sin. # app/models/thing.rb class Thing <…

Adding Bootstrap Errors to Rails Fields with Errors

The other day I was working on a new Rails application. Though I’m currently obsessed with Tailwind CSS , this project was a better fit for Bootstrap. I needed some predefined styling, quick. Unfortunately, fields with errors got in my way. The app, like most web applications, required forms. Using Ruby on Rails’ (ActiveRecord) model validations, I was able to setup displaying error messages…