- RailsNotes Newsletter
- Posts
- The RailsNotes Newsletter 🟥 ISSUE #28
The RailsNotes Newsletter 🟥 ISSUE #28
🟥 ISSUE #28 (VS Code + Rails, rdbg, VS Code extensions)
I was going to try and make a witty joke here, but all I can think about is how Vision Pro 👓️ could make something like this real (screens on all angles… and I guess a Ruby-inspired avatar?)
— SPONSOR — | Learn efficient search in Rails+Postgres, by PgAnalyze. Speed up search queries from seconds to milliseconds and learn about exact matches, similarity matches with trigrams, partial matches with ILIKE, and natural language full-text search. |
Welcome to The RailsNotes Newsletter — Issue #28!
Hey! It’s been a few weeks (sorry!), but I’m extremely excited about something — we’ve just passed 1000 subscribers! 🥳 🥳 🥳
That sweet, sweet taste of subscribers in the morning 🤭
Thank you all so much for the support! I started this newsletter last year when I was in between jobs, and it’s been awesome growing it, sharing interesting articles, and getting to chat to you all!
Hitting 1k crept up on me, so I haven’t planned any fun giveaways or celebrations or anything (I’m open to ideas though!), so let me just say thank you again! Here’s to the next 9000 🥂😉
This week I’m digging into VS Code + Rails. I’m a VS Code user both on my personal projects and at work, and I know many of you are VS Code users too. I’m keen to share the articles I’ve found handy for getting a decent setup.
I published this week’s featured article, A decent VS Code + Ruby on Rails setup, a few weeks ago now and it semi-blew-up on HN (#6 place I think overall?) so it seems like it’s something that resonated! I’ve found a couple of other handy threads and articles too, if you want to dive deeper.
One last thing — Thanks to PgAnalyze for sponsoring my newsletter (again!). They’re an amazing long-term sponsor, and this week’s placement is about their (free!) Ebook on full-text search with PostgreSQL. It’s full of great info and detailed diagrams like this; check it out if you’re interested 👇️
PgAnalyze has an excellent, free!, ebook on full-text search with PostgreSQL. It’s full of great info and interesting diagrams like this.
~ ✨ FEATURED ARTICLE ✨ ~
Your happy face after setting up a half-decent VS Code environment for Ruby on Rails development, rather than fighting against it all the time.
I meant to write this article for aaaages, and I finally did it! I’ve put together a set of extensions that, in my opinion, are a solid baseline for VS Code + Ruby on Rails development in 2024.
It’s not perfect! I wish VS Code had better Ruby & Rails support…. but it doesn’t 🥲 . Ruby isn’t a first-class citizen in VS Code like Python or JS/TS, and the community extension support is pretty anaemic too.
There is of course RubyMine if you’re interested in a more heavyweight IDE, but I’ve found this set of extensions to be good enough to be productive (in my projects, and at work). I’ve got my fingers crossed 🤞 that things will improve, but for now, this is the ~best we’ve got.
I’ve also put together a VS Code Extension Pack with all the extensions in the article — this lets you install everything with 1 click, hopefully making it easy to get up and running.
If you’ve got feedback, I’d love to hear it! The best place for it is the official GitHub repository.
~ MORE ARTICLES ~
One thing I left out of my guide (and I’m now going to go back in and add!) is setting up a direct rdbg/debugger
integration with VS Code.
This article is short & sweet; It shows you exactly how to set up the VS Code integration. I did it in about 5 minutes and it’s awesome! (I liked it so much, that I condensed it into this week’s handy tip, below).
This is another round-up article filled with heaps VS Code extensions, some Ruby / Ruby on Rails related, and others related to more general development.
It’s worth glancing at to check for extensions that might be handy. The first extension, Ansi Colors, is one I’d never heard about, but it looks really cool!
A great thread from the /r/ruby subreddit full of recommendations for different VS Code extensions.
It’s not the most detailed collection, but it’s interesting to read what other devs think/recommend, plus there’re some links to other handy threads and articles.
~ ⚒️ HANDY TIP ~
→ Setup rdbg
and VS Code in 2 minutes
I didn’t realise how easy integrating rdbg/debugger
directly into VS Code was! Here’s the final result — we can directly connect to debugger
breakpoints from within VS Code 👇️
Integrating the Ruby debugger into VS Code is much easier than I realised!
Here are the steps:
Adjust the
web:
process in yourProcfile.dev
to be —web: RUBY_DEBUG_OPEN=true bin/rails server -p 3000
(or exportRUBY_DEBUG_OPEN=true
some other way)Install the VSCode rdbg Ruby Debugger Extension.
Open the Run and Debug menu in VS Code and click “create a launch.json file” (it’s a tiny link so be careful). Choose the
rdbg
template or copy the example from the extension’s store page.That’s it! You can now click “Attach with rdbg” from the "Run and Debug” menu to connect to a
debugger
directly from VS Code 🥳
~👀 BEHIND THE SCENES~
This is a private section 🔐 for readers with 2+ referrals!
I share behind-the-scenes updates on RailsNotes and RailsNotes UI (think traffic numbers, sales, upcoming updates etc.)
Want access? Learn about the ✨ referral program ✨ down below! 👇️
I don’t have much to share here really 🫣 I’ve been super busy with work and life stuff lately, so my personal projects have taken a bit of a back seat.
I’m hoping to spend more time over the next few weeks marketing my Ruby on Rails starter kit (sales have been sloooow), and there’s some more RailsNotes UI stuff I want to work on (new email templates and component updates).
Hopefully I’ll have some better updates in the next edition!
~ 🌯 WRAP UP ~
Thanks for reading! The quick wrap-up for this week is —
You can get a half-decent Rails + VS Code environment setup in a couple of minutes. With a couple of extensions and a few gems, you can get intellisense, formatting, linting, debugging and more (like handy ERB helpers).
PgAnalyze has an awesome free ebook on full-text search with PostgreSQL! Check it out if you’re interested; if you’re not, take a mental note, since you never know when it might come in handy!
Share the RailsNotes Newsletter!
Use your unique link below to refer new Ruby on Rails devs to this newsletter (and make me really happy!). I’ll reward you with coupon codes, access to a private section, and a free RailsNotes UI license key 👇️
[Refer 1] A small feature in the next newsletter (with a link to something you’re working on, or your socials)
[Refer 2] Permanent access to the behind-the-scenes section, above 👆️
[Refer 5] A $20 coupon for RailsNotes UI 📬️
[Refer 15] Free licence key for RailsNotes UI 🤑