<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Juan Vasquez</title>
    <description>The latest articles on DEV Community by Juan Vasquez (@juanvqz).</description>
    <link>https://dev.to/juanvqz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F84706%2F5cce6a27-4e0a-455d-923d-bb5fa01b39e2.jpeg</url>
      <title>DEV Community: Juan Vasquez</title>
      <link>https://dev.to/juanvqz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/juanvqz"/>
    <language>en</language>
    <item>
      <title>Updating a ROM Hack Without Losing 48 Hours of Pokémon</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 24 Nov 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/updating-a-rom-hack-without-losing-48-hours-of-pokemon-1lnl</link>
      <guid>https://dev.to/juanvqz/updating-a-rom-hack-without-losing-48-hours-of-pokemon-1lnl</guid>
      <description>&lt;p&gt;I have been playing Pokémon Recharged Yellow on my Miyoo Mini+ for a while. How long, I only found out halfway through this post: the save screen says 48 hours. Then I noticed the hack had a new release, 1.9.7, with a long list of bug fixes, and I wanted it without starting over.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8uy50tnj1we1t8kdsdht.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8uy50tnj1we1t8kdsdht.png" alt="Recharged Yellow title screen from Jaizu's site, taken on the earlier 1.9.5 release" width="480" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It worked, but not on the first try. The first try froze the game so hard that the menu button did nothing and I had to hold the power button to turn the console off. The rule I came away with is short, so here it is up front:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Carry the in-game save, the &lt;code&gt;.srm&lt;/code&gt;, to the new version. Leave the save states behind.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The rest of this post is why, and the steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two kinds of save
&lt;/h2&gt;

&lt;p&gt;An emulator gives you two ways to save, and they look the same from the menu.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;in-game save&lt;/strong&gt; is the one the game itself makes: in Pokémon you open the menu and pick Save. On the original cartridge that went to a small battery-backed memory chip. An emulator writes the same data to a file named after the ROM, ending in&lt;code&gt;.srm&lt;/code&gt;. It is the game’s own data, in the game’s own format.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;save state&lt;/strong&gt; is the emulator taking a photo of the whole console at that instant: memory, CPU, everything. RetroArch writes them as &lt;code&gt;.state&lt;/code&gt;, &lt;code&gt;.state1&lt;/code&gt;, &lt;code&gt;.state2&lt;/code&gt; and so on, one per slot, plus &lt;code&gt;.state.auto&lt;/code&gt;, the one it makes on its own when you quit. On OnionOS that automatic one is also what resumes when you open the game again, which is why it feels like the game never closed.&lt;/p&gt;

&lt;p&gt;That photo is the problem. It is a snapshot of the &lt;em&gt;old&lt;/em&gt; version of the game sitting in memory. Load it into a new version, where the code has moved around, and you are asking the new game to wake up inside the old one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I did first, and what happened
&lt;/h2&gt;

&lt;p&gt;Each save file is matched to a game by its filename. The new ROM had a new name,&lt;code&gt;Pokemon - Recharged Yellow (1.9.7).gba&lt;/code&gt;, so I copied every save file across with the new name: the &lt;code&gt;.srm&lt;/code&gt;, the &lt;code&gt;.state.auto&lt;/code&gt;, and all twenty numbered state files.&lt;/p&gt;

&lt;p&gt;I opened the new version and got a white screen. I waited, and after a while it loaded right where I had left off, which looked like success. Then I pressed a button and nothing happened. No movement, no menu, nothing. The menu button that normally opens RetroArch’s menu did nothing either. The picture was there, but the game behind it was frozen.&lt;/p&gt;

&lt;p&gt;The only way out was holding the power button until it turned off. On the way down, the console did what it always does at shutdown: it wrote a new &lt;code&gt;.state.auto&lt;/code&gt;, of the frozen game, and a new &lt;code&gt;.srm&lt;/code&gt; from it, both under the new version’s name. So the next launch would have resumed into the same freeze.&lt;/p&gt;

&lt;p&gt;What saved me was that none of this touched the old version’s files. Copies, not moves. The old game, under its old name, still had its saves exactly as I had left them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The way that works
&lt;/h2&gt;

&lt;p&gt;This is the order I would do it in again. I have only tried it on GBA, with mGBA on OnionOS, but nothing in it is specific to that setup.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Save in the game, in the old version.&lt;/strong&gt; Open the in-game menu and save, so the&lt;code&gt;.srm&lt;/code&gt; holds where you are. A save state does not update it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Back up the save folder.&lt;/strong&gt; All of it, onto your computer, before touching anything. Mine was 6 MB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add the new version next to the old one, with a different filename.&lt;/strong&gt; Never replace the old ROM. Putting the version in the name keeps them apart.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Copy only the &lt;code&gt;.srm&lt;/code&gt; to the new name.&lt;/strong&gt; &lt;code&gt;Pokemon - Recharged Yellow.srm&lt;/code&gt; becomes&lt;code&gt;Pokemon - Recharged Yellow (1.9.7).srm&lt;/code&gt;, in the same folder. No &lt;code&gt;.state&lt;/code&gt; files, and if an earlier attempt left any under the new name, delete them first. The &lt;code&gt;.srm&lt;/code&gt; is the game’s own data, so a new release of the same hack can usually read it, but check its changelog in case one says otherwise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open the new version.&lt;/strong&gt; With no save state to resume, it starts from the intro. Get to the title screen and choose &lt;strong&gt;Continue&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Save in the game straight away.&lt;/strong&gt; Now the &lt;code&gt;.srm&lt;/code&gt; is written by the new version, and from here on save states work normally, because they are photos of the new one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When I did it this way it loaded straight into my file, team and 48 hours intact. Only once the new version had saved on its own did I delete the old one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqzp03iz78ht7n1mhrl1o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqzp03iz78ht7n1mhrl1o.png" alt="The save prompt on 1.9.7 in Lavender Town: 8 badges, 86 in the Pokédex, 49:59 on the clock" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That is the new version a few sessions later, with the clock still counting from where the old one stopped.&lt;/p&gt;

&lt;p&gt;Where the files live, for the two systems I use:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;In-game save&lt;/th&gt;
&lt;th&gt;Save states&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OnionOS (Miyoo)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Saves/CurrentProfile/saves/&amp;lt;core&amp;gt;/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Saves/CurrentProfile/states/&amp;lt;core&amp;gt;/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;muOS (Anbernic)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;MUOS/save/file/&amp;lt;core&amp;gt;/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;MUOS/save/state/&amp;lt;core&amp;gt;/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;core&amp;gt;&lt;/code&gt; is the emulator, &lt;code&gt;mGBA&lt;/code&gt; or &lt;code&gt;gpSP&lt;/code&gt; for GBA. Check which one has the newest files. I had saves under both, and the gpSP ones were eight months older than the mGBA ones.&lt;/p&gt;

&lt;p&gt;One OnionOS detail: it reads its game list from a cache, so a ROM copied in from a computer does not show up until you run &lt;strong&gt;Refresh roms&lt;/strong&gt; from that list’s menu.&lt;/p&gt;

&lt;p&gt;One more thing before you get creative: Pokémon has one save slot per game, so New Game plus a save overwrites your file. A second playthrough needs a second copy of the ROM under another name, which gets its own &lt;code&gt;.srm&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Recharged Yellow is made by &lt;a href="https://jaizu.moe/" rel="noopener noreferrer"&gt;Jaizu&lt;/a&gt;, and the patch comes from&lt;a href="https://ko-fi.com/s/7fec26b127" rel="noopener noreferrer"&gt;Jaizu’s Ko-fi&lt;/a&gt;. If you play it, it is worth supporting. Fifty hours in, I am still not done.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is part of a series about retro handhelds. Earlier posts covered &lt;a href="https://dev.to/juanvqz/a-game-about-juan-installed-by-juan-15ni"&gt;installing Guacamelee! on the Anbernic&lt;/a&gt; and &lt;a href="https://dev.to/juanvqz/first-look-at-romm-an-app-store-for-games-i-already-own-47m5"&gt;a first look at RomM&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>pokemon</category>
      <category>romhack</category>
      <category>gba</category>
      <category>onionos</category>
    </item>
    <item>
      <title>Add a Column, Change Your App: Rails Optimistic Locking</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 17 Nov 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/add-a-column-change-your-app-rails-optimistic-locking-5bc0</link>
      <guid>https://dev.to/juanvqz/add-a-column-change-your-app-rails-optimistic-locking-5bc0</guid>
      <description>&lt;h2&gt;
  
  
  The problem nobody notices until they do
&lt;/h2&gt;

&lt;p&gt;Two people open the same record. Both edit it. Both save.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;p1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;p2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;p1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Michael"&lt;/span&gt;
&lt;span class="n"&gt;p1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;save&lt;/span&gt;

&lt;span class="n"&gt;p2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Should this win?"&lt;/span&gt;
&lt;span class="n"&gt;p2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;save&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second save wins, and the first person’s change is gone. No error, no warning, nothing in the log. Whoever clicked last is the author of the record now.&lt;/p&gt;

&lt;p&gt;This is called a lost update, and it is one of those bugs that never appears in development because you are the only person clicking.&lt;/p&gt;

&lt;p&gt;Rails has shipped a fix for this since 2004. Most Rails developers I talk to have never used it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The whole feature is a column name
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;add_column&lt;/span&gt; &lt;span class="ss"&gt;:people&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:lock_version&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:integer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;null&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is it. No &lt;code&gt;include&lt;/code&gt;, no gem, no configuration, no declaration in the model. The model file stays exactly as it was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Person&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nc"&gt;ApplicationRecord&lt;/span&gt;
  &lt;span class="c1"&gt;# nothing here. optimistic locking is now active.&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run that second save again and you get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ActiveRecord::StaleObjectError: Attempted to update a stale object: Person.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why a column changes behavior
&lt;/h2&gt;

&lt;p&gt;The switch lives in Active Record’s source, and it is two conditions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;locking_enabled?&lt;/span&gt;
  &lt;span class="n"&gt;lock_optimistically&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;columns_hash&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;locking_column&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;lock_optimistically&lt;/code&gt; defaults to &lt;code&gt;true&lt;/code&gt; for every model. &lt;code&gt;locking_column&lt;/code&gt; defaults to the string&lt;code&gt;lock_version&lt;/code&gt;. So the only thing standing between your app and optimistic locking is whether that column exists in the table.&lt;/p&gt;

&lt;p&gt;Once it does, Active Record changes the &lt;code&gt;UPDATE&lt;/code&gt; it generates. Instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;people&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Michael'&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;people&lt;/span&gt;
&lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Michael'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lock_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;lock_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read that &lt;code&gt;WHERE&lt;/code&gt; clause carefully, because it is the entire mechanism. The update says “change this row, but only if it is still on the version I read.” If someone else already saved, the row is on version 1, zero rows match, and Rails raises &lt;code&gt;StaleObjectError&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;No database lock is taken. Nothing blocks. Nobody waits. The conflict is detected after the fact rather than prevented, which is why it is called optimistic.&lt;/p&gt;

&lt;h2&gt;
  
  
  It is the exact string, not a prefix
&lt;/h2&gt;

&lt;p&gt;A column called &lt;code&gt;lock_number&lt;/code&gt; or &lt;code&gt;locking_version&lt;/code&gt; does nothing at all. Active Record looks for one name, defined as a constant:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="no"&gt;DEFAULT_LOCKING_COLUMN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"lock_version"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can rename it per model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Person&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nc"&gt;ApplicationRecord&lt;/span&gt;
  &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;locking_column&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="ss"&gt;:lock_person&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or turn the whole thing off:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nc"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nc"&gt;Base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lock_optimistically&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But the convention is the default, and the default is the reason this feature surprises people. Adding a column named &lt;code&gt;lock_version&lt;/code&gt; for some unrelated purpose will quietly change how your model saves.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you have to handle yourself
&lt;/h2&gt;

&lt;p&gt;Rails detects the conflict. Deciding what to do about it is your job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;update&lt;/span&gt;
  &lt;span class="vi"&gt;@person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;person_params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;redirect_to&lt;/span&gt; &lt;span class="vi"&gt;@person&lt;/span&gt;
&lt;span class="k"&gt;rescue&lt;/span&gt; &lt;span class="nc"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nc"&gt;StaleObjectError&lt;/span&gt;
  &lt;span class="vi"&gt;@person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reload&lt;/span&gt;
  &lt;span class="n"&gt;flash&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:alert&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Someone else changed this while you were editing. Here is the current version."&lt;/span&gt;
  &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="ss"&gt;:edit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="ss"&gt;:conflict&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you skip this, &lt;code&gt;StaleObjectError&lt;/code&gt; becomes a 500. That is worse than the lost update you were trying to prevent, so wire up the rescue in the same commit that adds the column.&lt;/p&gt;

&lt;p&gt;For the check to work across web requests, the version has to make the round trip through the form:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hidden_field&lt;/span&gt; &lt;span class="ss"&gt;:lock_version&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without it, every request reads the current version fresh from the database, and the comparison always passes. The feature appears to work and protects nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four things that will bite you
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A nil value raises, loudly.&lt;/strong&gt; If you add the column without a default and existing rows get&lt;code&gt;NULL&lt;/code&gt;, Rails tells you exactly what is wrong:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;For optimistic locking, locking_column ('lock_version') can't be nil.
Are you missing a default value or validation on 'lock_version'?

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Good error message. Avoid it anyway with &lt;code&gt;default: 0, null: false&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;update_columns&lt;/code&gt; and &lt;code&gt;update_all&lt;/code&gt; skip the check entirely.&lt;/strong&gt; They bypass callbacks, validations and the version comparison. Every place in your codebase reaching for those is a place where optimistic locking is not in effect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;destroy&lt;/code&gt; is protected too.&lt;/strong&gt; Deleting a record someone else has updated raises&lt;code&gt;StaleObjectError&lt;/code&gt;, which surprises people who assumed the check only applied to updates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;dup&lt;/code&gt; clears the column on purpose.&lt;/strong&gt; A duplicated record starts fresh rather than inheriting a version that belongs to a different row.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does not do
&lt;/h2&gt;

&lt;p&gt;Optimistic locking compares versions on a row that already exists. It has nothing to say about two processes inserting at the same time.&lt;/p&gt;

&lt;p&gt;If two background jobs both check “does a record for this event exist?” and both get no, they will both insert. No amount of &lt;code&gt;lock_version&lt;/code&gt; prevents that, because there is no row yet to hold a version. That case needs a unique index and a rescue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;add_index&lt;/span&gt; &lt;span class="ss"&gt;:events&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:external_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;unique&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;​&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nc"&gt;Event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;external_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;rescue&lt;/span&gt; &lt;span class="nc"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nc"&gt;RecordNotUnique&lt;/span&gt;
  &lt;span class="c1"&gt;# already processed, treat as success&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Row versioning handles concurrent updates. A unique constraint handles concurrent inserts. They solve different problems and you often want both.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimistic or pessimistic
&lt;/h2&gt;

&lt;p&gt;The alternative is to take a real lock:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nc"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transaction&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# SELECT ... FOR UPDATE&lt;/span&gt;
  &lt;span class="n"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Michael"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now other writers wait until you commit. Nothing gets lost, and nothing needs a retry.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;lock&lt;/code&gt; is not something you write. It is a query method Rails ships in&lt;code&gt;ActiveRecord::QueryMethods&lt;/code&gt;, so it chains like &lt;code&gt;where&lt;/code&gt; and works on any model whether or not a&lt;code&gt;lock_version&lt;/code&gt; column exists. The two features are independent, and using both on one model is allowed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nc"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# SELECT ... FOR UPDATE&lt;/span&gt;
&lt;span class="nc"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"FOR UPDATE SKIP LOCKED"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# your own locking clause&lt;/span&gt;
&lt;span class="n"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lock!&lt;/span&gt; &lt;span class="c1"&gt;# reload this row, locked&lt;/span&gt;
&lt;span class="n"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;with_lock&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c1"&gt;# transaction and lock in one call&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The trap: a &lt;code&gt;FOR UPDATE&lt;/code&gt; lock lives only as long as the transaction. Take one outside a transaction and it is released immediately, so the code looks protected and is not. &lt;code&gt;with_lock&lt;/code&gt; exists partly to make that mistake harder.&lt;/p&gt;

&lt;p&gt;Optimistic assumes conflicts are rare and detects them. Pessimistic assumes they are likely and prevents them.&lt;/p&gt;

&lt;p&gt;Pick optimistic when a human is editing a form and can be told “this changed, take another look.” Pick pessimistic for read-modify-write on rows that are genuinely contended, like a balance or an inventory count, where a retry loop is worse than a short wait. Pessimistic locks cost you held locks, deadlock risk if you take them in inconsistent orders, and the need for a &lt;code&gt;lock_timeout&lt;/code&gt; so one stuck transaction cannot take the application down with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  It has been there the whole time
&lt;/h2&gt;

&lt;p&gt;I went looking for when this landed. The commit is from the last day of 2004:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Added automated optimistic locking if the field lock_version is present
#384 [Michael Koziarski]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That predates Rails 1.0. The design has not changed in twenty years: add the column, the feature turns on.&lt;/p&gt;

&lt;p&gt;Which makes it a strange thing to be obscure. My guess is that features you enable by writing code get found by people reading code, and a feature you enable by adding a column does not appear anywhere for anyone to notice.&lt;/p&gt;

&lt;p&gt;If your app has forms where two people can plausibly edit the same record, it is one migration, one hidden field, and one rescue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html" rel="noopener noreferrer"&gt;ActiveRecord::Locking::Optimistic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic/ClassMethods.html" rel="noopener noreferrer"&gt;ActiveRecord::Locking::Optimistic::ClassMethods&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://api.rubyonrails.org/classes/ActiveRecord/Locking/Pessimistic.html" rel="noopener noreferrer"&gt;ActiveRecord::Locking::Pessimistic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://guides.rubyonrails.org/active_record_querying.html#locking-records-for-update" rel="noopener noreferrer"&gt;Rails guides: locking records for update&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rails</category>
      <category>activerecord</category>
      <category>concurrency</category>
      <category>postgres</category>
    </item>
    <item>
      <title>Custom Domain Email for $0: What Zoho's Free Plan Actually Gives You</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 10 Nov 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/custom-domain-email-for-0-what-zohos-free-plan-actually-gives-you-413i</link>
      <guid>https://dev.to/juanvqz/custom-domain-email-for-0-what-zohos-free-plan-actually-gives-you-413i</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;My résumé says &lt;code&gt;hello@juanvasquez.dev&lt;/code&gt;. My replies came from a Gmail address that says nothing of the sort.&lt;/p&gt;

&lt;p&gt;That is because &lt;code&gt;hello@&lt;/code&gt; was never a real mailbox. It was a Cloudflare Email Routing rule forwarding everything at my domain into Gmail. Free, five minutes to set up, works perfectly: in one direction. Cloudflare Email Routing &lt;strong&gt;receives and forwards. It cannot send.&lt;/strong&gt; There is no SMTP server behind it, so there is nothing for Gmail to hand an outgoing message to.&lt;/p&gt;

&lt;p&gt;So every time a recruiter replied, I answered from a personal address that did not match the one on the document they were reading. Small thing. Also the kind of small thing you would rather not explain.&lt;/p&gt;

&lt;p&gt;The plan was simple: add Zoho Mail’s free tier, point Gmail’s “Send mail as” at Zoho’s SMTP, done.&lt;/p&gt;

&lt;p&gt;That plan does not work, and it took me a while to find out why.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Zoho’s free plan quietly stopped including
&lt;/h2&gt;

&lt;p&gt;Zoho Mail still has a Forever Free plan in 2026. Custom domain, five users, 5 GB each. It is real and it is genuinely free.&lt;/p&gt;

&lt;p&gt;It is also &lt;strong&gt;webmail-only by design&lt;/strong&gt;. From Zoho’s own pricing page:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;No se incluye IMAP/POP/Active Sync&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And inside the account, each feature says it individually:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Free plan&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Email forwarding&lt;/td&gt;
&lt;td&gt;Paid plans only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;POP&lt;/td&gt;
&lt;td&gt;Paid plans only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IMAP&lt;/td&gt;
&lt;td&gt;“Not available for your account”&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Send/receive in Zoho webmail and mobile app&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every route into Gmail is closed. No forwarding, so mail cannot be pushed out of Zoho. No POP or IMAP, so Gmail cannot pull it in. No SMTP for external clients, so Gmail cannot send through it either.&lt;/p&gt;

&lt;p&gt;This is not a misconfiguration you can settle with an afternoon of settings. It is the shape of the tier.&lt;/p&gt;




&lt;h2&gt;
  
  
  The setup that actually works, still for $0
&lt;/h2&gt;

&lt;p&gt;Here is the thing I got wrong at the start: &lt;strong&gt;I assumed I had to move my email to Zoho.&lt;/strong&gt; I did not. Receiving was never broken. Cloudflare was already doing it well and for free.&lt;/p&gt;

&lt;p&gt;Only &lt;em&gt;sending&lt;/em&gt; was missing. Once I saw that, the answer got much smaller:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Receiving&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cloudflare Email Routing catch-all → Gmail ( &lt;strong&gt;unchanged&lt;/strong&gt; )&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sending&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Zoho webmail and mobile app, as &lt;code&gt;hello@juanvasquez.dev&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MX records&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;never touched&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Zoho’s free plan can send from its own webmail. It just cannot let another client send for it. If you are willing to compose in Zoho instead of Gmail, the free tier does the one job you needed.&lt;/p&gt;

&lt;p&gt;Not moving MX is the good part. The MX switch is the only step in this kind of migration that can break incoming mail, and skipping it means there is never a window where anything bounces. My catch-all keeps working, so every address I have ever invented for a signup still arrives.&lt;/p&gt;




&lt;h2&gt;
  
  
  The DNS work
&lt;/h2&gt;

&lt;p&gt;Three records. Two are mandatory the moment you send anything you care about.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. SPF: authorize both senders
&lt;/h3&gt;

&lt;p&gt;My existing record only authorized Cloudflare. Mail leaving Zoho’s servers would fail SPF outright.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;v=spf1 include:zoho.com include:_spf.mx.cloudflare.net ~all

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Edit the existing record. Do not add a second one.&lt;/strong&gt; A domain must publish exactly one SPF record; two is a permanent error condition, and worse than a wrong one. Cloudflare’s include stays because it is what keeps &lt;em&gt;forwarded&lt;/em&gt; mail passing checks at Gmail.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. DKIM: sign the mail
&lt;/h3&gt;

&lt;p&gt;In Zoho’s Admin Console: Domains → your domain → Email Configuration → DKIM → add a selector (&lt;code&gt;zmail&lt;/code&gt; is the default), then publish the generated key as a TXT record at&lt;code&gt;zmail._domainkey&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Skipping DKIM is the most common reason mail from a fresh custom domain lands in spam.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. DMARC: optional, 30 seconds
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Name: _dmarc
Content: v=DMARC1; p=none; rua=mailto:hello@juanvasquez.dev

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;p=none&lt;/code&gt; is monitor-only. It changes nothing about delivery and just tells receivers you are paying attention.&lt;/p&gt;




&lt;h2&gt;
  
  
  The gotcha that cost me the most time
&lt;/h2&gt;

&lt;p&gt;I had a &lt;strong&gt;wildcard CNAME&lt;/strong&gt; on the domain, sending every undefined subdomain to a Railway app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*.juanvasquez.dev → ux1wdw8n.up.railway.app

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Harmless for the web app. Actively hostile while debugging DNS, because &lt;em&gt;every name you check answers&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ dig +short TXT zmail._domainkey.juanvasquez.dev
ux1wdw8n.up.railway.app.

$ dig +short TXT default._domainkey.juanvasquez.dev
ux1wdw8n.up.railway.app.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a normal domain those return nothing, and any checker tells you plainly that DKIM is missing. With a wildcard, a &lt;strong&gt;misnamed DKIM record does not fail loudly&lt;/strong&gt;. It answers with something that is not a key, and tools report it as an odd value rather than an absence.&lt;/p&gt;

&lt;p&gt;Two things follow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verify your domain with the TXT method, not CNAME.&lt;/strong&gt; A CNAME-based ownership check is ambiguous when the name already resolves to something else.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;After publishing DKIM, confirm you get a key back&lt;/strong&gt; , not the wildcard:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;ux1wdw8n.up.railway.app.&lt;/code&gt; means &lt;strong&gt;missing&lt;/strong&gt;. Only &lt;code&gt;v=DKIM1&lt;/code&gt; means present.&lt;/p&gt;




&lt;h2&gt;
  
  
  Verify it, do not assume it
&lt;/h2&gt;

&lt;p&gt;The dashboard is not the source of truth. Public DNS is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ dig +short TXT juanvasquez.dev
"v=spf1 include:zoho.com include:_spf.mx.cloudflare.net ~all"
"zoho-verification=zb92679339.zmverify.zoho.com"

$ dig +short TXT _dmarc.juanvasquez.dev
"v=DMARC1; p=none; rua=mailto:hello@juanvasquez.dev"

$ dig +short MX juanvasquez.dev
35 route2.mx.cloudflare.net.
49 route1.mx.cloudflare.net.
66 route3.mx.cloudflare.net.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then send a real message to &lt;a href="https://www.mail-tester.com" rel="noopener noreferrer"&gt;mail-tester.com&lt;/a&gt; and read the score. Mine came back &lt;strong&gt;10/10&lt;/strong&gt; , SPF and DKIM both passing, not blocklisted. Write a couple of sentences of normal prose rather than the word “test”: one-word emails score badly for reasons that have nothing to do with your DNS.&lt;/p&gt;

&lt;p&gt;One warning that stays forever in this setup: Zoho’s admin console will keep showing &lt;strong&gt;“Yet to point MX Records”&lt;/strong&gt; in amber. That is correct. It means Zoho does not receive your mail, which is exactly the arrangement. Nothing is wrong.&lt;/p&gt;




&lt;h2&gt;
  
  
  The compromise
&lt;/h2&gt;

&lt;p&gt;I am not going to pretend this is free of friction, because it is not:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your threads split.&lt;/strong&gt; You send from Zoho. The reply arrives in Gmail, because Cloudflare forwards it there. Replying again means going back to Zoho and composing fresh, without the quoted history.&lt;/p&gt;

&lt;p&gt;For a first contact, fine. For a five-message negotiation, irritating.&lt;/p&gt;

&lt;p&gt;The paid escape hatch is small: Zoho Mail Lite adds IMAP/POP/SMTP for around a dollar a month, which is enough to wire Gmail’s “Send mail as” and put everything back in one inbox. Google Workspace at $7 makes the whole question disappear.&lt;/p&gt;

&lt;p&gt;I am staying on $0 until the split threads actually annoy me. It is easier to justify a subscription after you have felt the problem than before.&lt;/p&gt;




&lt;h2&gt;
  
  
  Would I recommend it?
&lt;/h2&gt;

&lt;p&gt;If you want &lt;strong&gt;one professional address on a domain you own, sending and receiving, for nothing&lt;/strong&gt; : yes, and it takes under an hour.&lt;/p&gt;

&lt;p&gt;Just go in knowing what the free tier is: Zoho’s free plan is a &lt;strong&gt;webmail-only mailbox&lt;/strong&gt; , not a mail service you can plug other clients into. Every guide promising Gmail integration on the free tier was written before those features moved behind the paywall.&lt;/p&gt;

&lt;p&gt;And the general lesson, which cost me the most time here: &lt;strong&gt;check whether the thing you assume is broken actually is.&lt;/strong&gt; I spent an evening planning a migration of my inbound mail. Inbound was fine the whole time. Only sending was missing, and that turned out to be the small half of the problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is your setup?
&lt;/h2&gt;

&lt;p&gt;This is the best free arrangement I found, but I doubt it is the only one. If you are sending from a domain you own without paying for it: a different provider, an SMTP relay, a self-hosted setup, something I have not thought of: I would genuinely like to hear it.&lt;/p&gt;

&lt;p&gt;Tell me what you use and what it cost you in friction, on&lt;a href="https://github.com/JuanVqz" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; or &lt;a href="https://x.com/juanvqz_" rel="noopener noreferrer"&gt;X&lt;/a&gt;. If something better turns up I will update this post and credit you.&lt;/p&gt;

</description>
      <category>email</category>
      <category>dns</category>
      <category>cloudflare</category>
      <category>zoho</category>
    </item>
    <item>
      <title>Installing ReActionView: What the Herb Linter Found in My Views</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 03 Nov 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/installing-reactionview-what-the-herb-linter-found-in-my-views-22d</link>
      <guid>https://dev.to/juanvqz/installing-reactionview-what-the-herb-linter-found-in-my-views-22d</guid>
      <description>&lt;h2&gt;
  
  
  The Bet I Made Earlier
&lt;/h2&gt;

&lt;p&gt;A few months ago I moved a whole app &lt;a href="https://dev.to/juanvqz/from-haml-to-erb-going-back-to-rails-native-templates-5and-temp-slug-8247709"&gt;from HAML to ERB&lt;/a&gt;. The argument was partly about ecosystem alignment, but the forward-looking part was a bet: once &lt;a href="https://reactionview.dev" rel="noopener noreferrer"&gt;ReActionView&lt;/a&gt; and &lt;a href="https://herb-tools.dev" rel="noopener noreferrer"&gt;Herb&lt;/a&gt; stabilized, ERB would be the on-ramp to HTML-aware templates, real validation, and actual tooling for the view layer.&lt;/p&gt;

&lt;p&gt;This week I collected on that bet, in a different app. My order management system for cafes and restaurants had a problem I had written down in its own docs and then ignored:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;test/system/&lt;/code&gt; is empty, so nothing exercises rendered views end to end. Controller tests use fixtures that often lack the interesting rows (for example, no fixture order has an &lt;code&gt;extra&lt;/code&gt; line item component, which is why a crash in the bill view went unnoticed).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A view crashed in production-ish usage and no test caught it, because no test rendered that branch. That is the kind of gap a linter and an HTML-aware engine are supposed to close.&lt;/p&gt;




&lt;h2&gt;
  
  
  Installing It
&lt;/h2&gt;

&lt;p&gt;The install is two commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;bundle&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt; &lt;span class="n"&gt;reactionview&lt;/span&gt;
&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;rails&lt;/span&gt; &lt;span class="n"&gt;generate&lt;/span&gt; &lt;span class="n"&gt;reactionview&lt;/span&gt;&lt;span class="ss"&gt;:install&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That pulls in &lt;code&gt;herb&lt;/code&gt; and writes &lt;code&gt;config/initializers/reactionview.rb&lt;/code&gt;. I put the gem in the &lt;code&gt;:development, :test&lt;/code&gt; group, which turned out to matter more than I expected (more on that below).&lt;/p&gt;

&lt;p&gt;Then the linter’s own config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bundle &lt;span class="nb"&gt;exec &lt;/span&gt;herb lint &lt;span class="nt"&gt;--init&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That writes &lt;code&gt;.herb.yml&lt;/code&gt; and, as a nice touch, drops a &lt;code&gt;.vscode/extensions.json&lt;/code&gt; recommending the Herb language server.&lt;/p&gt;




&lt;h2&gt;
  
  
  Two Config Decisions Worth Explaining
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Turn on &lt;code&gt;intercept_erb&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;By default ReActionView only takes over &lt;code&gt;.html.herb&lt;/code&gt; files. The interesting switch is this one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;intercept_erb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With it on, every &lt;code&gt;.html.erb&lt;/code&gt; template renders through &lt;code&gt;Herb::Engine&lt;/code&gt;. Invalid HTML raises in the test environment and shows a debug overlay in development. That is exactly the hole I had: my views were never validated by anything, because nothing was looking at the HTML they produced. Now my existing 187 tests double as HTML validation, for free, on every template they happen to render.&lt;/p&gt;

&lt;p&gt;All 187 still passed with interception on, which was the result I wanted but not the one I expected on a &lt;code&gt;0.3.0&lt;/code&gt; gem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Guard the initializer
&lt;/h3&gt;

&lt;p&gt;Here is the trap. The gem lives in &lt;code&gt;:development, :test&lt;/code&gt;, so in production the &lt;code&gt;ReActionView&lt;/code&gt; constant does not exist, and &lt;code&gt;config/initializers/reactionview.rb&lt;/code&gt; runs in every environment. An unguarded initializer takes the whole production boot down with a &lt;code&gt;NameError&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# The reactionview gem is only bundled in :development and :test, so this&lt;/span&gt;
&lt;span class="c1"&gt;# initializer must do nothing when the constant is missing (production).&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;unless&lt;/span&gt; &lt;span class="k"&gt;defined?&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;ReActionView&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="no"&gt;ReActionView&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
  &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;intercept_erb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;
  &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;debug_mode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;development?&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verified the boring way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;SECRET_KEY_BASE_DUMMY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;RAILS_ENV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;production bin/rails runner &lt;span class="s1"&gt;'puts "ok"'&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Pin the version
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;.herb.yml&lt;/code&gt; gets a &lt;code&gt;version:&lt;/code&gt; key, and it is not decoration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.10.3&lt;/span&gt;
&lt;span class="na"&gt;framework&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actionview&lt;/span&gt;
&lt;span class="na"&gt;template_engine&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;erubi&lt;/span&gt;

&lt;span class="na"&gt;files&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;exclude&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;public/**/*"&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tmp/**/*"&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;vendor/**/*"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Herb ships rules fast. 85 rules are enabled today and 15 more exist but are off. Pinning means a &lt;code&gt;bundle update&lt;/code&gt; cannot silently turn a green build red with rules I have never read.&lt;/p&gt;




&lt;h2&gt;
  
  
  The First Run: 16 Offenses
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bundle &lt;span class="nb"&gt;exec &lt;/span&gt;herb lint

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;60 files checked, 9 with offenses, 16 offenses, 767 ms.&lt;/p&gt;

&lt;p&gt;Ten of the sixteen were the same rule, &lt;code&gt;html-no-space-in-tag&lt;/code&gt;, in &lt;code&gt;public/400.html&lt;/code&gt;, &lt;code&gt;404.html&lt;/code&gt;, &lt;code&gt;406-unsupported-browser.html&lt;/code&gt;, &lt;code&gt;422.html&lt;/code&gt;, and &lt;code&gt;500.html&lt;/code&gt;. Those are the static error pages Rails generates, with minified inline CSS. I am not hand-editing generated files to satisfy a whitespace rule, so &lt;code&gt;public/**/*&lt;/code&gt; went into the exclude list. That is a decision, not a workaround: those files are not part of my view layer.&lt;/p&gt;

&lt;p&gt;That left six real offenses in &lt;code&gt;app/views&lt;/code&gt;, and every one of them was a thing I would have written again tomorrow.&lt;/p&gt;




&lt;h2&gt;
  
  
  What It Actually Caught
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ERB emitting an attribute name
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"radio"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"ingredients[&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;pc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;component_id&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="s"&gt;]"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
       &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="s1"&gt;'checked'&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hidden peer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rule: &lt;code&gt;erb-no-output-in-attribute-name&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is the classic “print the whole attribute conditionally” move. It works, and it is invisible to any parser that treats ERB as opaque text, which is why nothing ever complained before. Herb parses the HTML around the ERB, so it can see that the ERB output lands where an attribute &lt;em&gt;name&lt;/em&gt; goes.&lt;/p&gt;

&lt;p&gt;The fix is the Rails helper that has existed the whole time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;radio_button_tag&lt;/span&gt; &lt;span class="s2"&gt;"ingredients[&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;pc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;component_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;id: &lt;/span&gt;&lt;span class="kp"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;class: &lt;/span&gt;&lt;span class="s2"&gt;"hidden peer"&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ERB in attribute position
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"line_item_&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;id&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt; &lt;span class="na"&gt;data-status=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
  &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="s1"&gt;'data-controller="highlight"'&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;local_assigns&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:highlight&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rule: &lt;code&gt;erb-no-output-in-attribute-position&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Same species, different symptom. The fix moves the conditional inside the attribute value, where the parser can reason about it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;data-controller="&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="s2"&gt;"highlight"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;local_assigns&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:highlight&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An empty &lt;code&gt;data-controller=""&lt;/code&gt; when the flag is off is harmless, and Stimulus ignores it.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;&amp;lt;a href="#"&amp;gt;&lt;/code&gt; pretending to be a button
&lt;/h3&gt;

&lt;p&gt;Two places, both the print action:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;link_to&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"bill.print"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="s2"&gt;"#"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="ss"&gt;class: &lt;/span&gt;&lt;span class="s2"&gt;"text-center"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="ss"&gt;data: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="ss"&gt;component: &lt;/span&gt;&lt;span class="s2"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;variant: &lt;/span&gt;&lt;span class="s2"&gt;"outline"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;size: &lt;/span&gt;&lt;span class="s2"&gt;"lg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;action: &lt;/span&gt;&lt;span class="s2"&gt;"print#print"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rule: &lt;code&gt;html-anchor-require-href&lt;/code&gt;. The linter’s phrasing is blunt and correct: &lt;code&gt;href="#"&lt;/code&gt; does not navigate anywhere, it scrolls the page to the top and appends &lt;code&gt;#&lt;/code&gt; to the URL.&lt;/p&gt;

&lt;p&gt;This one is a genuine bug in disguise. That element is not a link. It fires a Stimulus action and nothing else. It only ever became an &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; because &lt;code&gt;link_to&lt;/code&gt; was convenient.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;tag&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;button&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"bill.print"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="ss"&gt;type: &lt;/span&gt;&lt;span class="s2"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="ss"&gt;class: &lt;/span&gt;&lt;span class="s2"&gt;"text-center"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="ss"&gt;data: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="ss"&gt;component: &lt;/span&gt;&lt;span class="s2"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;variant: &lt;/span&gt;&lt;span class="s2"&gt;"outline"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;size: &lt;/span&gt;&lt;span class="s2"&gt;"lg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;action: &lt;/span&gt;&lt;span class="s2"&gt;"print#print"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two details mattered here. &lt;code&gt;type: "button"&lt;/code&gt; is explicit because one of those buttons sits inside the payment form, and a bare &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; defaults to &lt;code&gt;type="submit"&lt;/code&gt;. And the styling survived untouched because my component CSS keys off the data attribute, not the element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;data-component&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"button"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Element-agnostic component styles are what made this a one-line change instead of a redesign.&lt;/p&gt;

&lt;h3&gt;
  
  
  Missing &lt;code&gt;autocomplete&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Two number inputs, one for extras quantity and one for cash received. Rule: &lt;code&gt;html-input-require-autocomplete&lt;/code&gt;, a warning rather than an error. Browsers happily autofill a “received amount” field with something from a previous form, which is a real annoyance at a register.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"number"&lt;/span&gt; &lt;span class="na"&gt;step=&lt;/span&gt;&lt;span class="s"&gt;"0.01"&lt;/span&gt; &lt;span class="na"&gt;min=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"received"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"received"&lt;/span&gt; &lt;span class="na"&gt;autocomplete=&lt;/span&gt;&lt;span class="s"&gt;"off"&lt;/span&gt; &lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nine of the 85 enabled rules are accessibility rules, and this is the flavor of thing they catch: not broken, just worse than it needs to be for the person actually using the app.&lt;/p&gt;




&lt;h2&gt;
  
  
  Wiring It Into CI
&lt;/h2&gt;

&lt;p&gt;A linter nobody runs is a linter that drifts. &lt;code&gt;herb lint&lt;/code&gt; shells out to &lt;code&gt;npx @herb-tools/linter&lt;/code&gt;, so the CI job needs Node alongside Ruby:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;lint_views&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
  &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v7&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ruby/setup-ruby@v1&lt;/span&gt;
      &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;ruby-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.ruby-version&lt;/span&gt;
        &lt;span class="na"&gt;bundler-cache&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v6&lt;/span&gt;
      &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;lts/*&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Lint HTML+ERB templates&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bundle exec herb lint --github&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--github&lt;/code&gt; emits GitHub annotations, so offenses show up inline on the pull request diff instead of buried in a log.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Actually Bought Me
&lt;/h2&gt;

&lt;p&gt;Final state: 55 files, 0 offenses, under a second. 187 tests passing with every template rendering through an HTML-aware engine. Rubocop still clean.&lt;/p&gt;

&lt;p&gt;The honest accounting:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Four of the six offenses were invisible to every tool I already ran.&lt;/strong&gt; Rubocop reads Ruby. It does not know that a string literal my ERB prints is going to land in an attribute name slot. Brakeman looks for security patterns. My controller tests assert on status codes and text, not on whether the markup is well-formed. There was simply nothing in the pipeline whose job was the HTML.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One of them was a real bug.&lt;/strong&gt; The print buttons were anchors that scrolled the page to the top on every click. Nobody filed that. It is the sort of thing you subconsciously work around for months.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The &lt;code&gt;intercept_erb&lt;/code&gt; switch is the part I would keep even without the linter.&lt;/strong&gt; Rendering through &lt;code&gt;Herb::Engine&lt;/code&gt; means the next malformed tag fails a test instead of shipping. That is the gap I had written into my own docs and never closed, and it closed with one line of config.&lt;/p&gt;

&lt;p&gt;The cost was one afternoon, one gem in the dev/test group, and one guard clause. That is a cheap trade for a layer of the app that had zero automated scrutiny.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Note on the Bleeding Edge
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;reactionview&lt;/code&gt; is at &lt;code&gt;0.3.0&lt;/code&gt;. &lt;code&gt;herb&lt;/code&gt; is at &lt;code&gt;0.10.3&lt;/code&gt;. The installer literally ends with “Thanks for riding the bleeding edge.” I am not going to pretend that is nothing.&lt;/p&gt;

&lt;p&gt;What makes it a reasonable bet anyway:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The gem is not in production. It is &lt;code&gt;:development, :test&lt;/code&gt; only, with a guarded initializer. The worst case is a broken local server, not a broken store.&lt;/li&gt;
&lt;li&gt;The version is pinned in &lt;code&gt;.herb.yml&lt;/code&gt;, so upgrades are something I choose.&lt;/li&gt;
&lt;li&gt;The template fixes are all plain Rails. &lt;code&gt;radio_button_tag&lt;/code&gt;, &lt;code&gt;tag.button&lt;/code&gt;, &lt;code&gt;autocomplete="off"&lt;/code&gt;. If I removed ReActionView tomorrow, every fix stays valuable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last point is the one I would underline. A good linter does not leave you with code shaped around the linter. It leaves you with code you should have written the first time.&lt;/p&gt;

&lt;p&gt;Back in May I wrote that ERB was the on-ramp to everything coming next in the Rails view layer. This is the first stretch of actual road.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>erb</category>
      <category>herb</category>
      <category>reactionview</category>
    </item>
    <item>
      <title>Linux Mint on a MacBook Pro 2015: Getting Wi-Fi Working Offline</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 27 Oct 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/linux-mint-on-a-macbook-pro-2015-getting-wi-fi-working-offline-2i38</link>
      <guid>https://dev.to/juanvqz/linux-mint-on-a-macbook-pro-2015-getting-wi-fi-working-offline-2i38</guid>
      <description>&lt;p&gt;I wanted to run &lt;a href="https://github.com/nicories/OpenClaw" rel="noopener noreferrer"&gt;OpenClaw&lt;/a&gt; on native Linux hardware. The cheapest path? Repurpose my old MacBook Pro 2015 sitting in a drawer. I installed Linux Mint, rebooted, and immediately hit a wall, no Wi-Fi, no Ethernet port, no internet at all.&lt;/p&gt;

&lt;p&gt;This is the first post in a short series. Here I cover getting Linux Mint fully online on a MacBook Pro 2015. The next post will cover installing and running OpenClaw on it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why a MacBook Pro 2015?
&lt;/h2&gt;

&lt;p&gt;It’s the machine I had available. Mine is an i7 with 16 GB of RAM , still decent specs for casual use, but Apple stopped supporting it with macOS updates years ago. Linux Mint gives it a second life , lightweight, familiar, and well-supported. The catch is that Apple uses Broadcom Wi-Fi chips, and the proprietary drivers aren’t bundled with Linux Mint.&lt;/p&gt;

&lt;p&gt;No Ethernet port on the MacBook means you can’t just plug in a cable and download the driver. You need a second machine or a workaround.&lt;/p&gt;




&lt;h2&gt;
  
  
  Identifying the Wi-Fi Chipset
&lt;/h2&gt;

&lt;p&gt;After installing Linux Mint and booting in, I opened a terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lspci &lt;span class="nt"&gt;-nn&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; network

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Broadcom BCM4360 802.11ac Dual Band Wireless Network Adapter

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The BCM4360 needs the &lt;code&gt;bcmwl-kernel-source&lt;/code&gt; package: a proprietary Broadcom driver that Linux Mint doesn’t ship by default. Fair enough. But I had no internet to install it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Downloading the Driver on Another Machine
&lt;/h2&gt;

&lt;p&gt;I grabbed my other Linux Mint laptop and downloaded the driver package without installing it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--download-only&lt;/span&gt; bcmwl-kernel-source

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This saves the &lt;code&gt;.deb&lt;/code&gt; files , including dependencies like &lt;code&gt;dkms&lt;/code&gt; , to &lt;code&gt;/var/cache/apt/archives/&lt;/code&gt;. That’s the key detail. You don’t need to hunt for individual packages; &lt;code&gt;apt&lt;/code&gt; resolves everything for you.&lt;/p&gt;

&lt;p&gt;I plugged in a USB drive and copied the relevant &lt;code&gt;.deb&lt;/code&gt; files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /var/cache/apt/archives/
&lt;span class="nb"&gt;cp &lt;/span&gt;bcmwl-kernel-source&lt;span class="k"&gt;*&lt;/span&gt;.deb dkms&lt;span class="k"&gt;*&lt;/span&gt;.deb /media/juan/USB/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One thing I learned: ignore any &lt;code&gt;.tar.gz&lt;/code&gt; files in that directory. They’re source archives, not installable packages.&lt;/p&gt;




&lt;h2&gt;
  
  
  Installing the Driver Offline
&lt;/h2&gt;

&lt;p&gt;On the MacBook, I mounted the USB, opened a terminal in that folder, and ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;dpkg &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.deb
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then loaded the driver:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;modprobe wl

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reboot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;reboot

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That was it. After reboot, Wi-Fi networks appeared in the system tray.&lt;/p&gt;




&lt;h2&gt;
  
  
  When It Doesn’t Work
&lt;/h2&gt;

&lt;p&gt;If Wi-Fi doesn’t show up after reboot, check two things:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lsmod | &lt;span class="nb"&gt;grep &lt;/span&gt;wl

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This confirms the &lt;code&gt;wl&lt;/code&gt; module is loaded. If it’s not listed, run &lt;code&gt;sudo modprobe wl&lt;/code&gt; again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rfkill list

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If any wireless device shows as “Soft blocked” or “Hard blocked”:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;rfkill unblock all

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On my MacBook, everything came up clean after the first reboot. No rfkill issues.&lt;/p&gt;




&lt;h2&gt;
  
  
  Things to Watch Out For
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Kernel updates break the driver.&lt;/strong&gt; After a kernel update, the &lt;code&gt;wl&lt;/code&gt; module needs to be rebuilt. Usually &lt;code&gt;dkms&lt;/code&gt; handles this automatically, but if Wi-Fi disappears after an update:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--reinstall&lt;/span&gt; bcmwl-kernel-source
&lt;span class="nb"&gt;sudo &lt;/span&gt;modprobe wl

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Keep the &lt;code&gt;.deb&lt;/code&gt; files.&lt;/strong&gt; I copied them to &lt;code&gt;~/drivers/&lt;/code&gt; on the MacBook. If I ever need to reinstall Linux Mint, I don’t want to repeat the two-machine dance.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;The hardest part of this whole process was realizing I needed a second machine. Once I had that, the actual fix took about ten minutes. The Broadcom driver situation on Linux is well-documented, but most guides assume you have internet access. The offline install path with &lt;code&gt;apt --download-only&lt;/code&gt; is the trick that makes it practical.&lt;/p&gt;

&lt;p&gt;The MacBook Pro 2015 runs Linux Mint smoothly. It boots fast, the display looks great, and with Wi-Fi working, it’s a fully functional Linux box.&lt;/p&gt;

&lt;p&gt;Next up: installing OpenClaw and seeing how this old MacBook handles it.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>linuxmint</category>
      <category>macbook</category>
      <category>broadcom</category>
    </item>
    <item>
      <title>Contributing to oil.nvim: Adding a Copy Path Keymap</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 20 Oct 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/contributing-to-oilnvim-adding-a-copy-path-keymap-2pm0</link>
      <guid>https://dev.to/juanvqz/contributing-to-oilnvim-adding-a-copy-path-keymap-2pm0</guid>
      <description>&lt;p&gt;I use &lt;a href="https://github.com/stevearc/oil.nvim" rel="noopener noreferrer"&gt;oil.nvim&lt;/a&gt; daily as my file explorer in Neovim. It’s vim-vinegar style: you edit the filesystem like a normal buffer. Last week, I wanted to copy a file path but couldn’t find a keymap for it. Turns out the action existed, just not the keybinding.&lt;/p&gt;

&lt;p&gt;This is the story of adding &lt;code&gt;gy&lt;/code&gt; as a default keymap for copying file paths.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Missing Keymap
&lt;/h2&gt;

&lt;p&gt;I was navigating through a project and needed to copy a file path for a command. I pressed &lt;code&gt;g?&lt;/code&gt; to see the help:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;g? Show default keymaps
gs Change the sort order
gx Open the entry under the cursor in an external program
g. Toggle hidden files and directories
g\ Toggle trash

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nothing for copying paths. I checked the docs and found &lt;code&gt;actions.yank_entry&lt;/code&gt;: it yanks the filepath to a register. But no default keymap.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Contribution
&lt;/h2&gt;

&lt;p&gt;The fix was straightforward: add &lt;code&gt;gy&lt;/code&gt; to the default keymaps following the existing &lt;code&gt;g+key&lt;/code&gt; pattern.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- lua/oil/config.lua&lt;/span&gt;
&lt;span class="n"&gt;keymaps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;-- ... existing keymaps ...&lt;/span&gt;
  &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"g."&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"actions.toggle_hidden"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"n"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"g\\"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"actions.toggle_trash"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"n"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"gy"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"actions.yank_entry"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"n"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="c1"&gt;-- new!&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s it. The action already existed, it just needed a keybinding.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;yank_entry&lt;/code&gt; action also supports path modification via &lt;code&gt;fnamemodify()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Yank just the filename&lt;/span&gt;
&lt;span class="n"&gt;actions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;yank_entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="n"&gt;modify&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;":t"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="c1"&gt;-- Yank parent directory name&lt;/span&gt;
&lt;span class="n"&gt;actions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;yank_entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="n"&gt;modify&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;":h:t"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The PR
&lt;/h2&gt;

&lt;p&gt;I submitted &lt;a href="https://github.com/stevearc/oil.nvim/pull/746" rel="noopener noreferrer"&gt;PR #746&lt;/a&gt; with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The config change adding &lt;code&gt;gy&lt;/code&gt; keymap&lt;/li&gt;
&lt;li&gt;Documentation update in &lt;code&gt;doc/oil.txt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Four tests covering the action’s behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tests ensure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File paths are yanked correctly&lt;/li&gt;
&lt;li&gt;Directory paths include the trailing slash&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;modify&lt;/code&gt; parameter works as expected&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Writing the tests was the part that took the longest. I had to understand how oil’s test adapter works versus the real filesystem adapter. Ended up using &lt;code&gt;TmpDir&lt;/code&gt; for real filesystem tests since &lt;code&gt;get_current_dir()&lt;/code&gt; only works with the files adapter.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Small contributions matter.&lt;/strong&gt; This wasn’t a complex feature. The action already existed. I just added a keybinding and tests. But now anyone using oil.nvim can press &lt;code&gt;gy&lt;/code&gt; to copy paths without digging through docs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read existing code patterns.&lt;/strong&gt; I looked at how other &lt;code&gt;g+key&lt;/code&gt; keymaps were defined and followed the same pattern. Consistency with existing conventions makes contributions more likely to be accepted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tests are worth the effort.&lt;/strong&gt; I almost skipped writing tests. But going through the process helped me understand oil’s testing setup better. And when I refactored the test approach, the tests caught issues I would have missed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Using It
&lt;/h2&gt;

&lt;p&gt;Once the PR merges (or if you use my fork in the meantime):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;" In oil.nvim, press gy over any file or folder
" Path is copied to the default register
" Paste with p or "+p for system clipboard

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Open source doesn’t always require deep architectural changes. Sometimes it’s just adding the keybinding that everyone assumes should be there.&lt;/p&gt;

&lt;p&gt;If you use oil.nvim and find yourself needing to copy file paths, try &lt;code&gt;gy&lt;/code&gt;. And if you notice something missing in a tool you use daily, consider contributing. The maintainers appreciate it, and so does everyone else who benefits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/stevearc/oil.nvim/pull/746" rel="noopener noreferrer"&gt;PR #746&lt;/a&gt;, Add &lt;code&gt;gy&lt;/code&gt; keymap for &lt;code&gt;yank_entry&lt;/code&gt; action&lt;/p&gt;

</description>
      <category>neovim</category>
      <category>lua</category>
      <category>opensource</category>
      <category>oilnvim</category>
    </item>
    <item>
      <title>First Look at RomM: An App Store for Games I Already Own</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 13 Oct 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/first-look-at-romm-an-app-store-for-games-i-already-own-47m5</link>
      <guid>https://dev.to/juanvqz/first-look-at-romm-an-app-store-for-games-i-already-own-47m5</guid>
      <description>&lt;p&gt;I have two handhelds and a folder of games on my laptop. Getting a game from the laptop to a handheld meant shutting the console down, taking the SD card out, putting it in a reader, copying files, ejecting, putting it back. Every single time.&lt;/p&gt;

&lt;p&gt;Then I found &lt;a href="https://romm.app" rel="noopener noreferrer"&gt;RomM&lt;/a&gt;, and it turns that folder into something my consoles can browse over Wi-Fi.&lt;/p&gt;

&lt;p&gt;This post is the first look. I installed RomM on my laptop to try the interface and see whether it earned a permanent place at home. The real installation, on a small PC server on my network, gets its own post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two halves
&lt;/h2&gt;

&lt;p&gt;RomM is a self-hosted server, open source under the AGPL. You point it at your games, it scrapes cover art and metadata, and it gives you a web library to browse. It runs in Docker.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://grout.romm.app" rel="noopener noreferrer"&gt;Grout&lt;/a&gt; is the other half: a small app that runs &lt;em&gt;on the handheld&lt;/em&gt;. It connects to your RomM server, lists what is available, and downloads games straight to the console over Wi-Fi. It supports muOS and OnionOS, which happen to be exactly what my two devices run.&lt;/p&gt;

&lt;p&gt;The effect is an app store stocked entirely with games I already own.&lt;/p&gt;

&lt;h2&gt;
  
  
  A narrow trial on purpose
&lt;/h2&gt;

&lt;p&gt;I did not try to replace the SD card on day one. The trial covered one console, my Anbernic RG40XX V, and two jobs: metadata and box art.&lt;/p&gt;

&lt;p&gt;Saves and big transfers stayed on the card reader. Everything Grout does crosses the console’s Wi-Fi, and that link drops on long transfers. A card reader moves 1.3 GB in under a minute. A trial that depends on the weakest link tells you about the link, not about RomM.&lt;/p&gt;

&lt;h2&gt;
  
  
  The compose file
&lt;/h2&gt;

&lt;p&gt;RomM needs a database, so the setup is two containers: RomM and MariaDB. This is my&lt;code&gt;docker-compose.yml&lt;/code&gt;, trimmed to the parts that matter. Secrets come from a &lt;code&gt;.env&lt;/code&gt;file that stays out of git.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;romm&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;rommapp/romm:latest&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;DB_HOST=romm-db&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;DB_NAME=romm&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;DB_USER=romm-user&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;DB_PASSWD=${DB_PASSWD:?set DB_PASSWD in .env}&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;ROMM_AUTH_SECRET_KEY=${ROMM_AUTH_SECRET_KEY:?generate with openssl rand -hex 32}&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;HASHEOUS_API_ENABLED=true&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;SCREENSCRAPER_USER=${SCREENSCRAPER_USER:-}&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;SCREENSCRAPER_PASSWORD=${SCREENSCRAPER_PASSWORD:-}&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;romm_resources:/romm/resources&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;romm_redis_data:/redis-data&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;../romm-library/roms:/romm/library/roms:ro&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;../bios:/romm/library/bios:ro&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./assets:/romm/assets&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./config:/romm/config&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8080:8080"&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;romm-db&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;condition&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;service_healthy&lt;/span&gt;

  &lt;span class="na"&gt;romm-db&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mariadb:latest&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;MARIADB_ROOT_PASSWORD=${DB_ROOT_PASSWD:?set DB_ROOT_PASSWD in .env}&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;MARIADB_DATABASE=romm&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;MARIADB_USER=romm-user&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;MARIADB_PASSWORD=${DB_PASSWD:?set DB_PASSWD in .env}&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;mysql_data:/var/lib/mysql&lt;/span&gt;
    &lt;span class="na"&gt;healthcheck&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;test&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;CMD"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;healthcheck.sh"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--connect"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--innodb_initialized"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10s&lt;/span&gt;
      &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;5s&lt;/span&gt;
      &lt;span class="na"&gt;retries&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;

&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;romm_resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;romm_redis_data&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;mysql_data&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;:?&lt;/code&gt; in &lt;code&gt;${DB_PASSWD:?...}&lt;/code&gt; makes Compose refuse to start when the variable is missing, instead of starting a database with an empty password.&lt;/p&gt;

&lt;p&gt;For metadata, Hasheous needs no account and is enough to start. ScreenScraper needs a free account, and it has the better coverage for Sega, where my Mega Drive art had gaps.&lt;/p&gt;

&lt;p&gt;Then &lt;code&gt;docker compose up -d&lt;/code&gt;, open &lt;code&gt;http://localhost:8080&lt;/code&gt;, create the admin account, scan.&lt;/p&gt;

&lt;p&gt;Three lines in that file were decisions, not defaults.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The games are mounted read-only.&lt;/strong&gt; That is the &lt;code&gt;:ro&lt;/code&gt; on the library line. My two consoles share filenames on purpose: box art is matched to a game by filename and nothing else, so a game called the same thing on both devices means one image works on either. A scraper that decides to tidy your filenames would quietly undo that, and you would only notice when the art went blank. Read-only means RomM can look and never touch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The library is a curated folder, not the whole archive.&lt;/strong&gt; My first scan found 15,654 games and started downloading cover art for all of them. I have about 300 on the consoles. That is hours of API calls for art nobody will ever see.&lt;/p&gt;

&lt;p&gt;So &lt;code&gt;../romm-library/roms&lt;/code&gt; is a second folder holding only the games that are on a device, built with hardlinks, which means it takes no extra disk. Same files, second set of names. RomM sees 313 games across nine systems instead of 15,654, and the scan finishes in minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RomM’s own data lives in named volumes.&lt;/strong&gt; The database, the scraped art and the cache are Docker volumes, not folders I manage. That comes back when the laptop stops being the host.&lt;/p&gt;

&lt;h2&gt;
  
  
  The folder name problem
&lt;/h2&gt;

&lt;p&gt;My library names its system folders with short codes: &lt;code&gt;FC&lt;/code&gt; for Famicom, &lt;code&gt;SFC&lt;/code&gt; for Super Famicom, &lt;code&gt;PCE&lt;/code&gt; for PC Engine. Those come from OnionOS, which requires exactly those names on the Miyoo. muOS has no fixed folder names, you pick one and assign a core to it, so I used the same codes on the Anbernic and both consoles share one layout.&lt;/p&gt;

&lt;p&gt;RomM has never heard of those codes. On the first scan it saw folders it could not identify and scraped nothing for them.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;config/config.yml&lt;/code&gt; fixes that by mapping each folder to a RomM platform:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;system&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;platforms&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# console folder -&amp;gt; RomM platform&lt;/span&gt;
    &lt;span class="na"&gt;FC&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nes&lt;/span&gt;
    &lt;span class="na"&gt;GB&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gb&lt;/span&gt;
    &lt;span class="na"&gt;GBC&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gbc&lt;/span&gt;
    &lt;span class="na"&gt;GBA&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gba&lt;/span&gt;
    &lt;span class="na"&gt;SFC&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;snes&lt;/span&gt;
    &lt;span class="na"&gt;MD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;genesis-slash-megadrive&lt;/span&gt;
    &lt;span class="na"&gt;PCE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;turbografx-16-slash-pc-engine&lt;/span&gt;

&lt;span class="na"&gt;exclude&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;platforms&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;ARCADE&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Ports&lt;/span&gt;

&lt;span class="na"&gt;filesystem&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;skip_hash_calculation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My real file maps twenty systems. The exclusions matter too. Arcade sets depend on the exact romset version and would mostly fail to match, and ports are programs built for one device, not games in RomM’s sense.&lt;/p&gt;

&lt;p&gt;I left hashing on. RetroAchievements matches a ROM to its achievement set by hash, and I play with achievements on. The cost is a slower first scan. Later scans only hash what changed.&lt;/p&gt;

&lt;p&gt;If your folders already use RomM’s own names, like &lt;code&gt;nes&lt;/code&gt; and &lt;code&gt;snes&lt;/code&gt;, none of this comes up. Mine follow what OnionOS wanted.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mistake: &lt;code&gt;down -v&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Midway through setup, the stack got torn down to rescan from scratch, with&lt;code&gt;docker compose down -v&lt;/code&gt;. The &lt;code&gt;-v&lt;/code&gt; deletes the named volumes, and the admin account lives in the database, which lives in a volume. The account I had created was gone.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker compose stop &lt;span class="c"&gt;# keeps the database, scraped art and cache&lt;/span&gt;
docker compose start
docker compose down &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="c"&gt;# deletes them: the admin account and the scan go too&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To pause RomM, use &lt;code&gt;stop&lt;/code&gt;. &lt;code&gt;down -v&lt;/code&gt; is for when you mean it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting the console
&lt;/h2&gt;

&lt;p&gt;Grout installs the same way other muOS apps do: drop a file in a folder on the SD card and install it from the Archive Manager.&lt;/p&gt;

&lt;p&gt;Connecting is a pairing code rather than a login. You generate a client token in RomM, Grout shows a code, you type it into the web UI, and they are linked. The server address is your computer’s address on the network, not &lt;code&gt;localhost&lt;/code&gt;, which is obvious once you say it out loud, and worth saying out loud.&lt;/p&gt;

&lt;p&gt;Then Grout showed me my Game Boy library, and reported that it was empty.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bit that confused me
&lt;/h2&gt;

&lt;p&gt;The error said none of my mapped platforms had games, and to check my directory mapping. RomM had 35 Game Boy games indexed. The console could see the platform.&lt;/p&gt;

&lt;p&gt;Grout has to know where each RomM platform lives &lt;em&gt;on the handheld&lt;/em&gt;, which is a second mapping, separate from the one on the server. Opening Directory Mappings showed Game Boy with three choices: skip it, use &lt;code&gt;/GB&lt;/code&gt;, or pick a custom folder. &lt;code&gt;/GB&lt;/code&gt; is where my Game Boy games live. One selection and all 35 appeared.&lt;/p&gt;

&lt;p&gt;Obvious afterwards. Not obvious while reading an error about mappings I thought I had already configured.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is not
&lt;/h2&gt;

&lt;p&gt;Grout is not an emulator and not a launcher. It downloads games and syncs saves. You still play them through your handheld’s normal menu.&lt;/p&gt;

&lt;p&gt;I worked this out by clicking a game and being offered “redownload”, because every game I was looking at was already on the card. The download half of this only has something to do when the server has a game the console lacks.&lt;/p&gt;

&lt;p&gt;RomM itself does play games, in the browser, through an emulator built into the web UI. I did not expect that, and it is useful: I can check that a ROM works before sending it to a console. I tried Pokémon Blue that way, and the save landed on the laptop, under &lt;code&gt;assets/users/.../saves/GB/&lt;/code&gt;, not on any console. Saves made in the browser live on the server, separate from the saves on your devices, unless sync is set up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Art going the other way
&lt;/h2&gt;

&lt;p&gt;A surprise use: RomM is a good scraper for the consoles, not only for itself.&lt;/p&gt;

&lt;p&gt;It files art by database id, under &lt;code&gt;resources/roms/&amp;lt;platform&amp;gt;/&amp;lt;rom&amp;gt;/&lt;/code&gt;. The consoles match art by ROM filename. So a small Ruby script reads RomM’s art and copies each cover into my library under the game’s filename, filling gaps only. Art that already came off the cards is known to display correctly, so it wins.&lt;/p&gt;

&lt;p&gt;The first run found three Game Boy covers RomM had and my library did not. Small, but those were three blank tiles on the console that are not blank anymore.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I want most
&lt;/h2&gt;

&lt;p&gt;Downloads are convenient. The feature I care about is save sync.&lt;/p&gt;

&lt;p&gt;I have the same Pokémon game on both handhelds. I play one, then pick up the other, and they know nothing about each other. I tried solving that once before with a file sync tool and gave up on it. RomM has a save sync engine with conflict resolution, which is the hard part of the problem and the reason my last attempt failed.&lt;/p&gt;

&lt;p&gt;I have not tested it yet. When I do it will be with a game I do not care about, not the playthrough I am eighty hours into.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the laptop taught me
&lt;/h2&gt;

&lt;p&gt;RomM earned its place. It also showed me why a laptop is the wrong home for it: RomM only helps while it is running and on the same network, and a laptop that sleeps is not a server.&lt;/p&gt;

&lt;p&gt;Moving it should be small, because of how the compose file is laid out. The whole configuration is three files: &lt;code&gt;docker-compose.yml&lt;/code&gt;, &lt;code&gt;config/config.yml&lt;/code&gt; and &lt;code&gt;.env&lt;/code&gt;. The &lt;code&gt;.env&lt;/code&gt; stays out of git, so it gets copied by hand. The database, scraped art and cache stay behind in their volumes, and rebuilding them is one rescan, minutes for 313 games, cheaper than migrating them. The &lt;code&gt;assets&lt;/code&gt; folder is the exception: it is a plain folder next to the compose file, and it holds the saves made in the browser, so it moves with the configuration.&lt;/p&gt;

&lt;p&gt;Two things change on a real server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;An address that does not move.&lt;/strong&gt; Grout remembers the server address, and a DHCP lease will move eventually. When it stops connecting for no apparent reason, that is the first thing to check. A &lt;code&gt;.local&lt;/code&gt; hostname may be the cleaner fix: it follows the machine instead of the lease, as long as the console can resolve it. Testing that is part of the next post.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port 8080 is open to the whole network.&lt;/strong&gt; Fine on a home LAN. If it ever needs to be reachable from outside, it goes behind a reverse proxy with TLS first.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That move is the next post: RomM on a real local server, running all the time.&lt;/p&gt;

&lt;p&gt;For now, on a laptop, it does one job well, which is more than the SD card shuffle managed.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is part of a series about retro handhelds. The first post covered &lt;a href="https://dev.to/juanvqz/a-game-about-juan-installed-by-juan-15ni"&gt;installing Guacamelee! on the Anbernic&lt;/a&gt;, and the rest are under the &lt;a href="https://www.juanvasquez.dev/tags/handheld/" rel="noopener noreferrer"&gt;handheld tag&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>romm</category>
      <category>grout</category>
      <category>muos</category>
      <category>onionos</category>
    </item>
    <item>
      <title>Cross-Posting Full Jekyll Posts to dev.to</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 06 Oct 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/cross-posting-a-jekyll-blog-to-devto-complete-5104</link>
      <guid>https://dev.to/juanvqz/cross-posting-a-jekyll-blog-to-devto-complete-5104</guid>
      <description>&lt;p&gt;My blog has been connected to dev.to’s “Publishing to DEV Community from RSS” for a long time. Every post I wrote showed up on dev.to as a draft, which sounds like the whole job done for me. It was not. Every draft was cut short, so before publishing anything on dev.to I opened the draft and pasted the rest of the post by hand. An integration that makes you sync by hand is not an integration.&lt;/p&gt;

&lt;p&gt;This is how I tracked it down, the things dev.to does that are not written anywhere, and the gem that came out of it: &lt;a href="https://github.com/JuanVqz/jekyll-devto" rel="noopener noreferrer"&gt;jekyll-devto&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why the posts arrived cut short
&lt;/h2&gt;

&lt;p&gt;This blog runs on &lt;a href="https://github.com/cotes2020/jekyll-theme-chirpy" rel="noopener noreferrer"&gt;Chirpy&lt;/a&gt;. Its &lt;code&gt;feed.xml&lt;/code&gt; is an Atom feed, and each entry looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;content&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text/html"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://www.juanvasquez.dev/blog/some-post/"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;The first 90 words of the post […]&lt;span class="nt"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;&amp;lt;content&amp;gt;&lt;/code&gt; element is empty. It only points at the post with &lt;code&gt;src&lt;/code&gt;. dev.to runs &lt;a href="https://github.com/forem/forem" rel="noopener noreferrer"&gt;Forem&lt;/a&gt;, and the importer picks the body in &lt;code&gt;Feeds::AssembleArticleMarkdown&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_content&lt;/span&gt;
  &lt;span class="vi"&gt;@item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;content&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="vi"&gt;@item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;summary&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Feedjira, the parser Forem uses, returns &lt;code&gt;nil&lt;/code&gt; for an empty &lt;code&gt;&amp;lt;content&amp;gt;&lt;/code&gt;, so dev.to took the summary. Ninety words and a &lt;code&gt;[…]&lt;/code&gt;. Nothing on my side was broken: it is how the theme’s feed is built.&lt;/p&gt;




&lt;h2&gt;
  
  
  A second feed, not a fuller one
&lt;/h2&gt;

&lt;p&gt;The obvious fix is to put the whole post in &lt;code&gt;feed.xml&lt;/code&gt;. I did not, for two reasons. The README of my GitHub profile reads that feed and only needs titles. And the theme’s template ends with &lt;code&gt;replace: '&amp;amp;', '&amp;amp;amp;'&lt;/code&gt; over the whole document, which would corrupt the escaped entities inside code blocks the moment the feed carried full HTML.&lt;/p&gt;

&lt;p&gt;So I added &lt;code&gt;/devto.xml&lt;/code&gt;, an RSS 2.0 feed with the full rendered post in &lt;code&gt;&amp;lt;content:encoded&amp;gt;&lt;/code&gt;, which is what Forem reads first. The summary feed stays a summary, the way Chirpy ships it.&lt;/p&gt;

&lt;p&gt;The first build looked right, and I checked it the only way that counts: I ran the feed through the same chain dev.to uses. Feedjira to parse it, Forem’s own &lt;code&gt;Feeds::CleanHtml&lt;/code&gt; to clean it, and ReverseMarkdown to turn it into the Markdown dev.to stores. That replay found the next problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  Line numbers inside the code
&lt;/h2&gt;

&lt;p&gt;Chirpy’s default config turns on Rouge line numbers (&lt;code&gt;line_numbers: true&lt;/code&gt;), so every fenced block renders as a table with a gutter. After dev.to’s conversion, the numbers were part of the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;1
2
bundle add tailwindcss-rails
rails tailwindcss:install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fix rewrites each Rouge block back to a plain &lt;code&gt;&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;&lt;/code&gt; and drops the highlighting spans. Two review rounds found the cases I had missed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kramdown block options.&lt;/strong&gt; &lt;code&gt;{: .nolineno }&lt;/code&gt; adds a class to the wrapper and &lt;code&gt;{: file="app/models/user.rb" }&lt;/code&gt; adds an attribute, so a pattern that expected exactly &lt;code&gt;class="language-ruby highlighter-rouge"&lt;/code&gt; skipped those blocks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The &lt;code&gt;{% highlight ruby linenos %}&lt;/code&gt; tag.&lt;/strong&gt; It renders a &lt;code&gt;&amp;lt;figure&amp;gt;&lt;/code&gt; with &lt;code&gt;gutter&lt;/code&gt; and &lt;code&gt;code&lt;/code&gt; cells instead of Kramdown’s &lt;code&gt;rouge-gutter&lt;/code&gt; and &lt;code&gt;rouge-code&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That left the code without a language, so dev.to showed it unhighlighted. &lt;code&gt;Feeds::CleanHtml&lt;/code&gt; removes every &lt;code&gt;class&lt;/code&gt; attribute before converting, and Forem reads the language from a class, so no feed can carry it through that way. It can carry it another way: CleanHtml only removes classes, so each block now goes out as &lt;code&gt;&amp;lt;pre data-lang="ruby"&amp;gt;&lt;/code&gt;, and the publisher writes that language into the draft’s fences right before publishing it.&lt;/p&gt;

&lt;p&gt;It matches blocks to fences by their first line of code, not by position. dev.to does not fence a code block inside a list item, so on one of my posts there were three blocks and two fences, and counting by position would have put the wrong language on every fence after the gap. Across this blog, 217 of the 218 blocks that have a language now get it on dev.to. The one left is that block inside a list.&lt;/p&gt;

&lt;p&gt;Forem can also fill in a missing language itself: &lt;code&gt;Article#detect_code_block_languages&lt;/code&gt; asks an AI model when the feature is turned on. One of my posts came out with a JSON fence that no version of the feed had carried, so it may be on at dev.to, but I could not confirm it, and the feed does not rely on it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Absolute links, but not inside code
&lt;/h2&gt;

&lt;p&gt;Root-relative links and images (&lt;code&gt;/about/&lt;/code&gt;, &lt;code&gt;/assets/pic.png&lt;/code&gt;) point nowhere once the post lives on dev.to, so the feed makes them absolute. My first version did it with Liquid’s &lt;code&gt;replace&lt;/code&gt; over the whole post, and review caught what that does to a code sample:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/logo.png"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That sample is text, not a tag, but Kramdown leaves its quotes unescaped, so it matched and came out with my domain glued to it. Code reaches the HTML with &lt;code&gt;&amp;lt;&lt;/code&gt; escaped as &lt;code&gt;&amp;amp;lt;&lt;/code&gt;, so the fix is to rewrite &lt;code&gt;src&lt;/code&gt; and &lt;code&gt;href&lt;/code&gt; only inside real tags. Samples stay exactly as written.&lt;/p&gt;




&lt;h2&gt;
  
  
  Drafts you still have to publish
&lt;/h2&gt;

&lt;p&gt;With the content fixed, dev.to imported complete posts. As drafts. The importer hardcodes this into the front matter of every article it creates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;published&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is no setting to change it. So I wrote a small publisher: it lists my drafts through the dev.to API, matches each one to a post published in the last seven days, and publishes it. The seven days matter. The feed carries the whole archive, and without a window the first run would have pushed years of old posts at once, a 2023 “Happy New Year” included.&lt;/p&gt;

&lt;p&gt;The first version would have published nothing, and the reason is in &lt;code&gt;Article#evaluate_front_matter&lt;/code&gt;. dev.to evaluates the front matter inside the body on every save, so that &lt;code&gt;published: false&lt;/code&gt; overrides the &lt;code&gt;published: true&lt;/code&gt; you send in the request. The publisher has to flip it inside the body, and only inside the front matter, never a matching line further down the post.&lt;/p&gt;

&lt;p&gt;There was one more catch. The response to that &lt;code&gt;PUT&lt;/code&gt; has no &lt;code&gt;published&lt;/code&gt; field, so you cannot read back whether it worked. The publisher lists the drafts again afterwards, and any post still among them fails the run.&lt;/p&gt;




&lt;h2&gt;
  
  
  The import that kept raw HTML
&lt;/h2&gt;

&lt;p&gt;The replay said every post converted cleanly, but what dev.to had stored said otherwise: one of my posts was still raw HTML, &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags and all, with no code fences. My replay had skipped one check in the importer.&lt;/p&gt;

&lt;p&gt;dev.to converts a post to Markdown only when it has more HTML block tags than blank lines. Kramdown puts a blank line between every block, so a post sits right on that edge, and the blank lines inside its code blocks decide which side it lands on. Across the blog, 15 of 43 posts had landed on the wrong one.&lt;/p&gt;

&lt;p&gt;The fix was to make the feed drop the blank lines between tags and encode the ones inside code, so a post reads exactly the same. Now every post takes the Markdown path.&lt;/p&gt;




&lt;h2&gt;
  
  
  Covers, and why they are opt-in
&lt;/h2&gt;

&lt;p&gt;The next version used each post’s Open Graph image as its dev.to cover. On my blog that image carries the post title, and dev.to prints the title right under the cover, so the first two articles that got one said their own name twice.&lt;/p&gt;

&lt;p&gt;So covers are opt-in. Without one, dev.to generates its own share image for the article (&lt;code&gt;Article#generate_social_image&lt;/code&gt;), so nothing is lost. A post sets &lt;code&gt;devto_cover&lt;/code&gt; to a path, or to &lt;code&gt;true&lt;/code&gt; for its image, or to &lt;code&gt;false&lt;/code&gt; to keep it off, and &lt;code&gt;devto: { cover: image }&lt;/code&gt; in &lt;code&gt;_config.yml&lt;/code&gt; turns it on for every post on a site whose images have no title on them.&lt;/p&gt;




&lt;h2&gt;
  
  
  Things dev.to does that are not documented
&lt;/h2&gt;

&lt;p&gt;All of these come from Forem’s source, because none of them is on a settings page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Duplicates match on title or link, per account&lt;/strong&gt; (&lt;code&gt;Feeds::CheckItemPreviouslyImported&lt;/code&gt;). Delete a draft and it comes back on the next fetch while the post is still in the feed. Rename a post after it was imported and you get a second draft.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only the first four tags survive&lt;/strong&gt; , stripped to letters and digits. &lt;code&gt;tailwind-css&lt;/code&gt; becomes &lt;code&gt;tailwindcss&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;“Replace self-referential links”&lt;/strong&gt; rewrites links between your posts to the dev.to articles imported from them, drafts included. If the linked post is still a draft, readers get a link that does not work for them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feeds are only fetched for accounts active in the last three months&lt;/strong&gt; (&lt;code&gt;Feeds::Import&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The one-time “Import from XML” box&lt;/strong&gt; takes at most 25 entries and 500 KB (&lt;code&gt;Feeds::ImportFromXml&lt;/code&gt;). My feed had 43 posts when I checked, so it would have been rejected.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Turning it into a gem
&lt;/h2&gt;

&lt;p&gt;Before writing a gem I looked for one. RubyGems has nothing for Jekyll and dev.to. The tools I found push your raw Markdown through the API, so Jekyll-specific syntax arrives unrendered, and they publish on push rather than on the post’s date. The most used one, &lt;a href="https://github.com/sinedied/devto-cli" rel="noopener noreferrer"&gt;devto-cli&lt;/a&gt;, also writes an article ID back into each post. &lt;code&gt;jekyll-feed&lt;/code&gt; carries full content but knows nothing about line numbers.&lt;/p&gt;

&lt;p&gt;The angle of &lt;a href="https://github.com/JuanVqz/jekyll-devto" rel="noopener noreferrer"&gt;jekyll-devto&lt;/a&gt; is the opposite: it works from the HTML Jekyll already rendered, so anything your theme supports comes through, and it never edits your posts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Gemfile&lt;/span&gt;
&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;'jekyll-devto'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;​&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# _config.yml&lt;/span&gt;
&lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://example.com"&lt;/span&gt;
&lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;jekyll-devto&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gives you &lt;code&gt;/devto.xml&lt;/code&gt;. For the drafts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;DEVTO_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;... &lt;span class="c"&gt;# https://dev.to/settings/extensions&lt;/span&gt;

bundle &lt;span class="nb"&gt;exec &lt;/span&gt;jekyll-devto publish &lt;span class="c"&gt;# dry run&lt;/span&gt;
bundle &lt;span class="nb"&gt;exec &lt;/span&gt;jekyll-devto publish &lt;span class="nt"&gt;--publish&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repository ships an example GitHub Actions workflow that runs it after each deploy and on a schedule, because dev.to fetches the feed on its own: its import job runs every hour but reads a feed again only when the last read is more than four hours old.&lt;/p&gt;

&lt;p&gt;Two optional front matter keys cover the rest of what dev.to does differently. &lt;code&gt;devto_tags&lt;/code&gt; picks the four tags dev.to keeps, and &lt;code&gt;devto_series&lt;/code&gt; puts the post in a dev.to series, created the first time it is used. The series name has to be identical on every post, because dev.to matches a series by its exact name.&lt;/p&gt;

&lt;p&gt;I checked it two ways before calling it done. On this blog, with my in-repo version removed, the gem produced the same &lt;code&gt;devto.xml&lt;/code&gt; for all 43 posts it carried at the time; the only difference was the build timestamp. And on a fresh &lt;code&gt;jekyll new&lt;/code&gt; site with the default theme, the feed is valid and its code blocks and links survive the replay of dev.to’s import.&lt;/p&gt;

&lt;p&gt;Every version is released from CI with &lt;a href="https://github.com/googleapis/release-please" rel="noopener noreferrer"&gt;release-please&lt;/a&gt; and RubyGems &lt;a href="https://guides.rubygems.org/trusted-publishing/" rel="noopener noreferrer"&gt;trusted publishing&lt;/a&gt;, so there is no API key in the repository.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I would tell myself before starting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Run the real pipeline. Most bugs in this post showed up only when the feed went through Feedjira, &lt;code&gt;CleanHtml&lt;/code&gt; and ReverseMarkdown, never by looking at the XML.&lt;/li&gt;
&lt;li&gt;Then check what the service stored. A replay is only as faithful as the steps you copied into it, and mine had left out the one that kept 15 posts as raw HTML.&lt;/li&gt;
&lt;li&gt;Front matter is YAML, so test every type. &lt;code&gt;devto_cover: true&lt;/code&gt; crashed the whole Jekyll build, because &lt;code&gt;true&lt;/code&gt; reached code that expected a string. A test that builds a site for every key with every YAML type, &lt;code&gt;true&lt;/code&gt;, numbers, lists and hashes, found 14 more crashes like it.&lt;/li&gt;
&lt;li&gt;Read the source of the service you integrate with. Forem’s code answered every question its settings page did not.&lt;/li&gt;
&lt;li&gt;Let someone review it. Half the fixes here came from review, and one suggested fix was wrong: it checked a &lt;code&gt;published&lt;/code&gt; field the API response does not have. Checking it against the code before applying it saved a publisher that would have failed every post.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The gem is on &lt;a href="https://rubygems.org/gems/jekyll-devto" rel="noopener noreferrer"&gt;RubyGems&lt;/a&gt; and the code is on &lt;a href="https://github.com/JuanVqz/jekyll-devto" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. If your Jekyll blog has been sending dev.to half a post, it should not anymore.&lt;/p&gt;

</description>
      <category>jekyll</category>
      <category>devto</category>
      <category>ruby</category>
      <category>rubygems</category>
    </item>
    <item>
      <title>A Game About Juan, Installed by Juan</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Thu, 01 Oct 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/a-game-about-juan-installed-by-juan-15ni</link>
      <guid>https://dev.to/juanvqz/a-game-about-juan-installed-by-juan-15ni</guid>
      <description>&lt;p&gt;I wanted Guacamelee! because it is about luchadores. Then I found out the luchador is called Juan Aguacate, which is my name, and wanting it turned into needing it.&lt;/p&gt;

&lt;p&gt;It is a metroidvania built on lucha libre. You play an agave farmer who dies in the first few minutes, puts on a mask in the land of the dead, and comes back as a luchador to rescue El Presidente’s daughter from a charro skeleton named Carlos Calaca.&lt;/p&gt;

&lt;p&gt;DrinkBox Studios did their homework. The two worlds you swap between are the living and the dead, and they are drawn the way Día de Muertos looks: marigolds, papel picado, sugar skulls, alebrije colours turned up past what any other game would dare. The bosses are folklore. The enemies are folklore. Even the map is a small Mexican town with a church, a plaza and a statue in the middle of it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fih8d9tc0kbxobvcw2ila.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fih8d9tc0kbxobvcw2ila.png" alt="Guacamelee running on the handheld, Juan in front of the Pueblucho church" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have played plenty of games that borrow a skull and call it Mexican. This one feels like someone who has been to the cemetery on the second of November.&lt;/p&gt;

&lt;p&gt;It runs on the handheld, it looks like that, and it took a detour to get there. If you have an Anbernic or something like it, the detour is the useful part.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;My handheld is an Anbernic RG40XX V running muOS. It plays old console games happily, but PC games need &lt;a href="https://portmaster.games/" rel="noopener noreferrer"&gt;PortMaster&lt;/a&gt;, which packages them up for these little ARM machines. So the list is short:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Anbernic or similar handheld running muOS&lt;/li&gt;
&lt;li&gt;PortMaster installed on it&lt;/li&gt;
&lt;li&gt;A copy of Guacamelee! Gold Edition that you own&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PortMaster ships with some muOS images and not others. If it is not under Applications, download &lt;code&gt;muos.portmaster.zip&lt;/code&gt; from the PortMaster releases, drop it in the &lt;code&gt;/ARCHIVE&lt;/code&gt; folder on your SD card, and install it from &lt;strong&gt;Applications → Archive Manager&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Say hello first
&lt;/h3&gt;

&lt;p&gt;Before spending money, install something free and play it for a minute. PortMaster’s list has plenty that need nothing but the install: I used Apotris, a Tetris game that is about 7 MB.&lt;/p&gt;

&lt;p&gt;This is worth the five minutes because it tests the whole chain at once, and because of something nobody tells you up front: a PortMaster entry might not contain a game at all. Some ports include everything. Others are only the engine, waiting for game files you own and supply yourself. In the menu the two look identical, and installing the second kind without the files gets you a black screen and a bounce back to the menu, with no error to explain why. Guacamelee is the second kind.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check before you pay
&lt;/h2&gt;

&lt;p&gt;PortMaster publishes its whole catalogue as a data file, so “will this work” is something you look up rather than ask on a forum. Three things to confirm:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Your handheld is on the port’s supported list.&lt;/li&gt;
&lt;li&gt;It needs no extra runtime. A port that drags in a 250 MB runtime is a different proposition on a 1 GB device.&lt;/li&gt;
&lt;li&gt;Whether it brings the game or expects you to supply it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To check all three, open the catalogue in your browser:&lt;a href="https://raw.githubusercontent.com/PortsMaster/PortMaster-Info/main/ports.json" rel="noopener noreferrer"&gt;https://raw.githubusercontent.com/PortsMaster/PortMaster-Info/main/ports.json&lt;/a&gt;. Search the page for the game you want. In its entry, &lt;code&gt;avail&lt;/code&gt; lists the supported devices (the Anbernic RG40XX V is &lt;code&gt;rg40xx-v&lt;/code&gt;), you want &lt;code&gt;runtime&lt;/code&gt; to be an empty &lt;code&gt;[]&lt;/code&gt;, and &lt;code&gt;rtr&lt;/code&gt; (ready to run) tells you whether the game comes included. If the search finds nothing, try a shorter piece of the title before giving up.&lt;/p&gt;

&lt;p&gt;Guacamelee’s entry, trimmed to the parts that matter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"arch"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"armhf"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"avail"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"rg40xx-h:ALL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"rg40xx-v:ALL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"rg35xx-plus:ALL"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"inst"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Add your Humble Bundle Linux Guacamelee&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;_DRMFREE.sh, or GOGs gog&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;_guacamelee&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;_gold&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;_edition&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;_2.0.0.3.sh to the guacamelee folder and run the game."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"rtr"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"runtime"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Guacamelee"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Guacamelee passed the first two, and &lt;code&gt;rtr: false&lt;/code&gt; plus the &lt;code&gt;inst&lt;/code&gt; line say plainly that the game files are on you. The part I did not expect was that its age mattered most. These ports run x86 games on ARM hardware through a translation layer called&lt;a href="https://box86.org/" rel="noopener noreferrer"&gt;Box86&lt;/a&gt;, and Box86 only handles &lt;strong&gt;32-bit&lt;/strong&gt; programs. Modern Linux games are 64-bit. Guacamelee’s Linux build shipped in 2014, when 32-bit was still normal, and that is the only reason any of this works.&lt;/p&gt;

&lt;p&gt;The catalogue answers that too. Guacamelee’s entry lists its architecture as &lt;code&gt;armhf&lt;/code&gt;, the 32-bit build, and names the exact file it wants: GOG’s&lt;code&gt;gog_guacamelee_gold_edition_2.0.0.3.sh&lt;/code&gt;. A port built for 32-bit, asking for GOG’s installer by name, turned “probably” into “buy it”.&lt;/p&gt;

&lt;p&gt;After buying, I checked anyway. I opened the installer on my laptop and looked for a folder called &lt;code&gt;lib32&lt;/code&gt;. It was there.&lt;/p&gt;

&lt;p&gt;GOG sells the game for Windows and Linux. Take the Linux one, a single self-extracting &lt;code&gt;.sh&lt;/code&gt; file, not the Galaxy installer and not the Windows version. Its name has to match the one in the catalogue entry character for character. If it differs, setup fails with “Game installation file is missing”, and you rename the file to match.&lt;/p&gt;

&lt;p&gt;It helped that it is cheap. I bought it on GOG at 75% off, well under the price of a coffee. A game that old goes on deep discount often, so if it is not on sale when you look, wait a week.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five minutes
&lt;/h2&gt;

&lt;p&gt;First launch unpacks everything. PortMaster says it takes about five minutes, and it is true.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7p2aotiqso2p76110m7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7p2aotiqso2p76110m7v.png" alt="The PortMaster patch screen extracting the game files" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Watching &lt;code&gt;lib32&lt;/code&gt; scroll past on the handheld, after checking for it on my laptop, was the most satisfying part of the afternoon.&lt;/p&gt;

&lt;h2&gt;
  
  
  It runs
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwsdihltm0f35t36oqr24.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwsdihltm0f35t36oqr24.png" alt="The luchador statue in the town plaza" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Full speed, no stutter, an hour in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpd44ub41nhjdzidwg0o4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpd44ub41nhjdzidwg0o4.png" alt="Options showing 640x480 at 60Hz and language set to Spanish" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I opened the options to raise the resolution and found 640×480. My first thought was that this seemed low for how good it looked. My second thought, after checking, was that the screen &lt;em&gt;is&lt;/em&gt; 640×480. There was nothing to raise. The game was already drawing one pixel for every pixel the display has, which is the best it can do.&lt;/p&gt;

&lt;p&gt;The screen is 4:3 and the game was made for widescreen, so you get black bars above and below rather than a squashed picture. In practice you stop noticing.&lt;/p&gt;

&lt;p&gt;The language menu has several languages, Spanish and French among them. Playing a game built on Mexican folklore, in Spanish, on a handheld I can put in a jacket pocket, is better than I expected from something I nearly talked myself out of buying.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you try this
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Check whether the port includes the game before you buy anything.&lt;/strong&gt; In the catalogue, &lt;code&gt;rtr: false&lt;/code&gt; means it is waiting for files you do not have.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check whether it needs a runtime.&lt;/strong&gt; On a 1 GB device, a port that drags in a 250 MB runtime is a different proposition to one that does not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Take the Linux build&lt;/strong&gt; , not the Galaxy installer, not the Windows one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Match the filename exactly.&lt;/strong&gt; Most brittle step, easiest fix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look up the port in PortMaster’s catalogue before paying.&lt;/strong&gt; Your device on the list, no runtime, and a 32-bit build answer the only question that matters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One last thing: GOG bundles Super Turbo Championship Edition with Gold Edition, and it looks like two games for one price. On the handheld it is one. Super Turbo is a separate 2014 release, Windows only, with no PortMaster port, so it sits in your library, playable on a Windows PC, invisible to the handheld.&lt;/p&gt;

&lt;p&gt;Quitting the game takes a few minutes, which is the one rough edge. The save held, which is the part that matters.&lt;/p&gt;

&lt;p&gt;A game about a man called Juan who keeps getting knocked down and coming back. Took a few false starts and one fussy filename to get there. Fitting enough.&lt;/p&gt;

</description>
      <category>portmaster</category>
      <category>muos</category>
      <category>handheld</category>
      <category>anbernic</category>
    </item>
    <item>
      <title>Installing maquina-components in a Rails App</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 29 Sep 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/installing-maquina-components-in-a-rails-app-28on</link>
      <guid>https://dev.to/juanvqz/installing-maquina-components-in-a-rails-app-28on</guid>
      <description>&lt;p&gt;I recently migrated &lt;a href="https://github.com/JuanVqz/may_store" rel="noopener noreferrer"&gt;MayStore&lt;/a&gt;, a multitenant order management app, from 520 lines of custom CSS to &lt;a href="https://github.com/maquina-app/maquina_components" rel="noopener noreferrer"&gt;maquina-components&lt;/a&gt;. This post covers what it takes, what worked well, and a few gotchas.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is maquina-components?
&lt;/h2&gt;

&lt;p&gt;It’s a Rails engine that provides a component library built on Tailwind CSS v4. Think shadcn/ui but for ERB. Components are rendered as partials with &lt;code&gt;data-component&lt;/code&gt; and &lt;code&gt;data-variant&lt;/code&gt; attributes for styling. No ViewComponent, no Phlex, just Rails partials.&lt;/p&gt;

&lt;p&gt;The library includes: sidebar, header, breadcrumbs, cards, tables, buttons, inputs, toasts, alerts, modals, and more.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before installing maquina-components, you need:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rails 8.0+&lt;/strong&gt; with Propshaft (not Sprockets)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;importmap-rails&lt;/strong&gt; for JavaScript delivery&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tailwindcss-rails&lt;/strong&gt; gem installed and configured&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS v4&lt;/strong&gt; (the gem’s latest version uses v4)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you’re using esbuild, Vite, or jsbundling-rails for JS, maquina-components won’t work out of the box. The engine registers its JavaScript controllers through importmap, and the Stimulus controllers expect to be loaded via &lt;code&gt;@hotwired/stimulus-loading&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Install the prerequisites:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bundle add tailwindcss-rails
rails tailwindcss:install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates &lt;code&gt;app/assets/tailwind/application.css&lt;/code&gt; with the &lt;code&gt;@import "tailwindcss"&lt;/code&gt; directive.&lt;/p&gt;




&lt;h2&gt;
  
  
  Installing maquina-components
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bundle add maquina-components
rails generate maquina_components:install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The generator does three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Adds the engine CSS import to your Tailwind file&lt;/li&gt;
&lt;li&gt;Appends theme variables (CSS custom properties with oklch colors, light/dark mode)&lt;/li&gt;
&lt;li&gt;Creates &lt;code&gt;app/helpers/maquina_components_helper.rb&lt;/code&gt; with engine helper includes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After running the generator, restart your Rails server so the engine’s view paths and importmap entries are picked up.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Layout: Collapsible Sidebar
&lt;/h2&gt;

&lt;p&gt;The sidebar component is what sold me. It has an &lt;code&gt;inset&lt;/code&gt; variant that wraps the main content in a padded container, and it collapses to icons-only on desktop or slides off-canvas on mobile. State is persisted via cookies.&lt;/p&gt;

&lt;p&gt;Here’s what the layout looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;body&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"overflow-hidden bg-background font-sans antialiased"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/sidebar/provider"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="ss"&gt;default_open: &lt;/span&gt;&lt;span class="n"&gt;app_sidebar_open?&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;

    &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/sidebar/sidebar"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;variant: :inset&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
      &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/sidebar/header"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-semibold text-lg truncate"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="no"&gt;Current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;store&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;name&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
      &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;

      &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/sidebar/content"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/sidebar/group"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
          &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/sidebar/menu"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
            &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/sidebar/menu_item"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
              &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/sidebar/menu_button"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="ss"&gt;href: &lt;/span&gt;&lt;span class="n"&gt;tables_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="ss"&gt;text: &lt;/span&gt;&lt;span class="s2"&gt;"Mesas"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="ss"&gt;icon: :grid&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
            &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
          &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
      &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;

    &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/sidebar/inset"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
      &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/header"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/sidebar/trigger"&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/separator"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;orientation: :vertical&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- breadcrumbs, logout, etc. --&amp;gt;&lt;/span&gt;
      &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;

      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex-1 overflow-y-auto p-4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
  &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;app_sidebar_open?&lt;/code&gt; helper reads a cookie to restore the sidebar state across page loads. The sidebar trigger button and keyboard shortcut (&lt;code&gt;Cmd+B&lt;/code&gt;) toggle it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Using Components in Views
&lt;/h2&gt;

&lt;p&gt;Components use &lt;code&gt;data-component&lt;/code&gt; and &lt;code&gt;data-variant&lt;/code&gt; attributes. No CSS classes to memorize:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;%# Button variants %&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;data-component=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;data-variant=&lt;/span&gt;&lt;span class="s"&gt;"primary"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Save&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;data-component=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;data-variant=&lt;/span&gt;&lt;span class="s"&gt;"destructive"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Delete&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;data-component=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;data-variant=&lt;/span&gt;&lt;span class="s"&gt;"outline"&lt;/span&gt; &lt;span class="na"&gt;data-size=&lt;/span&gt;&lt;span class="s"&gt;"sm"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Edit&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;%# Form inputs %&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text_field&lt;/span&gt; &lt;span class="ss"&gt;:name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;data: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="ss"&gt;component: &lt;/span&gt;&lt;span class="s2"&gt;"input"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text_area&lt;/span&gt; &lt;span class="ss"&gt;:notes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;data: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="ss"&gt;component: &lt;/span&gt;&lt;span class="s2"&gt;"textarea"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;%# Cards %&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/card"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
  &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/card/header"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/card/title"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;text: &lt;/span&gt;&lt;span class="s2"&gt;"Order Details"&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
  &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
  &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"components/card/content"&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- content here --&amp;gt;&lt;/span&gt;
  &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The partial-based approach means you get autocomplete in your editor and can inspect the component source directly in the engine’s &lt;code&gt;app/views/components/&lt;/code&gt; directory.&lt;/p&gt;




&lt;h2&gt;
  
  
  Customizing the Theme
&lt;/h2&gt;

&lt;p&gt;The generator adds CSS custom properties to your Tailwind file. You can change them to match your brand. I changed the primary color from the default red to blue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;oklch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.488&lt;/span&gt; &lt;span class="m"&gt;0.243&lt;/span&gt; &lt;span class="m"&gt;264&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;--primary-foreground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;oklch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.984&lt;/span&gt; &lt;span class="m"&gt;0.003&lt;/span&gt; &lt;span class="m"&gt;264&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.dark&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;oklch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.623&lt;/span&gt; &lt;span class="m"&gt;0.214&lt;/span&gt; &lt;span class="m"&gt;264&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;--primary-foreground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;oklch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.144&lt;/span&gt; &lt;span class="m"&gt;0.03&lt;/span&gt; &lt;span class="m"&gt;264&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One thing to watch: the default &lt;code&gt;--destructive&lt;/code&gt; color is a light pink tint (designed for alert backgrounds). If you’re using it for delete buttons, you’ll want a more saturated red:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--destructive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;oklch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.577&lt;/span&gt; &lt;span class="m"&gt;0.245&lt;/span&gt; &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;--destructive-foreground&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;oklch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.984&lt;/span&gt; &lt;span class="m"&gt;0.003&lt;/span&gt; &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Pro Tip: Scaffold Templates
&lt;/h2&gt;

&lt;p&gt;After using maquina-components for a bit, I found myself wanting every &lt;code&gt;rails generate scaffold&lt;/code&gt; to produce views that already use the component system. I &lt;a href="https://github.com/maquina-app/maquina_components/pull/20" rel="noopener noreferrer"&gt;contributed a generator&lt;/a&gt; for this. If it gets merged, you’ll be able to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rails generate maquina_components:scaffold_templates
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This copies 6 ERB templates (&lt;code&gt;_form&lt;/code&gt;, &lt;code&gt;index&lt;/code&gt;, &lt;code&gt;show&lt;/code&gt;, &lt;code&gt;new&lt;/code&gt;, &lt;code&gt;edit&lt;/code&gt;, &lt;code&gt;partial&lt;/code&gt;) to &lt;code&gt;lib/templates/erb/scaffold/&lt;/code&gt;. After that, any &lt;code&gt;rails g scaffold Product name:string price:integer&lt;/code&gt; produces views with cards, tables, breadcrumbs, and proper component markup out of the box.&lt;/p&gt;

&lt;p&gt;Here’s what the generated index looks like: a card with a row header (title + “New” button), a table with column headers from your model attributes, and an empty state component when there are no records.&lt;/p&gt;

&lt;p&gt;The generated forms use &lt;code&gt;data: { component: "input" }&lt;/code&gt; on every field, error messages render inside an alert component, and show/edit views include breadcrumbs via &lt;code&gt;content_for :breadcrumbs&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In the meantime, you can grab the templates directly from the &lt;a href="https://github.com/JuanVqz/maquina_components/tree/feature/scaffold_templates/lib/generators/maquina_components/scaffold_templates/templates" rel="noopener noreferrer"&gt;PR branch&lt;/a&gt; and copy them to &lt;code&gt;lib/templates/erb/scaffold/&lt;/code&gt; manually.&lt;/p&gt;




&lt;h2&gt;
  
  
  Was It Easy?
&lt;/h2&gt;

&lt;p&gt;Mostly yes. The migration from custom CSS to components was straightforward because the component API is consistent: &lt;code&gt;data-component&lt;/code&gt;, &lt;code&gt;data-variant&lt;/code&gt;, &lt;code&gt;data-size&lt;/code&gt; everywhere. The sidebar required the most thought (cookie state, mobile behavior, inset layout), but the documentation covers it.&lt;/p&gt;

&lt;p&gt;A few things I ran into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Restart required after install.&lt;/strong&gt; The engine’s view paths and importmap entries aren’t picked up until you restart the server. If you get a missing partial error for &lt;code&gt;components/_header&lt;/code&gt;, that’s why.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Engine helpers need explicit includes.&lt;/strong&gt; The generated helper file needs &lt;code&gt;include MaquinaComponents::SidebarHelper&lt;/code&gt; (and friends) to work. As of v0.4.4, the generator template was missing these includes. I &lt;a href="https://github.com/maquina-app/maquina_components/pull/19" rel="noopener noreferrer"&gt;opened a PR&lt;/a&gt; to fix it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stimulus controllers need updating.&lt;/strong&gt; If you have Stimulus controllers that toggle CSS classes for styling, you’ll need to switch them to toggle &lt;code&gt;data-variant&lt;/code&gt; attributes instead.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, going from 520 lines of hand-written CSS to a component library that handles dark mode, responsive behavior, and accessibility was a clear win.&lt;/p&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/maquina-app/maquina_components" rel="noopener noreferrer"&gt;maquina-components&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/maquina-app/maquina_components/pull/20" rel="noopener noreferrer"&gt;Scaffold templates generator PR&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rails/tailwindcss-rails" rel="noopener noreferrer"&gt;tailwindcss-rails&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/JuanVqz/may_store/pull/29" rel="noopener noreferrer"&gt;MayStore PR #29&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rails</category>
      <category>tailwindcss</category>
      <category>maquinacomponents</category>
      <category>hotwire</category>
    </item>
    <item>
      <title>Contributing to MDN in Spanish</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 22 Sep 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/contributing-to-mdn-in-spanish-276k</link>
      <guid>https://dev.to/juanvqz/contributing-to-mdn-in-spanish-276k</guid>
      <description>&lt;p&gt;A developer in Guadalajara opens MDN to look up how &lt;code&gt;fetch&lt;/code&gt; handles errors. They read English fine, but after nine hours of work it is the difference between understanding a page and getting through it. They switch to &lt;code&gt;/es/&lt;/code&gt;, and the page is there, current, complete.&lt;/p&gt;

&lt;p&gt;That is the whole point of the Spanish locale. Everything else in this post is logistics.&lt;/p&gt;

&lt;p&gt;I lead the Spanish team on MDN. This year, more than half of the Spanish pull requests merged into &lt;a href="https://github.com/mdn/translated-content" rel="noopener noreferrer"&gt;mdn/translated-content&lt;/a&gt; came from contributors outside the team, and our job is to help them land. This is what I wish someone had told me before my first Spanish PR.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Spanish Team Is Three People
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/mdn/translated-content/blob/main/PEERS_GUIDELINES.md" rel="noopener noreferrer"&gt;&lt;code&gt;PEERS_GUIDELINES.md&lt;/code&gt;&lt;/a&gt; lists the review team for every locale. For Spanish it is &lt;a href="https://github.com/Graywolf9" rel="noopener noreferrer"&gt;Graywolf9&lt;/a&gt;, &lt;a href="https://github.com/mariomorillo" rel="noopener noreferrer"&gt;Mario Morillo&lt;/a&gt; and me. Three people reviewing everything that lands in &lt;code&gt;files/es/&lt;/code&gt;, for one of the most spoken languages on the web.&lt;/p&gt;

&lt;p&gt;I bring this up because “contributing to MDN” sounds like joining something huge where your one page won’t matter. The opposite is true. If you translate one page this weekend, you are a visible share of what Spanish gets this month. There is no queue of people ahead of you.&lt;/p&gt;




&lt;h2&gt;
  
  
  What We Want From a PR
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/mdn/translated-content/blob/main/docs/es/README.md" rel="noopener noreferrer"&gt;Spanish contributor guide&lt;/a&gt; ranks it plainly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preferred: one page, fully updated.&lt;/strong&gt; Compare the whole Spanish page with the current English source and bring all of it up to date. That is what closes issues and shrinks the gap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Also welcome: small fixes.&lt;/strong&gt; A missing accent, a typo, one badly translated sentence. It is a good way in, and we review it with the same care. One request: if you find several problems on the same page, send one PR, not a PR a day for a week.&lt;/p&gt;

&lt;p&gt;What does not work is the middle: translating the two English sentences someone left in a page that is two years out of date. The sentences get fixed and the page stays stale. Our trackers say it outright: the scope of a subtask is the whole file.&lt;/p&gt;

&lt;p&gt;You don’t need to install anything for a short page. Open the file under &lt;a href="https://github.com/mdn/translated-content/tree/main/files/es" rel="noopener noreferrer"&gt;&lt;code&gt;files/es/&lt;/code&gt;&lt;/a&gt;, click the pencil, and GitHub forks the repo for you. Add &lt;code&gt;[es]&lt;/code&gt; to the commit message so reviewers can spot Spanish PRs. Every PR gets a preview URL from the bot, so you can see the rendered page without running MDN locally. For longer pages, or to check links and macros as you go, the &lt;a href="https://github.com/mdn/translated-content/blob/main/docs/es/entorno-local.md" rel="noopener noreferrer"&gt;local environment guide&lt;/a&gt; walks you through running MDN on your own computer.&lt;/p&gt;




&lt;h2&gt;
  
  
  How We Write Spanish on MDN
&lt;/h2&gt;

&lt;p&gt;This is the part a generic “how to contribute to MDN” post can’t tell you. These are the conventions the Spanish team agreed on, and the ones I correct most often in review.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tú, not usted, and the imperative.&lt;/strong&gt; “Abre el archivo,” not “abra el archivo.” MDN’s English style guide asks for an active voice and a conversational tone, and in Spanish that becomes tuteo plus the imperative. The imperative already implies &lt;em&gt;tú&lt;/em&gt;, so “tú haz clic aquí” is redundant. “Haz clic aquí” is enough.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agreed terms for the words that repeat.&lt;/strong&gt; Headings like &lt;em&gt;See also&lt;/em&gt; and &lt;em&gt;Browser compatibility&lt;/em&gt; appear on almost every reference page, so we translate them the same way everywhere:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;English&lt;/th&gt;
&lt;th&gt;Spanish&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Event listener&lt;/td&gt;
&lt;td&gt;Detector de eventos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Event handler&lt;/td&gt;
&lt;td&gt;Manejador de eventos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;See also&lt;/td&gt;
&lt;td&gt;Véase también&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Browser compatibility&lt;/td&gt;
&lt;td&gt;Compatibilidad con navegadores&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Return value&lt;/td&gt;
&lt;td&gt;Valor de retorno&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Framework&lt;/td&gt;
&lt;td&gt;Framework (untranslated)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The full list is in the guide. When a term is not on it, look at how nearby Spanish pages already say it before inventing a new one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API names keep English word order.&lt;/strong&gt; Spanish puts the noun first, so “API Canvas” feels natural. It is still wrong: &lt;code&gt;Canvas API&lt;/code&gt; is a proper noun. The article goes in front of the whole name: &lt;em&gt;la Canvas API quedó obsoleta&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Callout keywords stay in English.&lt;/strong&gt; Write &lt;code&gt;&amp;gt; [!NOTE]&lt;/code&gt;, not &lt;code&gt;&amp;gt; [!Nota]&lt;/code&gt;. The build renders the first as a styled box with “Nota:” already on it. The second becomes a plain quote.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Glossary links need a Spanish label.&lt;/strong&gt; &lt;code&gt;{{Glossary("TLD")}}&lt;/code&gt; shows the English term. When the natural Spanish differs, pass it as the second argument: &lt;code&gt;{{Glossary("TLD", "Dominio de primer nivel")}}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unresolved doubts get a searchable marker.&lt;/strong&gt; If you can’t settle something while translating, leave &lt;code&gt;&amp;lt;!-- TODO(l10n-es): ... --&amp;gt;&lt;/code&gt;. The prefix matters: searching &lt;code&gt;files/es/&lt;/code&gt; for plain &lt;code&gt;TODO&lt;/code&gt; also matches the Spanish word &lt;em&gt;TODOS&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Links Are Where Spanish Pages Break Quietly
&lt;/h2&gt;

&lt;p&gt;Internal links always use &lt;code&gt;/es/&lt;/code&gt;, even when the target page is not translated yet. That keeps the reader in Spanish, and the link starts working the day someone translates the target.&lt;/p&gt;

&lt;p&gt;Don’t expect English to fill in. A &lt;code&gt;/es/&lt;/code&gt; URL with no Spanish file is a 404, not the English page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}'&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; https://developer.mozilla.org/es/docs/Learn_web_development/Core/Scripting/Functions
&lt;span class="c"&gt;# 404&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our own guide got this wrong for months. I wrote about fixing it in &lt;a href="https://dev.to/juanvqz/mdns-writing-guidelines-now-current-in-spanish-229c-temp-slug-790314"&gt;last week’s post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Anchors are worse, because nothing fails. Translating a heading changes its id, so &lt;code&gt;#browser_compatibility&lt;/code&gt; does not exist on a Spanish page. A link that keeps it drops the reader at the top instead of the section. And the Spanish id is not always what the terms table says: the Spanish Fetch API page renders &lt;code&gt;#compatibilidad_de_navegadores&lt;/code&gt;, not &lt;code&gt;con&lt;/code&gt;. Check the real page instead of guessing. Any MDN URL with &lt;code&gt;/index.json&lt;/code&gt; on the end returns the rendered page, headings and all:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sL&lt;/span&gt; https://developer.mozilla.org/es/docs/Web/API/Fetch_API/index.json | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-oE&lt;/span&gt; &lt;span class="s1"&gt;'"id":"[^"]+"'&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the target page is translated, use its Spanish id. If it isn’t, drop the fragment and link to the page.&lt;/p&gt;




&lt;h2&gt;
  
  
  Leave the Page Easy to Update
&lt;/h2&gt;

&lt;p&gt;Every Spanish page carries this in its front matter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;l10n&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sourceCommit&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ca0b474bb2e153ce72718cb304306e540065a888&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is the English commit your translation matches. When you finish a page, set it to the latest commit of the English file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh api &lt;span class="s2"&gt;"repos/mdn/content/commits?path=files/en-us/&amp;lt;path&amp;gt;/index.md&amp;amp;per_page=1"&lt;/span&gt; &lt;span class="nt"&gt;--jq&lt;/span&gt; &lt;span class="s1"&gt;'.[0].sha'&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With it, the next person asks a cheap question: what changed in English since then? Without it, the only way to know whether a Spanish page is current is to read both versions in full. That is how most of the pages in our current tracker fell years behind.&lt;/p&gt;

&lt;p&gt;If you only carried over part of the English changes, keep the old SHA until the rest is done.&lt;/p&gt;




&lt;h2&gt;
  
  
  Your First Page
&lt;/h2&gt;

&lt;p&gt;Start with &lt;a href="https://github.com/mdn/translated-content/issues/9638" rel="noopener noreferrer"&gt;issue #9638&lt;/a&gt;, &lt;em&gt;Has English content [es]&lt;/em&gt;. It lists Spanish pages that fell behind English, split into one subtask per page and sorted from shortest to longest. Each subtask already has the English source path, the Spanish file, the line count, and the differences we found. As of today 42 are open.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the &lt;a href="https://github.com/mdn/translated-content/blob/main/docs/es/README.md" rel="noopener noreferrer"&gt;Spanish contributor guide&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Pick a subtask nobody has claimed, and &lt;strong&gt;comment on it before you start&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Update the whole file against the English source.&lt;/li&gt;
&lt;li&gt;Open your PR with &lt;code&gt;Fixes #&amp;lt;subtask&amp;gt;&lt;/code&gt;, not the parent issue, so the other subtasks stay open.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 2 is the one I underestimated. A contributor once spent an evening translating two pages I already had open PRs for, and neither of us knew until both sets of PRs were up. That was my fault as team lead, for not making claims visible. A one-line comment protects your evening.&lt;/p&gt;

&lt;p&gt;For anything else, filter by the &lt;a href="https://github.com/mdn/translated-content/issues?q=is%3Aissue+is%3Aopen+label%3Al10n-es" rel="noopener noreferrer"&gt;&lt;code&gt;l10n-es&lt;/code&gt;&lt;/a&gt; label.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where to Find Us
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Telegram&lt;/strong&gt; : the Spanish group, &lt;a href="https://t.me/+Dr6qKQCAepw4MjFj" rel="noopener noreferrer"&gt;t.me/+Dr6qKQCAepw4MjFj&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MDN Discord&lt;/strong&gt; : the &lt;code&gt;#spanish&lt;/code&gt; channel, &lt;a href="https://discord.gg/aZqEtMrbr7" rel="noopener noreferrer"&gt;discord.gg/aZqEtMrbr7&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PR comments&lt;/strong&gt; : tag any of the three of us.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ask in Spanish. That’s the point.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;The thing that surprised me most about leading the Spanish team is how little of it is translation.&lt;/p&gt;

&lt;p&gt;It’s noticing that our own guide had been telling people something false. It’s checking whether an anchor resolves instead of assuming. It’s writing “comment to claim it” in the issue body, the review reply and the welcome message, because saying it once means half the people never see it. It’s answering a first PR in a way that makes someone want to open a second one.&lt;/p&gt;

&lt;p&gt;If you speak Spanish and write code, the team behind &lt;code&gt;/es/&lt;/code&gt; is three people and there is more to do than we can reach. The page you update this weekend will be read by someone who never learns your name, and their afternoon goes a little better.&lt;/p&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/mdn/translated-content/blob/main/docs/es/README.md" rel="noopener noreferrer"&gt;Spanish contributor guide&lt;/a&gt;, the Spanish rules and everything else you need, start here&lt;a href="https://github.com/mdn/translated-content/blob/main/docs/es/entorno-local.md" rel="noopener noreferrer"&gt;Local environment guide&lt;/a&gt;, how to run MDN on your computer to preview your translations&lt;a href="https://github.com/mdn/translated-content/issues/9638" rel="noopener noreferrer"&gt;Issue #9638&lt;/a&gt;, one subtask per page, shortest first&lt;a href="https://github.com/mdn/translated-content/issues?q=is%3Aissue+is%3Aopen+label%3Al10n-es" rel="noopener noreferrer"&gt;&lt;code&gt;l10n-es&lt;/code&gt; issues&lt;/a&gt;, everything open for Spanish&lt;a href="https://github.com/mdn/translated-content/blob/main/PEERS_GUIDELINES.md" rel="noopener noreferrer"&gt;Peer guidelines&lt;/a&gt;, the review team per locale&lt;/p&gt;

</description>
      <category>mdn</category>
      <category>localization</category>
      <category>opensource</category>
      <category>spanish</category>
    </item>
    <item>
      <title>MDN's Writing Guidelines, Now Current in Spanish</title>
      <dc:creator>Juan Vasquez</dc:creator>
      <pubDate>Tue, 15 Sep 2026 15:00:00 +0000</pubDate>
      <link>https://dev.to/juanvqz/mdns-writing-guidelines-now-current-in-spanish-1iib</link>
      <guid>https://dev.to/juanvqz/mdns-writing-guidelines-now-current-in-spanish-1iib</guid>
      <description>&lt;p&gt;In August the Spanish locale of MDN closed &lt;a href="https://github.com/mdn/translated-content/issues/35373" rel="noopener noreferrer"&gt;issue #35373&lt;/a&gt;: every page under &lt;code&gt;/es/docs/MDN/Writing_guidelines&lt;/code&gt;, 60 documents, synchronized with the English source. It took 114 days and 62 merged pull requests, almost all from five volunteers. I lead the Spanish team on MDN, so I split the issue, reviewed the PRs, and translated some of the pages myself.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Section Came First
&lt;/h2&gt;

&lt;p&gt;The request did not start with us. By July 2023 the English Writing Guidelines had been updated to match how MDN now formats content, particularly that it uses Prettier. While formatting the translated pages, &lt;a href="https://github.com/queengooborg" rel="noopener noreferrer"&gt;Queen Vinyl Da.i’gyu-Kazotetsu&lt;/a&gt; noticed that a number of the localized guideline pages were out of sync and opened &lt;a href="https://github.com/mdn/translated-content/issues/14373" rel="noopener noreferrer"&gt;issue #14373&lt;/a&gt;, asking every locale to resynchronize the section. When Graywolf9, from the Spanish team, asked about the scope, they answered that these pages were “a slightly higher priority, as they define the guidelines for writing and formatting MDN content, which cascades down to writing translated pages as well.”&lt;/p&gt;

&lt;p&gt;Most people who read MDN in Spanish will never open these pages. They are the rules for writing MDN itself: how code examples are formatted, how links and images work, how content gets retired. But every reader feels them, because every Spanish page was written by someone following them.&lt;/p&gt;

&lt;p&gt;When the rules are wrong or out of date, the reader is the one who pays:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A link to a section drops them at the top of the page, because the translator kept an English anchor that doesn’t exist in Spanish.&lt;/li&gt;
&lt;li&gt;A warning that should stand out in a box shows up as a plain quote, because the callout keyword got translated.&lt;/li&gt;
&lt;li&gt;A screenshot stays stale after the English one changes, because someone copied the image into the Spanish folder. The Spanish React getting-started page showed &lt;code&gt;create-react-app&lt;/code&gt; long after the English page had moved to Vite.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The reader never learns that a guideline was behind. They see a Spanish page that is worse than the English one, and they go back to English.&lt;/p&gt;

&lt;p&gt;That is the cascade they meant. Spanish sat on that request for almost three years. For all that time, every contributor who read the rules in Spanish first learned a version English contributors had already moved past, and every page they translated inherited it. When we finally opened our own tracker in April 2026, several Spanish guideline pages were still out of date and some did not exist. Simplified Chinese and French finished before us. Spanish was the third locale to close its part of #14373, and Japanese, Korean, Brazilian Portuguese, Russian and Traditional Chinese are still open.&lt;/p&gt;




&lt;h2&gt;
  
  
  Checkboxes Lie
&lt;/h2&gt;

&lt;p&gt;The issue had 58 subtasks, one per document, all checked. My first instinct was to read that as “done.”&lt;/p&gt;

&lt;p&gt;It wasn’t. A checklist is a snapshot of the day the subtasks were created. Two English pages (&lt;code&gt;howto/retiring_content&lt;/code&gt; and &lt;code&gt;retired_content&lt;/code&gt;) landed in &lt;code&gt;mdn/content&lt;/code&gt; on May 11, three weeks after I split the issue on April 20. They had no subtask and no one was tracking them.&lt;/p&gt;

&lt;p&gt;The reliable check compares the English and Spanish directories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;comm&lt;/span&gt; &lt;span class="nt"&gt;-23&lt;/span&gt; &amp;lt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;content/files/en-us/mdn/writing_guidelines &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-name&lt;/span&gt; index.md | &lt;span class="nb"&gt;sort&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
         &amp;lt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;translated-content/files/es/mdn/writing_guidelines &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-name&lt;/span&gt; index.md | &lt;span class="nb"&gt;sort&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Empty output means every English page has a Spanish counterpart. Run it the other way (&lt;code&gt;comm -13&lt;/code&gt;) to catch Spanish pages whose English source moved or was deleted, which leaves orphan translations at a slug nobody links to.&lt;/p&gt;

&lt;p&gt;When that printed nothing in both directions, we were done. The two missing pages became subtasks #37427 and #37428, and their PRs merged on the last day.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;code&gt;sourceCommit&lt;/code&gt; Is the Ledger
&lt;/h2&gt;

&lt;p&gt;Every Spanish page on MDN carries this in its front matter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Contenido retirado&lt;/span&gt;
&lt;span class="na"&gt;slug&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;MDN/Writing_guidelines/Howto/Retiring_content/Retired_content&lt;/span&gt;
&lt;span class="na"&gt;l10n&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sourceCommit&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ca0b474bb2e153ce72718cb304306e540065a888&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That SHA is the English commit the Spanish text was translated from. It is the difference between a section you can keep current and one you have to reread in full every time.&lt;/p&gt;

&lt;p&gt;Checking it is one API call per page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh api &lt;span class="s2"&gt;"repos/mdn/content/commits?path=files/en-us/&amp;lt;path&amp;gt;/index.md&amp;amp;per_page=1"&lt;/span&gt; &lt;span class="nt"&gt;--jq&lt;/span&gt; &lt;span class="s1"&gt;'.[0].sha'&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the end, ten of our 60 pages were behind. That sounded alarming until I looked at what changed upstream: &lt;code&gt;fulfil&lt;/code&gt; to &lt;code&gt;fulfill&lt;/code&gt;, &lt;code&gt;a HTTP&lt;/code&gt; to &lt;code&gt;an HTTP&lt;/code&gt;, a CC0 link, a few spelling-bot commits. English spelling chores with nothing to carry over into Spanish.&lt;/p&gt;

&lt;p&gt;So the closing PR moved ten SHAs and changed no Spanish text. The value is in what it prevents: the next person checking the Spanish section for staleness gets a clean report instead of ten false alarms to investigate one by one.&lt;/p&gt;




&lt;h2&gt;
  
  
  Verify the Upstream “Fix” Before You Copy It
&lt;/h2&gt;

&lt;p&gt;One of those upstream commits rewrote a GitHub docs URL in &lt;code&gt;howto/images_media&lt;/code&gt;. I copied it into the Spanish page, then checked the link out of habit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}'&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; &lt;span class="s2"&gt;"https://docs.github.com/en/pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request"&lt;/span&gt;
&lt;span class="c"&gt;# 404&lt;/span&gt;

curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}'&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; &lt;span class="s2"&gt;"https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request"&lt;/span&gt;
&lt;span class="c"&gt;# 200&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The “fixed” URL was the broken one. The Spanish page already had the working link, and my sync would have replaced it with a dead one to match the English.&lt;/p&gt;

&lt;p&gt;English is the source of truth for &lt;em&gt;content&lt;/em&gt;, not for &lt;em&gt;facts&lt;/em&gt;. Translating from it does not mean inheriting its broken links.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Fallback Our Guide Invented
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/mdn/translated-content/blob/main/docs/es/README.md" rel="noopener noreferrer"&gt;Spanish contributor guide&lt;/a&gt; told people that when a page is not translated, MDN shows the English one instead. It is how I explained &lt;code&gt;/es/&lt;/code&gt; links to new Spanish contributors for months.&lt;/p&gt;

&lt;p&gt;It’s false. A &lt;code&gt;/es/&lt;/code&gt; URL with no Spanish file is a 404:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /dev/null &lt;span class="nt"&gt;-w&lt;/span&gt; &lt;span class="s1"&gt;'%{http_code}'&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; https://developer.mozilla.org/es/docs/Learn_web_development/Core/Scripting/Functions
&lt;span class="c"&gt;# 404&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rule it supported, “always use &lt;code&gt;/es/&lt;/code&gt; in internal links,” is still right, for a different reason: it keeps the reader in Spanish, and the link starts working the moment the target is translated.&lt;/p&gt;

&lt;p&gt;But the anchor advice built on it was wrong. I had been telling translators to keep the English fragment, like &lt;code&gt;#browser_compatibility&lt;/code&gt;, on links to untranslated pages, “because MDN will serve English there.” There is no page there to serve.&lt;/p&gt;

&lt;p&gt;The corrected rule, now in the guide: if the target page exists in Spanish, use its Spanish heading id. If it doesn’t, drop the fragment and keep the page link.&lt;/p&gt;

&lt;p&gt;A wrong sentence in the Spanish guide does not produce one bug. It produces one bug per Spanish contributor who reads it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Spanish Rules That Showed Up in Every Review
&lt;/h2&gt;

&lt;p&gt;These came up often enough that they are now written into the Spanish guide:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API names keep English word order.&lt;/strong&gt; &lt;code&gt;Canvas API&lt;/code&gt;, not “API Canvas.” Spanish puts the noun first, so flipping it reads natural, but the name is a proper noun. The article goes in front of the whole thing: &lt;em&gt;la Canvas API quedó obsoleta&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Callout keywords stay in English.&lt;/strong&gt; &lt;code&gt;&amp;gt; [!NOTE]&lt;/code&gt; renders as a styled box. &lt;code&gt;&amp;gt; [!Nota]&lt;/code&gt; renders as a plain quote. The build puts “Nota” on the box for you. The text inside the box is what you translate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Translated headings change their anchors.&lt;/strong&gt; &lt;code&gt;## Browser compatibility&lt;/code&gt; becomes &lt;code&gt;## Compatibilidad con navegadores&lt;/code&gt;, and its id changes with it. A link that only swaps &lt;code&gt;/en-US/&lt;/code&gt; for &lt;code&gt;/es/&lt;/code&gt; and keeps &lt;code&gt;#browser_compatibility&lt;/code&gt; drops the reader at the top of the page. And you cannot guess the Spanish id either: the guide’s convention is &lt;em&gt;Compatibilidad con navegadores&lt;/em&gt;, but the Spanish Fetch API page renders &lt;code&gt;#compatibilidad_de_navegadores&lt;/code&gt;. Check the real page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sL&lt;/span&gt; https://developer.mozilla.org/es/docs/Web/API/Fetch_API/index.json | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-oE&lt;/span&gt; &lt;span class="s1"&gt;'"id":"[^"]+"'&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Images don’t get copied into &lt;code&gt;files/es/&lt;/code&gt;.&lt;/strong&gt; When a Spanish page references an image that only exists in English, the build points it at the &lt;code&gt;/en-US/&lt;/code&gt; file. Translate the &lt;code&gt;alt&lt;/code&gt; text, leave the binary alone. Only images whose content is Spanish, like a screenshot of a Spanish interface, belong in &lt;code&gt;files/es/&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Part That Isn’t Technical
&lt;/h2&gt;

&lt;p&gt;The most expensive mistake of the project had nothing to do with markdown.&lt;/p&gt;

&lt;p&gt;I opened PRs for &lt;code&gt;Retiring_content&lt;/code&gt; and &lt;code&gt;Retired_content&lt;/code&gt; on July 31. Another contributor opened PRs for the same two pages on August 6, translated from scratch. Neither of us knew.&lt;/p&gt;

&lt;p&gt;That is someone’s evening spent on work that can’t merge, and it’s on us as the team, not on them. The subtasks existed. A visible reservation on them did not.&lt;/p&gt;

&lt;p&gt;The convention is “comment on the subtask to claim it.” It works when people know about it, which means it has to be in the issue body, in review replies, and in the welcome message for first-time contributors, every time.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Numbers
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Started&lt;/td&gt;
&lt;td&gt;April 20, 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Finished&lt;/td&gt;
&lt;td&gt;August 12, 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Duration&lt;/td&gt;
&lt;td&gt;114 days (16 weeks)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Documents&lt;/td&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subtasks&lt;/td&gt;
&lt;td&gt;60 (58 planned + 2 that appeared later)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Merged PRs&lt;/td&gt;
&lt;td&gt;62&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pace&lt;/td&gt;
&lt;td&gt;~1 page every 2 days&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Four months for 60 pages is not fast. The number I care about is that no week went by without something merging. That is the hard part of a volunteer locale. Starting is easy. Week 11 is where these things die.&lt;/p&gt;

&lt;p&gt;Most of the credit belongs to &lt;a href="https://github.com/mariomorillo" rel="noopener noreferrer"&gt;Mario Morillo&lt;/a&gt;, who wrote 37 of those 62 PRs and reviewed many of the rest. &lt;a href="https://github.com/EmilianoBecerra" rel="noopener noreferrer"&gt;EmilianoBecerra&lt;/a&gt;, &lt;a href="https://github.com/GNUXDAR" rel="noopener noreferrer"&gt;Arturo Cabrera&lt;/a&gt; and &lt;a href="https://github.com/MasterIfeanyi" rel="noopener noreferrer"&gt;Ifeanyi Chima&lt;/a&gt; wrote most of the others with me.&lt;/p&gt;




&lt;h2&gt;
  
  
  What We Kept for the Next Spanish Tracker
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;One page per subtask.&lt;/strong&gt; Not “sync the section.” A newcomer can look at it and know whether they can finish it tonight.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sort subtasks shortest to longest.&lt;/strong&gt; A first page of 116 lines instead of 900 is the difference between someone starting and someone closing the tab.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put the homework in the subtask.&lt;/strong&gt; English source path, Spanish target file, line count, tracked SHA vs latest SHA, and the differences already found. Nobody should have to investigate before they can translate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify by directory, not by checkbox.&lt;/strong&gt; That is what caught the two missing pages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bump &lt;code&gt;sourceCommit&lt;/code&gt; when you close.&lt;/strong&gt; Otherwise the next sync starts from zero, which is how this section needed a 60-page tracker in the first place.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That process now runs &lt;a href="https://github.com/mdn/translated-content/issues/9638" rel="noopener noreferrer"&gt;issue #9638&lt;/a&gt;, &lt;em&gt;Has English content [es]&lt;/em&gt;. It was opened in 2022 to list Spanish pages that still had untranslated English in them. For a reader, those are the pages where you switch to Spanish and still hit paragraphs in English. The English was only the symptom: most of those pages had fallen years behind the English source, so the Spanish parts can describe an API as it was, not as it is. As of today, 63 of its 105 subtasks are done and 42 are open, sorted shortest first, each with its sync status already worked out.&lt;/p&gt;

&lt;p&gt;If you read Spanish and want a first open source contribution with a well-scoped task waiting for you, that’s the issue. Comment on a subtask to claim it, and open your PR with &lt;code&gt;Fixes #&amp;lt;subtask&amp;gt;&lt;/code&gt;, not the parent, so the rest stay open. Start with the &lt;a href="https://github.com/mdn/translated-content/blob/main/docs/es/README.md" rel="noopener noreferrer"&gt;Spanish contributor guide&lt;/a&gt;, and next week’s post, &lt;a href="https://www.juanvasquez.dev/blog/contributing-to-mdn-in-your-language/" rel="noopener noreferrer"&gt;Contributing to MDN in Spanish&lt;/a&gt;, walks through the rest.&lt;/p&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/mdn/translated-content/issues/35373" rel="noopener noreferrer"&gt;Issue #35373&lt;/a&gt;, the Writing Guidelines tracker&lt;a href="https://github.com/mdn/translated-content/issues/9638" rel="noopener noreferrer"&gt;Issue #9638&lt;/a&gt;, the next one, 42 subtasks open&lt;a href="https://github.com/mdn/translated-content/blob/main/docs/es/README.md" rel="noopener noreferrer"&gt;Spanish contributor guide&lt;/a&gt;, the Spanish rules and everything else you need, start here&lt;a href="https://github.com/mdn/translated-content/blob/main/docs/es/entorno-local.md" rel="noopener noreferrer"&gt;Local environment guide&lt;/a&gt;, how to run MDN on your computer to preview your translations&lt;/p&gt;

</description>
      <category>mdn</category>
      <category>localization</category>
      <category>opensource</category>
      <category>spanish</category>
    </item>
  </channel>
</rss>
