<?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: Rob Bazinet</title>
    <description>The latest articles on DEV Community by Rob Bazinet (@rbazinet).</description>
    <link>https://dev.to/rbazinet</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%2F39182%2F8c6fd65b-6063-47a0-b664-01d84bb7d5aa.jpeg</url>
      <title>DEV Community: Rob Bazinet</title>
      <link>https://dev.to/rbazinet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rbazinet"/>
    <language>en</language>
    <item>
      <title>How to Fix Rails Flash Rendering When Using Hotwire</title>
      <dc:creator>Rob Bazinet</dc:creator>
      <pubDate>Fri, 14 May 2021 13:06:31 +0000</pubDate>
      <link>https://dev.to/rbazinet/how-to-fix-rails-flash-rendering-when-using-hotwire-3o56</link>
      <guid>https://dev.to/rbazinet/how-to-fix-rails-flash-rendering-when-using-hotwire-3o56</guid>
      <description>&lt;p&gt;I added &lt;a href="https://hotwire.dev/"&gt;Hotwire&lt;/a&gt; to a &lt;a href="https://rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt; application I’ve been working on and discovered some issues when rendering flash messages. Yesterday I &lt;a href="https://dev.to/rbazinet/hotwire-fix-for-cors-error-when-using-omniauth-3k36"&gt;wrote about problems related to CORS error using OmniAuth&lt;/a&gt;.  Today’s is not as exciting but still as annoying.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;I was in the process of testing some validation changes I implemented and realized errors were not being displayed. I went through the typical debug scenarios and found that errors were being returned but just not displayed.&lt;/p&gt;

&lt;p&gt;The code consists of just trying to create a user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def create
  @user = User.new(user_params)
  if @user.save
    redirect_to root_path, notice: “User created successfully“
  else
    render :new
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When creating a user, the &lt;em&gt;new&lt;/em&gt; form rendered but errors were not displayed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;The reason the messages were not being displayed is because of &lt;a href="https://turbo.hotwire.dev/"&gt;Turbo&lt;/a&gt; and Rails UJS conflicting. Solving the problem can be done in one of two ways.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It appears Turbo expects form submissions to redirect to a new location. When there is an error, we are staying on the same page. Adding status: :unprocessable_entity to the render fixes the problem.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def create
  @user = User.new(user_params)
  if @user.save
    redirect_to root_path, notice: “User created successfully“
  else
    render :new, status: :unprocessable_entity 
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;A similar solution from &lt;a href="https://dev.to/rbazinet/hotwire-fix-for-cors-error-when-using-omniauth-3k36"&gt;yesterday’s post&lt;/a&gt; also works. Adding
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data: { turbo: false }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The form declaration disables turbo and lets Rails UJS handle as desired.&lt;/p&gt;

&lt;p&gt;I hope future versions of Turbo handle this better.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://accidentaltechnologist.com/ruby-on-rails/how-to-fix-rails-flash-rendering-when-using-hotwire/"&gt;How to Fix Rails Flash Rendering When Using Hotwire&lt;/a&gt; appeared first on &lt;a href="https://accidentaltechnologist.com"&gt;Accidental Technologist&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>hotwire</category>
      <category>rails</category>
      <category>turbo</category>
    </item>
    <item>
      <title>Hotwire Fix for CORS Error when using Omniauth</title>
      <dc:creator>Rob Bazinet</dc:creator>
      <pubDate>Thu, 13 May 2021 13:11:32 +0000</pubDate>
      <link>https://dev.to/rbazinet/hotwire-fix-for-cors-error-when-using-omniauth-3k36</link>
      <guid>https://dev.to/rbazinet/hotwire-fix-for-cors-error-when-using-omniauth-3k36</guid>
      <description>&lt;p&gt;I’ve been working on a small side project lately and having some fun trying some new &lt;a href="https://rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt; features.&lt;/p&gt;

&lt;p&gt;The application allows a user to authenticate using their Twitter account. I’m using the &lt;a href="https://github.com/arunagw/omniauth-twitter"&gt;omniauth-twitter gem&lt;/a&gt; to implement the Twitter strategy with OmniAuth. It works great; the user is redirected to Twitter to enter their Twitter username and password then sent back to the site with a token for the user’s account.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Everything was working great until I implement some of the HTML over the wire goodness of &lt;a href="https://hotwire.dev/"&gt;Hotwire&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I have a couple of areas on the site that rely on a &lt;a href="https://sidekiq.org/"&gt;Sidekiq&lt;/a&gt; and update a page when the job is complete. A perfect use case for Hotwire. The job processed, changes broadcast, and pages updated when the model changed. It worked as planned!&lt;/p&gt;

&lt;p&gt;I deployed the update using Hotwire, tested and everything was working as I wanted. Deciding to authenticate a different Twitter account, no longer was I sent to the Twitter page to enter my credentials. No error on the page; it just did no redirect.&lt;/p&gt;

&lt;p&gt;I looked for any errors in the Rails log. I could see the request initiated but it seemed to drop out of sight with nothing additional logged and no errors.&lt;/p&gt;

&lt;p&gt;Maybe it’s a browser-specific issue. I usually use Firefox so I tried Chrome and Safari with the same results. Digging a bit deeper I decided to look at the Network tab in the browser to see if the request was giving an error and I found nothing. The request wasn’t going out to Twitter.&lt;/p&gt;

&lt;p&gt;Inspecting the console in Firefox revealed this ugly message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Access to fetch at 'https://api.twitter.com/oauth/authenticate?oauth_token=&amp;lt;my secret token&amp;gt;' (redirected from 'http://127.0.0.1:3000/auth/twitter') from origin 'http://127.0.0.1:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I started to search around for the error, and many solutions had me trying the &lt;a href="https://github.com/cyu/rack-cors"&gt;rack-cors gem&lt;/a&gt; and other methods to satisfy what needed to be done. Nothing worked. I spent a couple of hours going down this path to no avail. The error is deceiving and not indicative of the real problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging
&lt;/h2&gt;

&lt;p&gt;I had done many updates since the last time I knew this worked, including gem and NPM package updates. After removing and testing each update, the message still appeared.&lt;/p&gt;

&lt;p&gt;I determined which code was updated since the feature recently worked. I evaluated and ranked each change by how much I thought it could cause the problem. The only change that was a bit of a black box to me was the addition of Hotwire to the mix. I removed the &lt;a href="https://github.com/hotwired/hotwire-rails"&gt;Hotwire-rails gem&lt;/a&gt; and removed all the code related to Hotwire and, moved back to Turbolinks. Magically it all worked again.&lt;/p&gt;

&lt;p&gt;Adding Hotwire caused this problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Solution
&lt;/h2&gt;

&lt;p&gt;Being new to Hotwire I wasn’t sure where to start. I started with what any good developer does…a Google search.&lt;/p&gt;

&lt;p&gt;I came across some posts on the &lt;a href="https://discuss.hotwire.dev/"&gt;Hotwire forums&lt;/a&gt; and on the &lt;a href="https://github.com/hotwired/turbo/issues"&gt;Devise Github issues list&lt;/a&gt; that provided a solution that worked. One, in particular, gave this solution:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It seems like adding&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:data =&amp;gt; {turbo: "false"}
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;and making my link a button seems to make it work as per: &lt;a href="https://github.com/hotwired/turbo/issues/45#issuecomment-753444256"&gt;Devise github login not working after Turbo enabled. · Issue #45 · hotwired/turbo · GitHub&lt;/a&gt;. I now have a different error, but that it something different. So I suppose this is solved for now.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The original button I used to connect with Twitter, looked 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;button_to "Connect a Twitter account", "/auth/twitter", method: :post, class: "btn btn-primary"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the suggestion above, it now looks 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;button_to "Connect a Twitter account", "/auth/twitter", method: :post, data: {turbo: "false"}, class: "btn btn-primary"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After adding the code to the button, it works as it did before. Simply don’t use Turbo for this type of request.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://turbo.hotwire.dev/handbook/drive#disabling-turbo-drive-on-specific-links-or-forms"&gt;Turbo docs do discuss disabling Turbo on specific links&lt;/a&gt;. The error I received did not do a good job of pointing me in the right direction and I spent some time going down the wrong path. I hope someone else can save some time if they have a similar problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Solving this problem was time-consuming, but I learned a bunch. Hotwire is in beta at this time. I’m sure things will improve, and maybe we don’t have to solve problems in this way in the future.&lt;/p&gt;

&lt;p&gt;A lesson I learned is the need for some better end-to-end tests for this project. I thought since it was going to Twitter and back, it wasn’t necessary. I was wrong.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://accidentaltechnologist.com/ruby-on-rails/hotwire-fix-for-cors-error-when-using-omniauth/"&gt;Hotwire Fix for CORS Error when using Omniauth&lt;/a&gt; appeared first on &lt;a href="https://accidentaltechnologist.com"&gt;Accidental Technologist&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>hotwire</category>
      <category>rails</category>
      <category>omniauth</category>
      <category>turbo</category>
    </item>
    <item>
      <title>Fix Installation of Ruby using rbenv on macOS Big Sur</title>
      <dc:creator>Rob Bazinet</dc:creator>
      <pubDate>Mon, 26 Apr 2021 13:30:26 +0000</pubDate>
      <link>https://dev.to/rbazinet/fix-installation-of-ruby-using-rbenv-on-macos-big-sur-3432</link>
      <guid>https://dev.to/rbazinet/fix-installation-of-ruby-using-rbenv-on-macos-big-sur-3432</guid>
      <description>&lt;p&gt;I’ve been using with &lt;a href="https://github.com/rbenv/rbenv"&gt;rbenv&lt;/a&gt; to manage installation and switching of Ruby versions for the pass year and have been very happy with it. I recently took the plunge and upgraded my main Apple MacBook Pro from macOS Catalina to Big Sur. Everything seemed to work well after the upgrade. Until I tried to install a new version of Ruby.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;When performing the usual command to install Ruby with rbenv, I started getting this message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~ $ rbenv install 2.6.7
Downloading ruby-2.6.7.tar.bz2...
-&amp;gt; https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.7.tar.bz2
Installing ruby-2.6.7...
ruby-build: using readline from homebrew

BUILD FAILED (macOS 11.2.3 using ruby-build 20210423)

Inspect or clean up the working tree at /var/folders/mq/tlm78wy92v54ygbzfykqc8640000gn/T/ruby-build.20210424214159.42314.u6mGui
Results logged to /var/folders/mq/tlm78wy92v54ygbzfykqc8640000gn/T/ruby-build.20210424214159.42314.log

Last 10 log lines:
        rb_native_mutex_destroy(&amp;amp;vm-&amp;gt;waitpid_lock);
        ^
vm.c:2489:34: warning: expression does not compute the number of elements in this array; element type is 'const int', not 'VALUE' (aka 'unsigned long') [-Wsizeof-array-div]
                             sizeof(ec-&amp;gt;machine.regs) / sizeof(VALUE));
                                    ~~~~~~~~~~~~~~~~ ^
vm.c:2489:34: note: place parentheses around the 'sizeof(VALUE)' expression to silence this warning
compiling dmyenc.c
1 warning and 1 error generated.
make: *** [vm.o] Error 1
make: *** Waiting for unfinished jobs....
~ $
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Trying to figure out the problem by looking at the message, it didn’t seem like something I could fix. Searching the &lt;a href="https://github.com/rbenv/rbenv/issues"&gt;rbenv Github issues&lt;/a&gt; didn’t give many clues. Knowing that rbenv uses &lt;a href="https://github.com/rbenv/ruby-build"&gt;ruby-build&lt;/a&gt; to automate the Ruby build process, I looked at the issues reported. It looks like I was not the only one having similar problems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PSiVH3lR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-24-at-21.51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PSiVH3lR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-24-at-21.51.png" alt="CleanShot 2021 04 24 at 21 51" title="CleanShot 2021-04-24 at 21.51.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I tried several of the suggestions found from those issues and none of the solutions worked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;I decided to turn to my friends on Twitter to see if anyone had faced this issue. Twitter never lets me down and &lt;a href="https://www.planetargon.com/about/robby-russell"&gt;Robby Russell of Planet Argon&lt;/a&gt; came through,  suggesting installing Ruby with these CFLAGS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.6.7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It worked perfectly and I was able to get additional versions of Ruby installed. This should also work if you’re having problems with &lt;a href="https://github.com/asdf-vm/asdf-ruby"&gt;asdf Ruby version manager&lt;/a&gt; too. Asdf uses ruby-build behind the scenes.&lt;/p&gt;

&lt;p&gt;I wondered why I hadn’t stumbled on this solution in the &lt;a href="https://github.com/rbenv/ruby-build/issues"&gt;ruby-build issues on Github&lt;/a&gt;. It turned out I saw the issue but ignored it because it referenced installing older versions of Ruby when Xcode 12 was installed. I have Xcode 12 but was installing new versions of Ruby. The ticket was a little deceiving as it worked with new versions as well.&lt;/p&gt;

&lt;p&gt;For those interested in the details, they can be found in the ticket – &lt;a href="https://github.com/rbenv/ruby-build/issues/1489"&gt;Installing older Ruby versions on OSX after Xcode 12&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://accidentaltechnologist.com/ruby/fix-installation-of-ruby-using-rbenv-on-macos-big-sur/"&gt;Fix Installation of Ruby using rbenv on macOS Big Sur&lt;/a&gt; appeared first on &lt;a href="https://accidentaltechnologist.com"&gt;Accidental Technologist&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>mac</category>
      <category>ruby</category>
      <category>rbnev</category>
    </item>
    <item>
      <title>Fixing Out of Diskspace Errors on Amazon EC2</title>
      <dc:creator>Rob Bazinet</dc:creator>
      <pubDate>Tue, 20 Apr 2021 14:40:15 +0000</pubDate>
      <link>https://dev.to/rbazinet/fixing-out-of-diskspace-errors-on-amazon-ec2-3m6a</link>
      <guid>https://dev.to/rbazinet/fixing-out-of-diskspace-errors-on-amazon-ec2-3m6a</guid>
      <description>&lt;p&gt;Recently, I was working on a side project and deployed an update on my favorite deployment platform, &lt;a href="https://www.hatchbox.io/"&gt;Hatchbox&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The deployment ran and failed with an error message:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;error An unexpected error occurred: "ENOSPC: no space left on device&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Hatchbox gives users a nice interface to deploy Ruby on Rails applications. Everything is taken care of for us, from server provisioning to application deployment. It’s really a nice service and allows lots of customizability.&lt;/p&gt;

&lt;p&gt;This particular application is provisioned on Amazon EC2. Hatchbox provisions to multiple providers including Amazon and DigitalOcean but their responsibility for the platform does not go beyond provision. Issues such as what to do about these types of errors is up to the user.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding the Problem
&lt;/h2&gt;

&lt;p&gt;I am running an a t2.micro instance which does not have a lot of space but I didn’t expect to run out so soon. I ssh’d into the server and ran a check of disk space with the&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;df -h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;command. The result showed me what was wrong:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B2MZIqBb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.22.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B2MZIqBb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.22.png" alt="CleanShot 2021 04 16 at 16 22" title="CleanShot 2021-04-16 at 16.22.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Granted, this shows I have 93% free and that should be enough to deploy my application and it is. I removed some old deploys and freed up enough space to finish the deploy. Disk space was at 99% before cleanup. This was a temporary solution and adding space is needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixing the Problem
&lt;/h2&gt;

&lt;p&gt;If you are familiar with how managing partitions on a Mac or Windows system then you should have an understanding how to solve this problem. On these system there is the idea of a partition, which has a set size. The partition is formatted for a given file system and can then be used to store applications and data. These partitions can have their size adjusted and formatted for use. This is how this problem is solved.&lt;/p&gt;

&lt;p&gt;This application is running on Amazon EC2 and those servers use Elastic Block Storage (EBS) for server storage. The nice feature of EBS is the ability to easily change the size of the drive allocated for our use. The default size for our t2.micro instance is set to 8G, which seems small but can be easily expanded.&lt;/p&gt;

&lt;p&gt;Loggin into the  Amazon Web Services dashboard, the available volumes are shown. Selecting Volumes listed under Elastic Block Store on the left side column reveals them:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7oHuz2cg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.25.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7oHuz2cg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.25.png" alt="CleanShot 2021 04 16 at 16 25" title="CleanShot 2021-04-16 at 16.25.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have a single volume listed, you mileage may vary. Choose the one for the EC2 instance needing more space. Notice the display shows 16g of storage. This screenshot was taken after the changes were made to expand the volume.&lt;/p&gt;

&lt;p&gt;Right clicking on the volume shows a nice menu:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---4v1yazM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---4v1yazM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.26.png" alt="CleanShot 2021 04 16 at 16 26" title="CleanShot 2021-04-16 at 16.26.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finding this menu was not obvious when first arriving at this page. You will want to choose the &lt;strong&gt;Modify Volume&lt;/strong&gt; option from the popup menu where you will see the following modal:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9AqMx8sr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.27.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9AqMx8sr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.27.png" alt="CleanShot 2021 04 16 at 16 27" title="CleanShot 2021-04-16 at 16.27.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I changed this option from 8GB to 16GB for my purposes. Once you click the Modify button it will take some time for the change to take effect. The status will be here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b8yAYF8J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2-2021-04-16-at-16.25.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b8yAYF8J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2-2021-04-16-at-16.25.jpg" alt="CleanShot 2 2021 04 16 at 16 25" title="CleanShot-2 2021-04-16 at 16.25.jpg"&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;State&lt;/strong&gt; field will change and update with progress. Mine took about 5-10 minutes. When it’s all done it will return to showing  &lt;strong&gt;In-Use&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Unfortunately, once this process is done the disk space is not expanded. You have to expand the volume on your own.&lt;/p&gt;

&lt;h3&gt;
  
  
  Expanding the Volume
&lt;/h3&gt;

&lt;p&gt;Amazon does have a &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html"&gt;nice document&lt;/a&gt; to accomplish this task. It’s a good idea to take a look at this and follow their specific directions including taking a snapshot of the volume in the event there are problems.&lt;/p&gt;

&lt;p&gt;I decided against the snapshot because I didn’t have any production data I needed to be concerned about.&lt;/p&gt;

&lt;p&gt;These are the steps to finish expanding the volume. I assume you are familiar enough with the command line to complete these steps. These steps need to be completed from the EC2 instance itself. Access to the instance is accomplished with secure shell (ssh). Root privileges are also needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Check the file system in the volume. Mine shows ext4.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SMgX9g2Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.23.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SMgX9g2Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.23.png" alt="CleanShot 2021 04 16 at 16 23" title="CleanShot 2021-04-16 at 16.23.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Type&lt;/strong&gt; column shows the format of the filesystem. Take note of this, it will be needed later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Run &lt;em&gt;lsblk&lt;/em&gt; to look for the partition that needs to be extended.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ucMkcA17--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-17.18.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ucMkcA17--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-17.18.png" alt="CleanShot 2021 04 16 at 17 18" title="CleanShot 2021-04-16 at 17.18.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This shows my partition &lt;em&gt;after&lt;/em&gt; the upgrade had been done. The disk size showed 16G and the partition (xvda1) showed 8G.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.  Extend the partition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We need to extend the partition so we can use it in the next step. From a terminal window of your EC2 instance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo growpart /dev/xvda1 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The 1 at the end indicates the partition to be expanded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Extend the File System&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Since the filesystem of the drive I am targeting is ext4, I use the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo resize2fs /dev/root
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once this command completes running another df -h shows our partition is expanded and we no longer receive errors when trying to deploy to Hatchbox. This issue is not unique to Hatchbox and will solve this problem for any method used to deploy to your Amazon EC2 instance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This process is not difficult but does require paying attention to some details. If you aren’t familiar with how-to access remote systems or how partitions and filesystems work then you might want to find a friend who can help.&lt;/p&gt;

&lt;p&gt;I hope this helps… &lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://accidentaltechnologist.com/infrastructure/fixing-out-of-diskspace-errors-on-amazon-ec2/"&gt;Fixing Out of Diskspace Errors on Amazon EC2&lt;/a&gt; appeared first on &lt;a href="https://accidentaltechnologist.com"&gt;Accidental Technologist&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>infrastructure</category>
      <category>amazonec2</category>
      <category>amazoneebs</category>
      <category>hatchbox</category>
    </item>
    <item>
      <title>Discover DevUtils.app – Toolbox for Developers</title>
      <dc:creator>Rob Bazinet</dc:creator>
      <pubDate>Mon, 19 Apr 2021 14:15:42 +0000</pubDate>
      <link>https://dev.to/rbazinet/discover-devutils-app-toolbox-for-developers-o1h</link>
      <guid>https://dev.to/rbazinet/discover-devutils-app-toolbox-for-developers-o1h</guid>
      <description>&lt;p&gt;I love finding great tools that solve problems I face everyday. I came across the &lt;a href="https://devutils.app/"&gt;DevUtils.app&lt;/a&gt; recently which is a toolbox with lots of tools to make our day better.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_RoyZmB4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-18-at-20.58.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_RoyZmB4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-18-at-20.58.png" alt="CleanShot 2021 04 18 at 20 58" title="CleanShot 2021-04-18 at 20.58.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’ve made use of several of these and it works great. &lt;/p&gt;

&lt;p&gt;The list of tools is pretty broad and I can imagine the author adding more to the toolbox as time goes on.&lt;/p&gt;

&lt;p&gt;The toolbox is not free, $25 for use on two Macs. Seems like a bargain. I found the &lt;a href="https://github.com/DevUtilsApp/DevUtils-app"&gt;source code is available too&lt;/a&gt; but I hope is if you find value, you support the author. As developers we know how much time it takes to create and support a nice piece of software.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://accidentaltechnologist.com/utilities/discover-devutils-app/"&gt;Discover DevUtils.app – Toolbox for Developers&lt;/a&gt; appeared first on &lt;a href="https://accidentaltechnologist.com"&gt;Accidental Technologist&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>utilities</category>
      <category>devutils</category>
    </item>
    <item>
      <title>Redis::CommandError – MISCONF Redis is configured to save RDB snapshots</title>
      <dc:creator>Rob Bazinet</dc:creator>
      <pubDate>Mon, 22 Mar 2021 13:11:36 +0000</pubDate>
      <link>https://dev.to/rbazinet/redis-commanderror-misconf-redis-is-configured-to-save-rdb-snapshots-10k5</link>
      <guid>https://dev.to/rbazinet/redis-commanderror-misconf-redis-is-configured-to-save-rdb-snapshots-10k5</guid>
      <description>&lt;p&gt;I recently ran into a problem I hadn’t encountered before on my Mac. I was getting an error from Redis: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors […]&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://accidentaltechnologist.com/tips/rediscommanderror-misconf-redis-is-configured-to-save-rdb-snapshots/"&gt;Redis::CommandError – MISCONF Redis is configured to save RDB snapshots&lt;/a&gt; appeared first on &lt;a href="https://accidentaltechnologist.com"&gt;Accidental Technologist&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>tips</category>
      <category>redis</category>
      <category>rails</category>
    </item>
    <item>
      <title>10 Steps to Survive Working from Home</title>
      <dc:creator>Rob Bazinet</dc:creator>
      <pubDate>Wed, 11 Mar 2020 17:12:10 +0000</pubDate>
      <link>https://dev.to/rbazinet/10-steps-to-survive-working-from-home-5efa</link>
      <guid>https://dev.to/rbazinet/10-steps-to-survive-working-from-home-5efa</guid>
      <description>&lt;p&gt;I’ve been working from home for the past 16 years and love it. I wouldn’t have it any other way. Surviving working from home when you've never done it, can be challenging.&lt;/p&gt;

&lt;p&gt;Working from home isn’t for everyone and takes discipline.&lt;/p&gt;

&lt;p&gt;I thought with all the people recently forced to work from home due to &lt;a href="https://www.cdc.gov/coronavirus/2019-ncov/about/share-facts.html"&gt;COVID-19&lt;/a&gt;, I’d share some tips that have helped me over the years.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find a dedicated space. Even if it's temporary, have a place you go to in your home. If all you have is a bedroom then try to create the environment there, a small table near a window would work well. If you have a dining room or kitchen to use, then set up on a table in there. You may need to move at the end of the day for dinner if you don't live alone. Sitting on the couch in the living room with the TV on probably isn't going to work.&lt;/li&gt;
&lt;li&gt;If you have a family with young children home, try to set boundaries. Let others know you are home to work, and there will be time after your day is done for time to be part of the family. If it's hard to have quiet time, get a pair of noise-canceling headphones. I use &lt;a href="https://www.bose.com/en_us/products/headphones/over_ear_headphones/quietcomfort-35-wireless-ii.html#v=qc35_ii_black"&gt;Bose QC-35's&lt;/a&gt; and love them. Unfortunately, they are not cheap.&lt;/li&gt;
&lt;li&gt;Get up and do the same routine you'd do if going into the office. If you get up at 6:00 am, shower and get dressed. If you have an hour commute, then use that time to listen to a podcast, audiobook, or catch-up on the news. Start work at the same time.&lt;/li&gt;
&lt;li&gt;If you're used to a busy office, have the radio on or TV in another room to provide some background noise. Silence can be hard to deal with, and adding some level of noise can help. I like quiet when I'm deep in work but like background sound otherwise.&lt;/li&gt;
&lt;li&gt;Stay in touch with coworkers via Slack, Zoom, or other means. Brief video calls with Zoom during the day can help you feel connected. This one is probably one of the most important. It can be lonely working from home, and you have to figure out how to fill the void.&lt;/li&gt;
&lt;li&gt;Leave your desk for lunch, even to the living room or deck. It would help if you got away from your computer.&lt;/li&gt;
&lt;li&gt;Take plenty of breaks. It's essential to get away from the computer, so get up and get some water (yes, drink plenty) or set outside.&lt;/li&gt;
&lt;li&gt;Eat as you do at work, don't indulge because the food is close. Too much food can make you feel lethargic and lead to unnecessary weight gain.&lt;/li&gt;
&lt;li&gt;End your day by making some notes about what you plan to work on the next workday. This way, you get to your computer and have a plan to get your day started. I've gotten into this habit; it reminds me of what I was working on and where I need to start for the day.&lt;/li&gt;
&lt;li&gt;Stop working the same time you usually do, don't feel like you should be working more because you're home.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I hope this helps.&lt;/p&gt;

&lt;p&gt;Remember, it's only temporary. Maybe this new lifestyle will suit you, and you will want to work from home more.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://accidentaltechnologist.com/remote-work/10-steps-to-survive-working-from-home/"&gt;10 Steps to Survive Working from Home&lt;/a&gt; appeared first on &lt;a href="https://accidentaltechnologist.com"&gt;Accidental Technologist&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>remote</category>
      <category>work</category>
      <category>productivity</category>
    </item>
    <item>
      <title>11 Ruby on Rails Podcasts Worth Your Time</title>
      <dc:creator>Rob Bazinet</dc:creator>
      <pubDate>Tue, 18 Feb 2020 15:00:06 +0000</pubDate>
      <link>https://dev.to/rbazinet/11-ruby-on-rails-podcasts-worth-your-time-fd8</link>
      <guid>https://dev.to/rbazinet/11-ruby-on-rails-podcasts-worth-your-time-fd8</guid>
      <description>&lt;p&gt;I find great value in the Ruby on Rails podcasts and screencasts we have available today. Some podcasts have gone away while others have appeared, and others have changed hosts.&lt;/p&gt;

&lt;p&gt;I provided a &lt;a href="https://accidentaltechnologist.com/ruby-on-rails/10-ruby-on-rails-learning-resources-for-2020/"&gt;list of Rails learning resources&lt;/a&gt; last week, which included some screencasts. I list those here to keep the resource consistent for folks finding this in the future.&lt;/p&gt;

&lt;h2&gt;
  
  
  Podcasts
&lt;/h2&gt;

&lt;p&gt;I have far too many podcasts in the &lt;a href="https://overcast.fm/"&gt;Overcast&lt;/a&gt; app on my iPhone, but these always get listened to first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://remoteruby.transistor.fm/"&gt;Remote Ruby&lt;/a&gt;&lt;/strong&gt; - three developers, chat about Ruby on Rails, what they're up to, and the community at large. Occasional guests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://5by5.tv/rubyonrails"&gt;Ruby on Rails Podcast&lt;/a&gt;&lt;/strong&gt; - this podcast has been around a long time and has seen a few hosts. Episodes consist mainly of interviews with people in the industry or who use Rails for their jobs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://devchat.tv/ruby-rogues/"&gt;Ruby Rogues&lt;/a&gt;&lt;/strong&gt; - a long time show featuring a panel of known people from the Rails community who discuss various topics with guests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.codewithjason.com/rails-with-jason-podcast/"&gt;Rails with Jason&lt;/a&gt;&lt;/strong&gt; - interview-style show with &lt;a href="https://twitter.com/JasonSwett"&gt;Jason Sweet&lt;/a&gt;. Jason has some great guests on his show. If you can listen to only one, I'd try this one. If you can't get enough of Jason, he has &lt;a href="https://www.codewithjason.com/articles/"&gt;written some great articles&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://maintainable.fm/"&gt;Maintainable&lt;/a&gt;&lt;/strong&gt; - hosted by &lt;a href="https://twitter.com/robbyrussell"&gt;Robby Russell&lt;/a&gt;, long-time Rails developer and founder of &lt;a href="https://www.planetargon.com/"&gt;Planet Argon&lt;/a&gt;, a Rails development agency. From the Maintainable site:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;On Maintainable, we speak with seasoned practitioners who have worked past the problems often associated with technical debt and legacy code. In each episode, our guests will share stories and outline tangible, real-world approaches to software challenges&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://runninginproduction.com/"&gt;Running in Production&lt;/a&gt;&lt;/strong&gt; - a podcast about how folks are running various frameworks in a production environment and what it takes to do so. Not strictly talking about Rails, but there are a handful of episodes specifically dealing with challenges of running Rails in production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.bikeshed.fm/"&gt;The Bike Shed&lt;/a&gt;&lt;/strong&gt; - discussion podcast, with two people from  &lt;a href="https://thoughtbot.com/"&gt;Thoughtbot&lt;/a&gt;. Much of the discussion encompasses issues the hosts face while working at the company. The episodes aren't strictly Rails but cover topics many of us face in our day-to-day development work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Screencasts
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.driftingruby.com/"&gt;Drifting Ruby&lt;/a&gt;&lt;/strong&gt; - created by &lt;a href="https://www.twitter.com/kobaltz"&gt;Dave Kimura&lt;/a&gt;, also a long-time Rails developer. Dave is currently up to 227 episodes with episodes running from ~10 min to ~30 min. You might think these screencasts are probably like those from Go Rails, hardly. I think they complement each other very well. Even for topics, they are the same. I find the approaches very different. There are also free episodes, while others require a small monthly fee.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://gorails.com/"&gt;Go Rails&lt;/a&gt;&lt;/strong&gt; - created by &lt;a href="http://excid3.com/"&gt;Chris Oliver&lt;/a&gt;, who is a great contributor to the community. At the time of this writing, Chris is up to 330 videos of varying lengths (~5 min to ~30 min) covering a full breadth of topics, including everything from Rails concepts to the inevitable problem you'll face when creating Rails applications. There is also a forum that accompanies the videos were you can ask questions or answer some if you so choose. There are some &lt;a href="https://gorails.com/episodes?q%5Bfree_eq%5D=true"&gt;free videos&lt;/a&gt; and a Pro plan you can pay to get the rest of the videos for a reasonable monthly fee. It's a bargain for sure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.rubytapas.com/"&gt;RubyTapas&lt;/a&gt;&lt;/strong&gt; - created by Avdi Grimm, a long-time member of the Ruby community. From the RubyTapas website;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;RubyTapas is for the busy Ruby or Rails developer who is ready to reach the next level of code mastery. Short, focused screencasts twice a week will introduce you to a wide variety of intermediate to advanced Ruby concepts and techniques, Object-Oriented design principles, testing practices, refactoring skills, and much more.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="http://railscasts.com/"&gt;RailsCasts&lt;/a&gt;&lt;/strong&gt; - created by Ryan Bates, these short screencasts were the original for the Ruby community focusing on Ruby on Rails. Ryan stepped away from making these a while ago, but many are still relevant today and free.&lt;/p&gt;

&lt;p&gt;There's so much great content in these resources. Whether you like to listen to podcasts or prefer to watch people code in a screencast, there's plenty to learn.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://accidentaltechnologist.com/ruby-on-rails/11-ruby-on-rails-podcasts-worth-your-time/"&gt;11 Ruby on Rails Podcasts Worth Your Time&lt;/a&gt; appeared first on &lt;a href="https://accidentaltechnologist.com"&gt;Accidental Technologist&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>podcast</category>
    </item>
    <item>
      <title>10 Ruby on Rails Learning Resources for 2020</title>
      <dc:creator>Rob Bazinet</dc:creator>
      <pubDate>Thu, 06 Feb 2020 14:00:12 +0000</pubDate>
      <link>https://dev.to/rbazinet/10-ruby-on-rails-learning-resources-for-2020-4d59</link>
      <guid>https://dev.to/rbazinet/10-ruby-on-rails-learning-resources-for-2020-4d59</guid>
      <description>&lt;p&gt;Even though &lt;a href="https://rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt; has been around since 2004 as an open source project, I still get asked the best ways to learn the framework today.&lt;/p&gt;

&lt;p&gt;It’s a fair question and answers do change as the Ruby on Rails landscape has evolved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beginner Level
&lt;/h2&gt;

&lt;p&gt;You have little to no Ruby on Rails knowledge and are looking for resources to get you started out right.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://www.learnenough.com/ruby-on-rails-6th-edition"&gt;The Ruby on Rails Tutorial by Michael Hartl&lt;/a&gt; – now in it’s 6th edition and keeping up with Rails 6. This book and video options (20 hours) help many Rails developers get started. It’s written my Michael Hartl and comes in at 883 pages. It is a well-written tutorial.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://guides.rubyonrails.org"&gt;Ruby on Rails Guides&lt;/a&gt; – when talking about getting information from the source, this is the one to use. Each section contains the documentation on all the major parts of the Ruby on Rails framework broken up by function. A nice feature is users can select the version they are using, starting with the latest as of this writing, 6.0.2.1 all the way back to 2.3.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pragprog.com/book/rails6/agile-web-development-with-rails-6"&gt;Agile Web Development with Rails 6&lt;/a&gt; – the Rails 6 version of the book which has gotten many Rails developers started, including myself. The Pragmatic Bookshelf offers a version back to Rails 4 so make sure you reference the correct version. This version will help with coming up to speed on the new Action Mailbox and Action Text. It offers source code for the project, which is a nice eCommerce application with practical value.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pragprog.com/book/rails51/agile-web-development-with-rails-5-1"&gt;Agile Web Development with Rails 5.1&lt;/a&gt; – this version of the book is, you guessed it, targeting Rails 5.1. It contains the latest updates for 5.1 and offers source code for the project, which is a nice eCommerce application with practical value.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Intermediate Level
&lt;/h2&gt;

&lt;p&gt;You’ve built a couple applications, know the beginner material and have a couple years of Rails experience. You are ready to move on to hone your skills.&lt;/p&gt;

&lt;p&gt;One of the-best ways to learn, for me and I’m sure others, is by watching screencasts. The next two resources are they best out there.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://gorails.com"&gt;Go Rails Screencasts&lt;/a&gt; – created by &lt;a href="http://excid3.com/"&gt;Chris Oliver&lt;/a&gt; who is a great contributor to the community. At the time of this writing Chris is up to 330 videos of varying length (~5 min to ~30 min) covering a wide breath of topics, including everything from Rails concepts to the inevitable problem you’ll face when creating Rails applications. There is also a forum that accompanies the videos were you can ask questions or answer some if you so choose. There are some &lt;a href="https://gorails.com/episodes?q%5Bfree_eq%5D=true"&gt;free videos&lt;/a&gt; and a Pro plan you can pay for to get the rest of the videos for a reasonable monthly fee. It’s a bargain for sure.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.driftingruby.com"&gt;Drifting Ruby Screencasts&lt;/a&gt; – created by &lt;a href="https://www.twitter.com/kobaltz"&gt;Dave Kimura&lt;/a&gt;, also a long-time Rails developer. Dave is currently up to 227 episodes with episodes running from ~10 min to ~30 min. You might think these screencasts are probably like those from Go Rails, hardly. I think they complement each other very well. Even for topics they are the same, I find the approaches very different. There are also free episodes and others are paid for with a small monthly fee.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pragprog.com/book/nrclient/modern-front-end-development-for-rails"&gt;Modern Front-End Development for Rails&lt;/a&gt; – when moving to recent versions of Rails, 5.1+, you have exposure to technologies such as JavaScript with the required tooling. This book takes you there and helps clear up some of the confusion that will certainly arise.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Advanced Level
&lt;/h2&gt;

&lt;p&gt;You feel good about your Ruby on Rails skills and want to press on to even more advanced topics.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://pragprog.com/book/ppmetr2/metaprogramming-ruby-2"&gt;Metaprogramming Ruby 2&lt;/a&gt; – if you aren’t sure what &lt;a href="https://www.toptal.com/ruby/ruby-metaprogramming-cooler-than-it-sounds"&gt;metaprogramming&lt;/a&gt; is, it’s worth learning about and use it where it makes sense. It’s a technique that’s used in Rails and other Ruby frameworks and applications. It’s powerful. This book is the best resource I’ve found on the subject from just learning it to becoming proficient.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pragprog.com/book/nrtest3/rails-5-test-prescriptions"&gt;Rails 5 Test Prescriptions&lt;/a&gt; – the Rails community is all about Test-Driven Development (TDD) and this book gives great coverage of the subject. It covers &lt;a href="https://rspec.info/"&gt;RSpec&lt;/a&gt; and &lt;a href="http://docs.seattlerb.org/minitest/"&gt;mintiest&lt;/a&gt;. RSpec is probably the most popular testing tool for Rails. Mintiest is the default testing framework.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pragprog.com/book/ridocker/docker-for-rails-developers"&gt;Docker for Rails Developers&lt;/a&gt; – unless you’re living under a rock you have at least heard of &lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt;. This book is the only source I am aware of that directly helps Rails developers containerize their application. It is a great single source.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you’re just starting out, a seasoned expert or somewhere in between. I think these are some of the best sources of guidance and knowledge available for our beloved Ruby on Rails.&lt;/p&gt;

&lt;p&gt;If you think I forgot something, please leave a comment and let me know.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://accidentaltechnologist.com/ruby-on-rails/10-ruby-on-rails-learning-resources-for-2020/"&gt;10 Ruby on Rails Learning Resources for 2020&lt;/a&gt; appeared first on &lt;a href="https://accidentaltechnologist.com"&gt;Accidental Technologist&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Ruby on Rails Testing Resources</title>
      <dc:creator>Rob Bazinet</dc:creator>
      <pubDate>Wed, 05 Feb 2020 14:59:24 +0000</pubDate>
      <link>https://dev.to/rbazinet/ruby-on-rails-testing-resources-2gmc</link>
      <guid>https://dev.to/rbazinet/ruby-on-rails-testing-resources-2gmc</guid>
      <description>&lt;p&gt;When taking the plunge into Ruby on Rails it’s really easy to get carried away with learning all about the framework. It’s easy to learn the fundamentals and later realize the Rails community is a community of testers. It’s a strange world when you set out to learn about testing, TDD (test-driven development), BDD (behavior-driven development) and other acronyms and phrases relating to testing Ruby on Rails applications.&lt;/p&gt;

&lt;p&gt;I decided to put together a short list of helpful resources to get started. If you have suggestions that would be useful to be added to this list, please add a comment or email me directly and I’ll update this post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Books
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://leanpub.com/everydayrailsrspec"&gt;Everyday Rails Testing with RSpec&lt;/a&gt; – this is a great, hands-on, roll-up your sleeves and get-to-work book. If you want to use RSpec on a daily basis, this book gives great advice on how to use RSpec in your day-to-day routine. It’s kept up-to-date with latest RSpec too.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pragprog.com/book/nrtest3/rails-5-test-prescriptions"&gt;Rails 5 Test Prescriptions&lt;/a&gt; – I use this book as a reference I often go to. It’s been updated to from previous versions to now Rails 5 and is a great tool to have on the shelf.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pragprog.com/book/rspec3/effective-testing-with-rspec-3"&gt;Effective Testing with RSpec 3&lt;/a&gt; – if you decide you’d rather start without worrying about all the details around Rails you can start with learning RSpec with plain Ruby and help yourself. I’ve been through this one cover-to-cover and it’s a great tutorial.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://chriskottom.com/minitestcookbook/"&gt;The Minitest Cookbook&lt;/a&gt; – if you decide RSpec isn’t for you, this is probably the ultimate resource for Minitest. Well-written and kept up-to-date.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Podcasts
&lt;/h2&gt;

&lt;p&gt;You can’t really learn testing from a podcast but you can learn how others approach the craft. The first is a podcast dedicated to testing Ruby applications. The rest is a list of a few episodes of podcasts that discussed testing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.rubytestingpodcast.com/"&gt;The Ruby Testing Podcast&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devchat.tv/ruby-rogues/rr-385-ruby-rails-testing-with-jason-swett/"&gt;Ruby Rogues 385: “Ruby/Rails Testing” with Jason Swett&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devchat.tv/ruby-rogues/269-rr-testing/"&gt;Ruby Rogues 269 Testing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.fullstackradio.com/46"&gt;Full Stack Radio 46: Joe Ferris – Test Driven Rails&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ve been listening to The Ruby Testing Podcast and picked up some nice tidbits so far.&lt;/p&gt;

&lt;h2&gt;
  
  
  Training
&lt;/h2&gt;

&lt;p&gt;I love &lt;a href="https://www.pluralsight.com/"&gt;Pluralsight&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.pluralsight.com/courses/rspec-the-right-way"&gt;RSpec the Right Way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pluralsight.com/courses/test-driven-rails-rspec-capybara-cucumber"&gt;Test-driven Rails with RSpec, Capybara, and Cucumber&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Xavier Shay has long been involved in the Ruby community and well-known for discussions around testing. One of his best blog posts &lt;a href="https://rhnh.net/2012/12/20/how-i-test-rails-applications/"&gt;explains his approach to testing&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.pluralsight.com/courses/rspec-ruby-application-testing"&gt;Testing Ruby Applications with RSpec&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ve taken several courses on &lt;a href="https://www.udemy.com/"&gt;Udemy&lt;/a&gt; and they are one of my favorite places for training. The prices are low and there are many courses, so you have to do a bit of work to see which course is right for you but well worth the effort.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.udemy.com/complete-tdd-course-ruby-rspec/"&gt;The Complete TDD Course: Master Ruby Development with RSpec&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.udemy.com/ruby-rails-5-bdd-rspec-capybara/"&gt;Ruby on Rails 5 – BDD, RSpec and Capybara&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The post &lt;a href="https://accidentaltechnologist.com/ruby-on-rails/ruby-on-rails-testing-resources/"&gt;Ruby on Rails Testing Resources&lt;/a&gt; appeared first on &lt;a href="https://accidentaltechnologist.com"&gt;Accidental Technologist&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>bdd</category>
      <category>minitest</category>
      <category>rspec</category>
    </item>
  </channel>
</rss>
