<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Accidental Technologist</title>
	<atom:link href="https://accidentaltechnologist.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://accidentaltechnologist.com/</link>
	<description>Musings about Entrepreneurship, Technology and Software Development</description>
	<lastBuildDate>Mon, 27 Mar 2023 15:36:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://accidentaltechnologist.com/wp-content/uploads/2021/03/cropped-face75-32x32.jpg</url>
	<title>Accidental Technologist</title>
	<link>https://accidentaltechnologist.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">23286500</site>	<item>
		<title>Social Media Times Are Changing</title>
		<link>https://accidentaltechnologist.com/technology/social-media-times-are-changing/</link>
					<comments>https://accidentaltechnologist.com/technology/social-media-times-are-changing/#respond</comments>
		
		<dc:creator><![CDATA[Rob Bazinet]]></dc:creator>
		<pubDate>Mon, 27 Mar 2023 15:36:01 +0000</pubDate>
				<guid isPermaLink="false">https://accidentaltechnologist.com/?p=1757</guid>

					<description><![CDATA[<p>It has been interesting to follow the story of Twitter going from public company to being purchased by Elon Musk for more money than I could ever imagine. Since that time it seems like you either love or hate Musk as the owner of a private Twitter. He’s a way better business person that I [&#8230;]</p>
<p>The post <a href="https://accidentaltechnologist.com/technology/social-media-times-are-changing/">Social Media Times Are Changing</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It has been interesting to follow the story of <a href="https://twitter.com">Twitter</a> going from public company to being <a href="https://www.nytimes.com/2022/10/27/technology/elon-musk-twitter-deal-complete.html">purchased by Elon Musk</a> for more money than I could ever imagine. Since that time it seems like you either love or hate Musk as the owner of a private Twitter. He’s a way better business person that I will ever be so I trust he has plans for the service that we will see over time.</p>
<p>Many people I followed on Twitter have moved on to other platforms. </p>
<p>I decided to explore the world beyond Twitter. You can find me in various places:</p>
<p><a href="https://accidentaltechnologist.com">Here of course</a>, with plans to write more.</p>
<p>I finally created a Mastodon account over on <a href="https://ruby.social">ruby.social</a>. I am pretty sure I am the last holdout to create on. <img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://ruby.social/@rbazinet">Follow me over there</a>&#8230;</p>
<p>I started using the <a href="https://micro.blog/">Micro.blog</a> account I’ve had some Manton created the service. I thought I started posting over there but it appears I never did. Thanks to Manton for getting me going again. I plan to write some smaller posts, useful notes or other short-form there. I can be found at <a href="https://rbazinet.micro.blog/">rbazinet.micro.blog</a>.</p>
<p>If I am missing some great community somewhere else, please let me know.</p>
<p>The post <a href="https://accidentaltechnologist.com/technology/social-media-times-are-changing/">Social Media Times Are Changing</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://accidentaltechnologist.com/technology/social-media-times-are-changing/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1757</post-id>	</item>
		<item>
		<title>It has certainly been a long time&#8230;</title>
		<link>https://accidentaltechnologist.com/general/it-has-certainly-been-a-long-time/</link>
					<comments>https://accidentaltechnologist.com/general/it-has-certainly-been-a-long-time/#respond</comments>
		
		<dc:creator><![CDATA[Rob Bazinet]]></dc:creator>
		<pubDate>Mon, 27 Mar 2023 15:20:35 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<guid isPermaLink="false">https://accidentaltechnologist.com/?p=1755</guid>

					<description><![CDATA[<p>I realized that I have neglected my blog for a very long time. I wanted to write up something so that any readers I had left didn’t think I had simply stopped existing. What to write about? Is writing about Ruby on Rails and how to do this or that even relevant any long? Does [&#8230;]</p>
<p>The post <a href="https://accidentaltechnologist.com/general/it-has-certainly-been-a-long-time/">It has certainly been a long time&#8230;</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I realized that I have neglected my blog for a very long time. I wanted to write up something so that any readers I had left didn’t think I had simply stopped existing.</p>
<p>What to write about?</p>
<p>Is writing about Ruby on Rails and how to do this or that even relevant any long? Does anyone still look to blogs for solutions to problems we might be facing? I don’t know. I solve problems this way though but maybe I am the rare case. </p>
<p>Is it time I start writing more about the entrepreneurial side of what I enjoy doing? I’m not sure.</p>
<p>I am here and still existing. </p>
<p>The post <a href="https://accidentaltechnologist.com/general/it-has-certainly-been-a-long-time/">It has certainly been a long time&#8230;</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://accidentaltechnologist.com/general/it-has-certainly-been-a-long-time/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1755</post-id>	</item>
		<item>
		<title>How to Fix Rails Flash Rendering When Using Hotwire</title>
		<link>https://accidentaltechnologist.com/ruby-on-rails/how-to-fix-rails-flash-rendering-when-using-hotwire/</link>
					<comments>https://accidentaltechnologist.com/ruby-on-rails/how-to-fix-rails-flash-rendering-when-using-hotwire/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 14 May 2021 13:06:31 +0000</pubDate>
				<category><![CDATA[Hotwire]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Turbo]]></category>
		<guid isPermaLink="false">https://accidentaltechnologist.com/?p=1665</guid>

					<description><![CDATA[<p>I added Hotwire to a Ruby on Rails application I’ve been working on and discovered some issues when rendering flash messages. Yesterday I wrote about problems related to CORS error using OmniAuth.  Today’s is not as exciting but still as annoying. Problem I was in the process of testing some validation changes I implemented and [&#8230;]</p>
<p>The post <a href="https://accidentaltechnologist.com/ruby-on-rails/how-to-fix-rails-flash-rendering-when-using-hotwire/">How to Fix Rails Flash Rendering When Using Hotwire</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I added <a href="https://hotwire.dev/">Hotwire</a> to a <a href="https://rubyonrails.org/">Ruby on Rails</a> application I’ve been working on and discovered some issues when rendering flash messages. Yesterday I <a href="https://accidentaltechnologist.com/ruby-on-rails/hotwire-fix-for-cors-error-when-using-omniauth/">wrote about problems related to CORS error using OmniAuth</a>.  Today’s is not as exciting but still as annoying.</p>
<h2>Problem</h2>
<p>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.</p>
<p>The code consists of just trying to create a user:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="ruby">def create
  @user = User.new(user_params)
  if @user.save
    redirect_to root_path, notice: “User created successfully“
  else
    render :new
  end
end</pre>
<p>When creating a user, the <em>new</em> form rendered but errors were not displayed.</p>
<h2>Solution</h2>
<p>The reason the messages were not being displayed is because of <a href="https://turbo.hotwire.dev/">Turbo</a> and Rails UJS conflicting. Solving the problem can be done in one of two ways.</p>
<p>1. 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.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="ruby">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</pre>
<p>2. A similar solution from <a href="https://accidentaltechnologist.com/ruby-on-rails/hotwire-fix-for-cors-error-when-using-omniauth/">yesterday’s post</a> also works. Adding</p>
<pre class="EnlighterJSRAW" data-enlighter-language="ruby">data: { turbo: false }</pre>
<p>The form declaration disables turbo and lets Rails UJS handle as desired.</p>
<p>I hope future versions of Turbo handle this better.</p>
<p>The post <a href="https://accidentaltechnologist.com/ruby-on-rails/how-to-fix-rails-flash-rendering-when-using-hotwire/">How to Fix Rails Flash Rendering When Using Hotwire</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://accidentaltechnologist.com/ruby-on-rails/how-to-fix-rails-flash-rendering-when-using-hotwire/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1665</post-id>	</item>
		<item>
		<title>Hotwire Fix for CORS Error when using Omniauth</title>
		<link>https://accidentaltechnologist.com/ruby-on-rails/hotwire-fix-for-cors-error-when-using-omniauth/</link>
					<comments>https://accidentaltechnologist.com/ruby-on-rails/hotwire-fix-for-cors-error-when-using-omniauth/#respond</comments>
		
		<dc:creator><![CDATA[Rob Bazinet]]></dc:creator>
		<pubDate>Thu, 13 May 2021 13:11:32 +0000</pubDate>
				<category><![CDATA[Hotwire]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[CORS]]></category>
		<category><![CDATA[Omniauth]]></category>
		<guid isPermaLink="false">https://accidentaltechnologist.com/?p=1652</guid>

					<description><![CDATA[<p>I’ve been working on a small side project lately and having some fun trying some new Ruby on Rails features. The application allows a user to authenticate using their Twitter account. I’m using the omniauth-twitter gem to implement the Twitter strategy with OmniAuth. It works great; the user is redirected to Twitter to enter their [&#8230;]</p>
<p>The post <a href="https://accidentaltechnologist.com/ruby-on-rails/hotwire-fix-for-cors-error-when-using-omniauth/">Hotwire Fix for CORS Error when using Omniauth</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I’ve been working on a small side project lately and having some fun trying some new <a href="https://rubyonrails.org/">Ruby on Rails</a> features.</p>
<p>The application allows a user to authenticate using their Twitter account. I’m using the <a href="https://github.com/arunagw/omniauth-twitter">omniauth-twitter gem</a> 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.</p>
<h2>The Problem</h2>
<p>Everything was working great until I implement some of the HTML over the wire goodness of <a href="https://hotwire.dev/">Hotwire</a>.</p>
<p>I have a couple of areas on the site that rely on a <a href="https://sidekiq.org/">Sidekiq</a> 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!</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>Inspecting the console in Firefox revealed this ugly message.</p>
<pre>Access to fetch at 'https://api.twitter.com/oauth/authenticate?oauth_token=&lt;my secret token&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.</pre>
<p>I started to search around for the error, and many solutions had me trying the <a href="https://github.com/cyu/rack-cors">rack-cors gem</a> 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.</p>
<h2>Debugging</h2>
<p>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.</p>
<p>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 <a href="https://github.com/hotwired/hotwire-rails">Hotwire-rails gem</a> and removed all the code related to Hotwire and, moved back to Turbolinks. Magically it all worked again.</p>
<p>Adding Hotwire caused this problem.</p>
<h2>A Solution</h2>
<p>Being new to Hotwire I wasn’t sure where to start. I started with what any good developer does…a Google search.</p>
<p>I came across some posts on the <a href="https://discuss.hotwire.dev/">Hotwire forums</a> and on the <a href="https://github.com/hotwired/turbo/issues">Devise Github issues list</a> that provided a solution that worked. One, in particular, gave this solution:</p>
<blockquote><p>It seems like adding</p>
<pre>:data =&gt; {turbo: "false"}</pre>
<p>and making my link a button seems to make it work as per: <a href="https://github.com/hotwired/turbo/issues/45#issuecomment-753444256">Devise github login not working after Turbo enabled. · Issue #45 · hotwired/turbo · GitHub</a>. I now have a different error, but that it something different. So I suppose this is solved for now.</p></blockquote>
<p>The original button I used to connect with Twitter, looked like this:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="ruby">button_to "Connect a Twitter account", "/auth/twitter", method: :post, class: "btn btn-primary"</pre>
<p>After the suggestion above, it now looks like this:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="ruby">button_to "Connect a Twitter account", "/auth/twitter", method: :post, data: {turbo: "false"}, class: "btn btn-primary"</pre>
<p>After adding the code to the button, it works as it did before. Simply don’t use Turbo for this type of request.</p>
<p>The <a href="https://turbo.hotwire.dev/handbook/drive#disabling-turbo-drive-on-specific-links-or-forms">Turbo docs do discuss disabling Turbo on specific links</a>. 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.</p>
<h2>Conclusion</h2>
<p>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.</p>
<p>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.</p>
<p>The post <a href="https://accidentaltechnologist.com/ruby-on-rails/hotwire-fix-for-cors-error-when-using-omniauth/">Hotwire Fix for CORS Error when using Omniauth</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://accidentaltechnologist.com/ruby-on-rails/hotwire-fix-for-cors-error-when-using-omniauth/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1652</post-id>	</item>
		<item>
		<title>Fix Installation of Ruby using rbenv on macOS Big Sur</title>
		<link>https://accidentaltechnologist.com/ruby/fix-installation-of-ruby-using-rbenv-on-macos-big-sur/</link>
					<comments>https://accidentaltechnologist.com/ruby/fix-installation-of-ruby-using-rbenv-on-macos-big-sur/#respond</comments>
		
		<dc:creator><![CDATA[Rob Bazinet]]></dc:creator>
		<pubDate>Mon, 26 Apr 2021 13:30:26 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rbnev]]></category>
		<guid isPermaLink="false">https://accidentaltechnologist.com/?p=1639</guid>

					<description><![CDATA[<p>I’ve been using with rbenv 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 [&#8230;]</p>
<p>The post <a href="https://accidentaltechnologist.com/ruby/fix-installation-of-ruby-using-rbenv-on-macos-big-sur/">Fix Installation of Ruby using rbenv on macOS Big Sur</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I’ve been using with <a href="https://github.com/rbenv/rbenv">rbenv</a> 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.</p>
<h2>Problem</h2>
<p>When performing the usual command to install Ruby with rbenv, I started getting this message:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">~ $ rbenv install 2.6.7
Downloading ruby-2.6.7.tar.bz2...
-&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;vm-&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-&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....
~ $</pre>
<p>Trying to figure out the problem by looking at the message, it didn’t seem like something I could fix. Searching the <a href="https://github.com/rbenv/rbenv/issues">rbenv Github issues</a> didn’t give many clues. Knowing that rbenv uses <a href="https://github.com/rbenv/ruby-build">ruby-build</a> to automate the Ruby build process, I looked at the issues reported. It looks like I was not the only one having similar problems.</p>
<p><img fetchpriority="high" decoding="async" title="CleanShot 2021-04-24 at 21.51.png" src="https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-24-at-21.51.png" alt="CleanShot 2021 04 24 at 21 51" width="600" height="352" border="0" /></p>
<p>I tried several of the suggestions found from those issues and none of the solutions worked.</p>
<h2>Solution</h2>
<p>I decided to turn to my friends on Twitter to see if anyone had faced this issue. Twitter never lets me down and <a href="https://www.planetargon.com/about/robby-russell">Robby Russell of Planet Argon</a> came through,  suggesting installing Ruby with these CFLAGS:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.6.7</pre>
<p>It worked perfectly and I was able to get additional versions of Ruby installed. This should also work if you’re having problems with <a href="https://github.com/asdf-vm/asdf-ruby">asdf Ruby version manager</a> too. Asdf uses ruby-build behind the scenes.</p>
<p>I wondered why I hadn’t stumbled on this solution in the <a href="https://github.com/rbenv/ruby-build/issues">ruby-build issues on Github</a>. 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.</p>
<p>For those interested in the details, they can be found in the ticket &#8211; <a href="https://github.com/rbenv/ruby-build/issues/1489">Installing older Ruby versions on OSX after Xcode 12</a>.</p>
<p>The post <a href="https://accidentaltechnologist.com/ruby/fix-installation-of-ruby-using-rbenv-on-macos-big-sur/">Fix Installation of Ruby using rbenv on macOS Big Sur</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://accidentaltechnologist.com/ruby/fix-installation-of-ruby-using-rbenv-on-macos-big-sur/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1639</post-id>	</item>
		<item>
		<title>RailsConf 2021 and the Future of Conferences</title>
		<link>https://accidentaltechnologist.com/ruby-on-rails/railsconf-2021-and-the-future-of-conferences/</link>
					<comments>https://accidentaltechnologist.com/ruby-on-rails/railsconf-2021-and-the-future-of-conferences/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 20 Apr 2021 20:49:56 +0000</pubDate>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[railsconf]]></category>
		<category><![CDATA[rubyconf]]></category>
		<guid isPermaLink="false">https://accidentaltechnologist.com/?p=1633</guid>

					<description><![CDATA[<p>I attended RailsConf this year, as I did last year. Due to COVID-19 these events were virtual-only. Unlike last year, this year’s event included a live component for keynote speakers as well as a large number of Discord rooms so that attendees could live the hallway track as best a virtual even could provide. Organizers [&#8230;]</p>
<p>The post <a href="https://accidentaltechnologist.com/ruby-on-rails/railsconf-2021-and-the-future-of-conferences/">RailsConf 2021 and the Future of Conferences</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" title="railsconf-2021-flag.png" src="https://accidentaltechnologist.com/wp-content/uploads/2021/04/railsconf-2021-flag.png" alt="Railsconf 2021 flag" width="431" height="332" border="0" /></p>
<p>I attended <a href="https://railsconf.com/">RailsConf</a> this year, as I did last year. Due to COVID-19 these events were virtual-only. Unlike last year, this year’s event included a live component for keynote speakers as well as a large number of Discord rooms so that attendees could live the hallway track as best a virtual even could provide.</p>
<p>Organizers reported attendees took part from 61 countries.</p>
<p><img decoding="async" title="CleanShot 2021-04-20 at 16.14.png" src="https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-20-at-16.14.png" alt="CleanShot 2021 04 20 at 16 14" width="599" height="427" border="0" /></p>
<p>There were 5 keynotes, 60 talks (not including attendee lightening talks) and 11 workshops over 4 days. The talks were prerecorded so they could be viewed at anytime. This is a nice feature; as someone who has attended the in-person RailsConf in the past, it’s always hard to decide what talks to attend and sustain the energy to watch one during every time slot. </p>
<p>The keynotes and workshops were live and took place in the afternoon and late morning, respectively. This year live lightning talks, game show, sponsor talks and speaker Q&amp;A were added and made the experience feel as close to in-person as possible.</p>
<p>The 60 session talks will be up on the <a href="https://www.youtube.com/channel/UCpFXaEz3vKJ45XjW5m5pbow/featured">Ruby Central Youtube channel</a> with a month after the event. Lots of really great talks and tons to learn.</p>
<p>This format worked great but I do miss the in-person events when you can see old friends face-to-face, have good conversations and enjoy group dinners out. I hope next year there is an in-person component of RailsConf. It does appear <a href="https://rubyconf.org/">RubyConf</a> will offer both in-person and virtual attendance. This gives attendees options and likely means more people can attend since some would miss because they couldn’t get away. </p>
<p>I don’t know the numbers for previous RailsConf, but I would have to think attendance was not close to 61 countries.</p>
<h2>We are seeing the future</h2>
<p>As bad as COVID-19 was for so many, we may see some positive changes for the future.</p>
<p>Conferences were designed to be in-person, face-to-face meetups, bringing attendees from all over the world to a central location. COVID-19 has shown us there had to be a different way. </p>
<p>Organizers had embrace a new way of holding events or shutdown. Technologies like <a href="https://zoom.us/">Zoom</a> and <a href="https://mux.com/">Mux</a> proved online video is a solid technology, capable of the demands of many users.</p>
<p>Events than can offer both an in-person and virtual experience, stand to gain the most. This opens up opportunities for both organizers and attendees. People who would not be able to attend a particular conference in-person would now not miss the event because they can watch in the comfort of their home or office. Organizers that had to limit attendance can now open up and allow so many more to take in the event. Win..win.</p>
<p>I’m looking forward to attend more conferences in 2021 than ever before. I will attend some in-person but will attend others virtually. The RailsConf organizers and folks at Ruby Central should be applauded for a great job.</p>
<p>The post <a href="https://accidentaltechnologist.com/ruby-on-rails/railsconf-2021-and-the-future-of-conferences/">RailsConf 2021 and the Future of Conferences</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://accidentaltechnologist.com/ruby-on-rails/railsconf-2021-and-the-future-of-conferences/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1633</post-id>	</item>
		<item>
		<title>Fixing Out of Diskspace Errors on Amazon EC2</title>
		<link>https://accidentaltechnologist.com/infrastructure/fixing-out-of-diskspace-errors-on-amazon-ec2/</link>
					<comments>https://accidentaltechnologist.com/infrastructure/fixing-out-of-diskspace-errors-on-amazon-ec2/#respond</comments>
		
		<dc:creator><![CDATA[Rob Bazinet]]></dc:creator>
		<pubDate>Tue, 20 Apr 2021 14:40:15 +0000</pubDate>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[Amazone EBS]]></category>
		<category><![CDATA[Hatchbox]]></category>
		<guid isPermaLink="false">https://accidentaltechnologist.com/?p=1621</guid>

					<description><![CDATA[<p>Recently, I was working on a side project and deployed an update on my favorite deployment platform, Hatchbox. The deployment ran and failed with an error message: error An unexpected error occurred: "ENOSPC: no space left on device Hatchbox gives users a nice interface to deploy Ruby on Rails applications. Everything is taken care of [&#8230;]</p>
<p>The post <a href="https://accidentaltechnologist.com/infrastructure/fixing-out-of-diskspace-errors-on-amazon-ec2/">Fixing Out of Diskspace Errors on Amazon EC2</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Recently, I was working on a side project and deployed an update on my favorite deployment platform, <a href="https://www.hatchbox.io/">Hatchbox</a>.</p>
<p>The deployment ran and failed with an error message:</p>
<p><code>error An unexpected error occurred: "ENOSPC: no space left on device</code></p>
<p>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.</p>
<p>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.</p>
<h2>Finding the Problem</h2>
<p>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</p>
<pre>df -h</pre>
<p>command. The result showed me what was wrong:</p>
<p><img decoding="async" title="CleanShot 2021-04-16 at 16.22.png" src="https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.22.png" alt="CleanShot 2021 04 16 at 16 22" width="599" height="281" border="0" /></p>
<p>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.</p>
<h2>Fixing the Problem</h2>
<p>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.</p>
<p>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.</p>
<p>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:</p>
<p><img decoding="async" title="CleanShot 2021-04-16 at 16.25.png" src="https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.25.png" alt="CleanShot 2021 04 16 at 16 25" width="599" height="378" border="0" /></p>
<p>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.</p>
<p>Right clicking on the volume shows a nice menu:</p>
<p><img decoding="async" title="CleanShot 2021-04-16 at 16.26.png" src="https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.26.png" alt="CleanShot 2021 04 16 at 16 26" width="599" height="378" border="0" /></p>
<p>Finding this menu was not obvious when first arriving at this page. You will want to choose the <strong>Modify Volume</strong> option from the popup menu where you will see the following modal:</p>
<p><img decoding="async" title="CleanShot 2021-04-16 at 16.27.png" src="https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.27.png" alt="CleanShot 2021 04 16 at 16 27" width="599" height="378" border="0" /></p>
<p>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:</p>
<p><img decoding="async" title="CleanShot-2 2021-04-16 at 16.25.jpg" src="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" width="599" height="378" border="0" />:</p>
<p>The <strong>State</strong> field will change and update with progress. Mine took about 5-10 minutes. When it’s all done it will return to showing <strong>In-Use</strong>.</p>
<p>Unfortunately, once this process is done the disk space is not expanded. You have to expand the volume on your own.</p>
<h3>Expanding the Volume</h3>
<p>Amazon does have a <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html">nice document</a> 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.</p>
<p>I decided against the snapshot because I didn’t have any production data I needed to be concerned about.</p>
<p>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.</p>
<p><strong>1. Check the file system in the volume. Mine shows ext4.</strong></p>
<p><img decoding="async" title="CleanShot 2021-04-16 at 16.23.png" src="https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-16.23.png" alt="CleanShot 2021 04 16 at 16 23" width="600" height="293" border="0" /></p>
<p>The <strong>Type</strong> column shows the format of the filesystem. Take note of this, it will be needed later.</p>
<p><strong>2. Run <em>lsblk</em> to look for the partition that needs to be extended.</strong></p>
<p><img decoding="async" title="CleanShot 2021-04-16 at 17.18.png" src="https://accidentaltechnologist.com/wp-content/uploads/2021/04/CleanShot-2021-04-16-at-17.18.png" alt="CleanShot 2021 04 16 at 17 18" width="600" height="275" border="0" /></p>
<p>This shows my partition <em>after</em> the upgrade had been done. The disk size showed 16G and the partition (xvda1) showed 8G.</p>
<p><strong>3.  Extend the partition</strong></p>
<p>We need to extend the partition so we can use it in the next step. From a terminal window of your EC2 instance.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">sudo growpart /dev/xvda1 1</pre>
<p>The 1 at the end indicates the partition to be expanded.</p>
<p><strong>4. Extend the File System</strong></p>
<p>Since the filesystem of the drive I am targeting is ext4, I use the command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">sudo resize2fs /dev/root</pre>
<p>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.</p>
<h2>Conclusion</h2>
<p>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.</p>
<p>I hope this helps&#8230; </p>
<p>The post <a href="https://accidentaltechnologist.com/infrastructure/fixing-out-of-diskspace-errors-on-amazon-ec2/">Fixing Out of Diskspace Errors on Amazon EC2</a> appeared first on <a href="https://accidentaltechnologist.com">Accidental Technologist</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://accidentaltechnologist.com/infrastructure/fixing-out-of-diskspace-errors-on-amazon-ec2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1621</post-id>	</item>
	</channel>
</rss>
