<?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>Forem: Josua Schmid</title>
    <description>The latest articles on Forem by Josua Schmid (@schmijos).</description>
    <link>https://forem.com/schmijos</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F402131%2Fb13f2d0f-034a-4f26-b1da-92f2a1e8be10.jpeg</url>
      <title>Forem: Josua Schmid</title>
      <link>https://forem.com/schmijos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/schmijos"/>
    <language>en</language>
    <item>
      <title>Laggy Logitec and M1</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Tue, 24 Mar 2026 09:50:14 +0000</pubDate>
      <link>https://forem.com/schmijos/laggy-logitec-and-m1-3h02</link>
      <guid>https://forem.com/schmijos/laggy-logitec-and-m1-3h02</guid>
      <description>&lt;p&gt;I had a stuttering laggy bluetooth mouse (Logitec) on my M1 Macbook (macOS Sequoia). The solution was to disable handoff. Now it moves smooth.&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.amazonaws.com%2Fuploads%2Farticles%2F5tygd0jmj5xh1ffc0vo5.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.amazonaws.com%2Fuploads%2Farticles%2F5tygd0jmj5xh1ffc0vo5.png" alt=" " width="800" height="814"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>macbook</category>
      <category>logitec</category>
      <category>mouse</category>
    </item>
    <item>
      <title>Autostart OpenRecall</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Tue, 03 Mar 2026 08:55:43 +0000</pubDate>
      <link>https://forem.com/schmijos/autostart-openrecall-2f87</link>
      <guid>https://forem.com/schmijos/autostart-openrecall-2f87</guid>
      <description>&lt;p&gt;I'm running &lt;a href="https://github.com/openrecall/openrecall" rel="noopener noreferrer"&gt;OpenRecall&lt;/a&gt; to record my screen and index the screenshots. To start it automatically on login on my Macbook, I installed an AppleScript automation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight applescript"&gt;&lt;code&gt;&lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="nb"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nv"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

    &lt;/span&gt;&lt;span class="k"&gt;tell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;application&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"iTerm"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nb"&gt;activate&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nv"&gt;create&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;window&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;default&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;profile&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="k"&gt;tell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;current&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;session&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;current&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;window&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nb"&gt;write&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;text&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cd /Users/josua/p/openrecall/ &amp;amp;&amp;amp; python3 -m openrecall.app"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;tell&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;tell&lt;/span&gt;&lt;span class="w"&gt;

    &lt;/span&gt;&lt;span class="nb"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;input&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;run&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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.amazonaws.com%2Fuploads%2Farticles%2Fn5dg06d4wogkh18y5wfp.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.amazonaws.com%2Fuploads%2Farticles%2Fn5dg06d4wogkh18y5wfp.png" alt=" " width="800" height="697"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On save (CMD+S) this will create an app under services which you can then install as login item.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>applescript</category>
    </item>
    <item>
      <title>Shopify's 2000</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Fri, 19 Sep 2025 22:05:55 +0000</pubDate>
      <link>https://forem.com/renuo/shopifys-2000-175l</link>
      <guid>https://forem.com/renuo/shopifys-2000-175l</guid>
      <description>&lt;p&gt;Since &lt;a href="https://renuo.ch" rel="noopener noreferrer"&gt;Renuo&lt;/a&gt; is a member of the &lt;a href="https://rubyonrails.org/foundation/renuo" rel="noopener noreferrer"&gt;Rails Foundation&lt;/a&gt;, &lt;a class="mentioned-user" href="https://dev.to/coorasse"&gt;@coorasse&lt;/a&gt; and me were invited to the speakers dinner at Rails World 2025.&lt;/p&gt;

&lt;p&gt;We met people from Shopify and we started discussing. What do they even know about the one-man-agency-Rails we're using in our agency? They have their huge Rails 0.5 originated monolith and are &lt;a href="https://shopify.engineering/deconstructing-monolith-designing-software-maximizes-developer-productivity" rel="noopener noreferrer"&gt;proud of it&lt;/a&gt;. Don't they over-optimize for the monolith case? Far-from-agency-reality use cases, right?&lt;/p&gt;

&lt;p&gt;What I did not know until that point was that Shopify has 2000 further Rails applications running. They know our agency problems better than you might think.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Small Dev Fascination</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Fri, 12 Sep 2025 08:12:21 +0000</pubDate>
      <link>https://forem.com/renuo/small-dev-fascination-303d</link>
      <guid>https://forem.com/renuo/small-dev-fascination-303d</guid>
      <description>&lt;p&gt;I host a meetup called &lt;a href="https://www.meetup.com/rubyonrails-ch" rel="noopener noreferrer"&gt;Railshöck&lt;/a&gt; in Zürich. From time to time someone shows up and holds a presentation from another world. They have small companies with one or two employees and they custom-tailor their Rails workflow to an extent which fascinates me. They own their development stack so completely that it's difficult to understand what they do at all. But it works for them in their own bubble. Without the need to share conventions over a large company.&lt;/p&gt;

&lt;p&gt;The latest two examples I want to mention are &lt;a href="https://sedlmair.ch/" rel="noopener noreferrer"&gt;Christian Seldmair&lt;/a&gt; with &lt;a href="https://svelte-on-rails.dev/" rel="noopener noreferrer"&gt;Svelte on Rails&lt;/a&gt; and &lt;a href="https://kalsan.ch/" rel="noopener noreferrer"&gt;Sandro Kalbermatter&lt;/a&gt; with &lt;a href="https://github.com/kalsan/compony" rel="noopener noreferrer"&gt;compony&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Svelte on Rails&lt;/strong&gt; is the realisation of the fact that you may want to sprinkle some reactiveness into your frontend without having the flicker effect like with Stimulus connects (worked around with the morph-dom and turbo). It's quite an elegant niche solution for a very interesting Rails problem using vite and server side rendering.&lt;/p&gt;

&lt;p&gt;And &lt;strong&gt;compony&lt;/strong&gt; is sheer DSL madness made exactly for the brain of Sandro. But because it's so productive for him, he discovered a new software design pattern. It's called the &lt;a href="https://github.com/kalsan/anchormodel" rel="noopener noreferrer"&gt;Anchor Model&lt;/a&gt;. It solves the problem of singleton database entities (think enum).&lt;/p&gt;

</description>
      <category>rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Customize the Rails Console</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Fri, 13 Jun 2025 12:25:13 +0000</pubDate>
      <link>https://forem.com/schmijos/customize-the-rails-console-3igo</link>
      <guid>https://forem.com/schmijos/customize-the-rails-console-3igo</guid>
      <description>&lt;p&gt;You can configure what happens when running &lt;code&gt;rails console&lt;/code&gt; with the &lt;code&gt;console&lt;/code&gt; block in &lt;code&gt;application.rb&lt;/code&gt;. Here I register a custom descendant of the Rails IRB console to change coloring:&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;console&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s2"&gt;"rails/commands/console/irb_console.rb"&lt;/span&gt;

  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CloudyConsole&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Console&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;IRBConsole&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;colorized_env&lt;/span&gt;
      &lt;span class="k"&gt;if&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;production?&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"HEROKU_APP_NAME"&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="sr"&gt;/-develop|-staging/&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="no"&gt;IRB&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;colorize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"prod"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:YELLOW&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
        &lt;span class="k"&gt;end&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sb"&gt;`hostname`&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;/develop-/&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="no"&gt;IRB&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;colorize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"prod"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:YELLOW&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
        &lt;span class="k"&gt;end&lt;/span&gt;
      &lt;span class="k"&gt;end&lt;/span&gt;

      &lt;span class="k"&gt;super&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&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;console&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;CloudyConsole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&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;application&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;



</description>
      <category>rails</category>
      <category>ruby</category>
      <category>cli</category>
    </item>
    <item>
      <title>The Testing Psyche</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Tue, 29 Apr 2025 08:15:39 +0000</pubDate>
      <link>https://forem.com/renuo/the-testing-psyche-3pjg</link>
      <guid>https://forem.com/renuo/the-testing-psyche-3pjg</guid>
      <description>&lt;p&gt;I'm only seeing dots when my Ruby RSpec test suite is running. But a lot is going on in my brain.&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.amazonaws.com%2Fuploads%2Farticles%2Fgpk7ooa3vp1rg71jmruc.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.amazonaws.com%2Fuploads%2Farticles%2Fgpk7ooa3vp1rg71jmruc.png" alt="Image description" width="800" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Are the failing tests related in an easy-to-fix way or not?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;These are either very easy to fix, because they are close together. It's probably about one conceptual fix. Or the test file can be deleted because the implementation vanished.&lt;/li&gt;
&lt;li&gt;I hope, this is related in a predictable way, like that I'm calling the service which is broken or vanished.&lt;/li&gt;
&lt;li&gt;Oh-oh is there a case-distinction? I hope the &lt;code&gt;FF&lt;/code&gt; correspond to the &lt;code&gt;FF&lt;/code&gt; in 1.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Resolution&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;Factory not registered: "user"&lt;/code&gt;. Good for me. I know that I deleted it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Missing partial shared/emails/loyalty/_email_salutation&lt;/code&gt;. What now? This seems weirdly unrelated. No idea why this happens.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;undefined local variable or method 'user'&lt;/code&gt;. Good for me. This is in fact related to 1.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ruby</category>
      <category>tdd</category>
      <category>rspec</category>
    </item>
    <item>
      <title>web-console and processes</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Tue, 15 Apr 2025 08:17:50 +0000</pubDate>
      <link>https://forem.com/renuo/web-console-and-processes-m89</link>
      <guid>https://forem.com/renuo/web-console-and-processes-m89</guid>
      <description>&lt;p&gt;Sometimes I see &lt;code&gt;No exception information available&lt;/code&gt; in &lt;a href="https://github.com/rails/web-console" rel="noopener noreferrer"&gt;web-console&lt;/a&gt;.&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.amazonaws.com%2Fuploads%2Farticles%2Fkoep96y3xtnhulh3pfbv.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.amazonaws.com%2Fuploads%2Farticles%2Fkoep96y3xtnhulh3pfbv.png" alt="web-console failing me" width="800" height="253"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Digging in the &lt;a href="https://github.com/rails/web-console/blob/859bc60340e15b27f57ef345f0439f2a4d2bf9dc/lib/web_console/locales/en.yml#L6" rel="noopener noreferrer"&gt;web-console source&lt;/a&gt; finds me this:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you happen to run on a multi-process server (like Unicorn or Puma) the process this request hit doesn't store %{id} in memory. Consider turning the number of processes/workers to one (1) or using a different server in development.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So I look at my &lt;code&gt;config/puma.rb&lt;/code&gt;, change it and never see this error message again.&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.amazonaws.com%2Fuploads%2Farticles%2F3hozpdur0mdyt9zrgg4t.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.amazonaws.com%2Fuploads%2Farticles%2F3hozpdur0mdyt9zrgg4t.png" alt="Image description" width="800" height="182"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>debugging</category>
    </item>
    <item>
      <title>Catch JS Errors with Playwright</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Wed, 26 Mar 2025 11:18:25 +0000</pubDate>
      <link>https://forem.com/renuo/catch-js-errors-with-playwright-4ekm</link>
      <guid>https://forem.com/renuo/catch-js-errors-with-playwright-4ekm</guid>
      <description>&lt;p&gt;Selenium has issues. I'm using it with Capybara and the latest encounter was a &lt;a href="https://github.com/teamcapybara/capybara/issues/2770" rel="noopener noreferrer"&gt;&lt;code&gt;Net::ReadTimeout&lt;/code&gt;&lt;/a&gt;. I switched to Playwright following &lt;a href="https://justin.searls.co/posts/running-rails-system-tests-with-playwright-instead-of-selenium" rel="noopener noreferrer"&gt;Justin Searls guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One issue I encountered after the migration was that browser console logs were not accessible anymore with &lt;code&gt;page.driver.browser.logs.get(:browser)&lt;/code&gt;. We use them to fail tests on JavaScript errors.&lt;/p&gt;

&lt;p&gt;One solution is to record them from the Playwright page with an event handler.&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;before&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:each&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;type: :system&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;js: &lt;/span&gt;&lt;span class="kp"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&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;example&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
  &lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:js_console_messages&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="no"&gt;Capybara&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;current_session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;with_playwright_page&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;page&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
    &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'console'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;lambda&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
      &lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:js_console_messages&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="ss"&gt;type: &lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="ss"&gt;text: &lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="ss"&gt;location: &lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;location&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&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;after&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:each&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;type: :system&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;js: &lt;/span&gt;&lt;span class="kp"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&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;example&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:js_console_messages&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;present?&lt;/span&gt;
    &lt;span class="n"&gt;aggregate_failures&lt;/span&gt; &lt;span class="s1"&gt;'javascript console messages'&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
      &lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:js_console_messages&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;each&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;msg&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:type&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;'error'&lt;/span&gt;
          &lt;span class="n"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:text&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="nf"&gt;to&lt;/span&gt; &lt;span class="n"&gt;be_nil&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"JS Error: &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:text&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
        &lt;span class="k"&gt;elsif&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:type&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;'warning'&lt;/span&gt;
          &lt;span class="nb"&gt;warn&lt;/span&gt; &lt;span class="s2"&gt;"WARN: JS warning at &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:location&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:text&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
        &lt;span class="k"&gt;end&lt;/span&gt;
      &lt;span class="k"&gt;end&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output of a failed test will look like this:&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.amazonaws.com%2Fuploads%2Farticles%2F37986nfyw1t2kz9rshxj.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.amazonaws.com%2Fuploads%2Farticles%2F37986nfyw1t2kz9rshxj.png" alt="page.execute_script('inexistentFunction()') causes Playwright::Error" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The previous solution to simply look at &lt;code&gt;page.driver.browser.logs.get(:browser)&lt;/code&gt; felt more natural to me. I'd be happy to receive a hint on how to catch JS errors in Ruby more nicely. &lt;/p&gt;

</description>
      <category>capybara</category>
      <category>selenium</category>
      <category>playwright</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Much Compliance and Config</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Thu, 21 Mar 2024 10:05:54 +0000</pubDate>
      <link>https://forem.com/renuo/much-compliance-and-config-2kda</link>
      <guid>https://forem.com/renuo/much-compliance-and-config-2kda</guid>
      <description>&lt;p&gt;Dear developers&lt;/p&gt;

&lt;p&gt;Please refrain from creating GitHub repositories like this one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffh6bgg6eq4utb143bc3b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffh6bgg6eq4utb143bc3b.png" alt="GitHub directory tree" width="552" height="1622"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The main thing you want to show me is your code. What you need is the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;README.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LICENSE.md&lt;/code&gt; (maybe, mention it in &lt;code&gt;README.md&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;main.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;package.json&lt;/code&gt;, &lt;code&gt;package-lock.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.env.sample&lt;/code&gt; (maybe)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are 6 files. I don't want to juggle 16 files in my brain to find what I'm looking for in the repo root directory. Please use folders to hide what one doesn't need to see at a first glance.&lt;/p&gt;

&lt;p&gt;If you want another example of how all this configuration madness spoils my greppability of code bases, have a look at what JavaScript did to Rails in my &lt;a href="https://discuss.rubyonrails.org/t/since-when-are-half-the-files-in-the-rails-root-folder-for-javascript/75019"&gt;May of WTF post&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>github</category>
      <category>javascript</category>
    </item>
    <item>
      <title>standardrb, but more</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Thu, 08 Feb 2024 18:46:49 +0000</pubDate>
      <link>https://forem.com/renuo/standardrb-but-more-286m</link>
      <guid>https://forem.com/renuo/standardrb-but-more-286m</guid>
      <description>&lt;p&gt;Often project teams suffer from either too many or too strict &lt;a href="https://github.com/rubocop/rubocop"&gt;Rubocop&lt;/a&gt; rules (&lt;a href="https://docs.rubocop.org/rubocop/versioning.html#enablingdisabling-pending-cops-in-bulk"&gt;&lt;code&gt;NewCops&lt;/code&gt;&lt;/a&gt;) or from outdated ones because they locked the rules or Rubocop versions. &lt;a href="https://github.com/standardrb/standard"&gt;standardrb&lt;/a&gt; provides a good middle ground for people who care but also don't care fanatically. Its default settings are optimized for long-term maintainability and no-bikeshed. But we at &lt;a href="https://www.renuo.ch"&gt;Renuo&lt;/a&gt; are still missing a lot of rules, especially from Rubocop plugins like RSpec or performance cops. Since standardrb relies on Rubocop under the hood, there's an easy way for you to use a default but extended configuration. Simply opt-in to the rules you want while relying on standardrb for the rest. This inverts the team discussion time needed for your style guide from discussing every rule to discussing opt-in-exceptions.&lt;/p&gt;

&lt;p&gt;If you want to have a look at our approach: we created a gem called &lt;a href="https://github.com/renuo/renuocop/"&gt;renuocop&lt;/a&gt;. Our &lt;a href="https://github.com/renuo/renuocop/blob/main/config/base.yml"&gt;config file&lt;/a&gt; documents what we think is not strict enough in standardrb.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rubocop</category>
      <category>linting</category>
    </item>
    <item>
      <title>8KB limit of Postgres NOTIFY</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Wed, 13 Dec 2023 14:20:32 +0000</pubDate>
      <link>https://forem.com/schmijos/8kb-limit-of-postgres-notify-56g7</link>
      <guid>https://forem.com/schmijos/8kb-limit-of-postgres-notify-56g7</guid>
      <description>&lt;p&gt;You can setup Rails &lt;a href="https://guides.rubyonrails.org/action_cable_overview.html#postgresql-adapter" rel="noopener noreferrer"&gt;&lt;em&gt;ActionCable&lt;/em&gt;&lt;/a&gt; to use Postgres instead of Redis by adjusting the adapter configuration:&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/cable.yml&lt;/span&gt;

&lt;span class="na"&gt;production&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;adapter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgresql&lt;/span&gt;
  &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;%= ENV["DATABASE_URL"] %&amp;gt;&lt;/span&gt;
  &lt;span class="na"&gt;channel_prefix&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;myapp_production&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This uses the Postgres &lt;a href="https://www.postgresql.org/docs/current/sql-listen.html" rel="noopener noreferrer"&gt;&lt;code&gt;LISTEN&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://www.postgresql.org/docs/current/sql-notify.html" rel="noopener noreferrer"&gt;&lt;code&gt;NOTIFY&lt;/code&gt;&lt;/a&gt; commands.&lt;/p&gt;

&lt;p&gt;As of writing, the &lt;code&gt;NOTIFY&lt;/code&gt; payload is limited to &lt;a href="https://www.postgresql.org/docs/current/sql-notify.html#:~:text=In%20the%20default%20configuration%20it%20must%20be%20shorter%20than%208000%20bytes" rel="noopener noreferrer"&gt;8000 bytes per default&lt;/a&gt;. If you're using &lt;em&gt;Hotwire&lt;/em&gt; this may not always be enough and you will see error messages like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PG::InvalidParameterValue (ERROR:  payload string too long)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The solutions available to you are the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure Postgres for larger payloads (not possible on Heroku)&lt;/li&gt;
&lt;li&gt;Use a fallback strategy for larger payloads as implemented in the &lt;a href="https://github.com/reclaim-the-stack/actioncable-enhanced-postgresql-adapter" rel="noopener noreferrer"&gt;actioncable-enhanced-postgresql-adapter&lt;/a&gt; gem.&lt;/li&gt;
&lt;li&gt;Use Redis instead (with its own &lt;a href="https://redis.io/docs/reference/clients/#output-buffer-limits" rel="noopener noreferrer"&gt;limits&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rails</category>
      <category>actioncable</category>
      <category>hotwire</category>
      <category>postgres</category>
    </item>
    <item>
      <title>0.x Major Releases</title>
      <dc:creator>Josua Schmid</dc:creator>
      <pubDate>Mon, 30 Oct 2023 08:20:37 +0000</pubDate>
      <link>https://forem.com/schmijos/0x-major-releases-2ef6</link>
      <guid>https://forem.com/schmijos/0x-major-releases-2ef6</guid>
      <description>&lt;p&gt;Dear Ruby gem maintainers&lt;/p&gt;

&lt;p&gt;Are you aware that &lt;code&gt;0.x&lt;/code&gt; releases of your libraries have to be treated as major releases by me? – Even and especially if you're following semantic versioning (see &lt;a href="https://semver.org/#spec-item-4"&gt;https://semver.org/#spec-item-4&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;In the list of my &lt;a href="https://depfu.com/"&gt;Depfu&lt;/a&gt; updates I more and more often receive lists like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe6nbpavjpi8lhnxqak16.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe6nbpavjpi8lhnxqak16.png" alt="Image description" width="777" height="836"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I feel that you're bailing out of your responsibility for compatibility that we all owe to Matz. You should have every right to change everything you want in your code, but why not simply bump the correct version number part when you do that? Are you afraid of real first digit major versions?&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>programming</category>
      <category>versioning</category>
    </item>
  </channel>
</rss>
