<?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>Mightyvites Blog &#187; ruby</title>
	<atom:link href="http://mightyvites.com/blog/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://mightyvites.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 21 May 2013 22:57:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Hybrid Invitations Powered By Rails 3.2 and Ruby 1.9.3</title>
		<link>http://mightyvites.com/blog/web-tech/hybrid-invitations-powered-by-rails-3-2-and-ruby-1-9-3/</link>
		<comments>http://mightyvites.com/blog/web-tech/hybrid-invitations-powered-by-rails-3-2-and-ruby-1-9-3/#comments</comments>
		<pubDate>Wed, 20 Jun 2012 18:43:40 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Web Tech]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://mightyvites.com/blog/?p=2717</guid>
		<description><![CDATA[Since the push to Rails 3.1.3 I&#8217;ve actually upgraded mightyvites.com to use Rails 3.2.3 and Ruby 1.9.3. This was an easy move forward with little to write home about. The upgrade was significant, however, because Ruby 1.9.3 is noticeably faster than 1.9.2 and Rails 3.2.3 has a much better development environment. It only reloads classes that [...]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright  wp-image-2718" title="ruby-1.9.3" src="http://mightyvites.com/wp-content/uploads/2012/06/ruby-1.9.3.jpg" alt="ruby 1.9.3" width="182" height="177" />Since <a title="Ruby On Rails 3.1: Upgrading To The Asset Pipeline" href="http://mightyvites.com/blog/web-tech/ruby-on-rails-3-1-upgrading-to-the-asset-pipeline/">the push to Rails 3.1.3</a> I&#8217;ve actually upgraded <a href="http://mightyvites.com/">mightyvites.com</a> to use Rails 3.2.3 and Ruby 1.9.3. This was an easy move forward with little to write home about. The upgrade was significant, however, because Ruby 1.9.3 is noticeably faster than 1.9.2 and Rails 3.2.3 has a much better development environment. It only reloads classes that have changed plus it has query explains. Check out <a href="http://guides.rubyonrails.org/3_2_release_notes.html%22">the release notes</a> to read about all the goodness. I certainly thought this upgrade was worth it.</p>
<p><span id="more-2717"></span></p>
<p>UPDATE: Since moving to 3.2.3 I&#8217;ve upgraded the site to 3.2.6. The minor update was <a href="http://weblog.rubyonrails.org/2012/6/12/ann-rails-3-2-6-has-been-released/" target="_blank">to address the recent security exploits found in Rails</a>. It was a simple change in gem versions to make this upgrade work.</p>
<h4>Incoming search terms:</h4><ul><li>wedding rsvp via email wording</li><li>how to word rsvp on wedding invitations</li><li>wedding png</li><li>1 mightyvites</li><li>rails invitations</li><li>rails3 rescue_action_in_public</li><li>powered by ruby on rails 3</li><li>rsvp plus one wedding</li><li>rsvp wedding cards with email</li><li>ruby</li></ul>]]></content:encoded>
			<wfw:commentRss>http://mightyvites.com/blog/web-tech/hybrid-invitations-powered-by-rails-3-2-and-ruby-1-9-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade To Rails 3.0.10 And Ruby 1.9.2 Reviewed</title>
		<link>http://mightyvites.com/blog/web-tech/upgrade-to-rails-3-0-10-and-ruby-1-9-2-reviewed/</link>
		<comments>http://mightyvites.com/blog/web-tech/upgrade-to-rails-3-0-10-and-ruby-1-9-2-reviewed/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 15:15:12 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Web Tech]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://mightyvites.com/blog/?p=2457</guid>
		<description><![CDATA[Over a year ago (!) I announced my intention to upgrade mightyvites.com from Ruby 1.8.7 and Rails 2.2.2 to Ruby 1.9.2 and Rails 3. Took me long enough but I&#8217;m now finally following up on the issue. No, it didn&#8217;t take me a year to do the upgrade. Shortly after I wrote that post I took a full time Rails [...]]]></description>
				<content:encoded><![CDATA[<p><img class="size-full wp-image-2476 alignleft" title="ruby_on_rails_3_upgrade" src="http://mightyvites.com/wp-content/uploads/2012/01/ruby_on_rails_3_upgrade.jpeg" alt="ruby on rails 3 upgrade" width="204" height="204" />Over a year ago (!) <a title="The Mighty Nice March To Ruby On Rails 3 And Ruby 1.9.2" href="http://mightyvites.com/blog/web-tech/the-mighty-nice-march-to-ruby-on-rails-3-and-ruby-1-9-2/">I announced my intention to upgrade mightyvites.com from Ruby 1.8.7 and Rails 2.2.2 to Ruby 1.9.2 and Rails 3</a>. Took me long enough but I&#8217;m now finally following up on the issue.</p>
<p>No, it didn&#8217;t take me a year to do the upgrade. Shortly after I wrote that post I took a full time Rails job. Then my business got busy with paying customers. Then <a href="http://mightyvites.com/blog/category/one-mans-wedding/">I got engaged and a few months later married</a>. There were a lot of distractions which kept throwing me off my Ruby On Rails upgrade plans. I did do it though. In fact I completed two Rails upgrades this summer. One for <a href="http://mightyvites.com">mightyvites.com</a> and one for my employer. In both cases I transitioned webapps from Rails 2.x to Rails 3.0.10 and introduced Ruby 1.9.2. Doing so was definitely worth it. Rails 3 feels so much more mature than previous releases. The upgrade, however, was not easy. Below are the issues I had to deal with to make it happen.<br />
<span id="more-2457"></span></p>
<h2>Changes in Rails</h2>
<ul>
<li>The Rails.root/lib directory must be autoloaded</li>
<li>My use of JRails could be dropped due to the new UJS approach of JavaScript handling</li>
<li>#fields_for and #form_for require &lt;%= ERB blocks</li>
<li>@controller was deprecated for #controller</li>
<li>ApplicationController#filter_parameter_logging is now config.filter_parameters in application.rb</li>
<li>Must mark application HTML as html_safe due to XSS protection being the default</li>
<li>No more CGI::Session::CookieStore::TamperedWithCookie (because of signed cookies?)</li>
<li>#rescue_action_in_public usage changed to #rescue_from (really a Rails 2.3 change)</li>
<li>Awful &#8220;You have a model in a subdirectory, where the name of the subdirectory matches the name of the model.&#8221; problem (<a href="http://www.williambharding.com/blog/technology/rails-3-autoload-modules-and-classes-in-production" target="_blank">succinct explanation (point 4)</a>, <a href="http://owenou.com/2011/01/20/loading-path-gotchas-in-rails3.html" target="_blank">technical explanation</a>)</li>
<li>Terrible &#8220;incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)&#8221; problem caused by rendering XLS file with render :file =&gt;. Fixed by using #send_file</li>
<li>ActiveRecord attributes with errors are displayed in a form_for with CSS class &#8216;field_with_errors&#8217; as opposed to the preveious &#8216;fieldWithErrors&#8217;</li>
<li>Had to uncomment the Nginx version of config.action_dispatch.x_sendfile_header in production.rb</li>
</ul>
<h2>Changes in Ruby gems</h2>
<ul>
<li><a href="https://github.com/mislav/will_paginate" target="_blank">will_paginate</a> needs 3.0.pre2</li>
<li><a href="https://github.com/brianmario/mysql2" target="_blank">mysql2</a> needs 0.2.11</li>
<li>had to <a href="http://tlug.dnho.net/node/276" target="_blank">encode DB to UTF8</a>. Apparently mysql gem would change encoding to UTF8 while mysql2 gem does not?</li>
<li><a href="https://github.com/terra-firma/hominid" target="_blank">hominid</a> needs 2.1.9</li>
<li><a href="https://github.com/rmagick/rmagick" target="_blank">rmagick</a> required building ImageMagick via MacPorts w/o openmp support (<a href="http://stackoverflow.com/questions/2838307/why-is-this-rmagick-call-generating-a-segmentation-fault/3638135#3638135" target="_blank">CaptainPete&#8217;s explanation</a>)</li>
</ul>
<h2>Changes in Ruby</h2>
<ul>
<li>Array#choice now #sample</li>
<li>YAML lib changes to Psych; can no longer handle ypaths with #select</li>
<li>Drop use of FasterCSV because it is now the native CSV</li>
</ul>
<p>&nbsp;</p>
<p>I would say the average time it took for me to do each upgrade was 3 weeks. A full test suite was invaluable in tracking the state of the upgrade, and after launch I inevitably found bits of un-html_safe&#8217;d output. I released the Rails 3 upgrade of <a href="http://mightyvites.com">mightyvites.com</a> in September of &#8217;11. Since then I&#8217;ve upgraded the site to Rails 3.1 and instituted <a href="http://guides.rubyonrails.org/asset_pipeline.html" target="_blank">the new asset pipeline</a>. Hopefully I&#8217;ll write about that sooner rather than later.</p>
<h4>Incoming search terms:</h4><ul><li>rails 3 rescue_action_in_public</li><li>rescue_action_in_public rails 3</li><li>upgrade to rails 3 0 10</li><li>update to rails 3 0 10</li><li>rails 3 0 10 changes</li><li>upgrade rails 2 to 3</li><li>send_data rails 3 0 10</li><li>rails rescue_action_in_public</li><li>ruby 3 0 10</li><li>rescue_action_in_public rails3</li></ul>]]></content:encoded>
			<wfw:commentRss>http://mightyvites.com/blog/web-tech/upgrade-to-rails-3-0-10-and-ruby-1-9-2-reviewed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Mighty Nice March To Ruby On Rails 3 And Ruby 1.9.2</title>
		<link>http://mightyvites.com/blog/web-tech/the-mighty-nice-march-to-ruby-on-rails-3-and-ruby-1-9-2/</link>
		<comments>http://mightyvites.com/blog/web-tech/the-mighty-nice-march-to-ruby-on-rails-3-and-ruby-1-9-2/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 15:00:38 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Web Tech]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.mighty-nice.com/?p=901</guid>
		<description><![CDATA[I&#8217;ve been working with Ruby On Rails 2.2.2 and Ruby 1.8.7 for a little over a year now. The Mightyvites site is built on that foundation, as is the Mighty Nice site, and a few of our client sites. However, with the release of Rails 3, and it&#8217;s compatibility with Ruby 1.9.2, I&#8217;m itching to [...]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright" title="Ruby On Rails 3" src="http://mightyvites.com/wp-content/uploads/2010/11/rails3.png" alt="Ruby On Rails 3" width="87" height="111" /></p>
<p>I&#8217;ve been working with <a href="http://rubyonrails.org/" target="_blank">Ruby On Rails</a> 2.2.2 and <a href="http://www.ruby-lang.org/en/" target="_blank">Ruby</a> 1.8.7 for a little over a year now. The <a href="http://mightyvites.com">Mightyvites</a> site is built on that foundation, as is the <a href="http://mighty-nice.com">Mighty Nice</a> site, and a few of our client sites. However, with the <a href="http://edgeguides.rubyonrails.org/3_0_release_notes.html" target="_blank">release of Rails 3</a>, and it&#8217;s compatibility with Ruby 1.9.2, I&#8217;m itching to upgrade both. There are a few reasons why I want to upgrade the cores of our RoR sites:<span id="more-901"></span></p>
<ul>
<li>I don&#8217;t like to fall behind in upgrades. If you skip too many stable releases of a critical software package you&#8217;ll run into big headaches when you do decide to upgrade.</li>
<li>It&#8217;s a good excuse to upgrade everything our sites run on: gems, plugins, JavaScript libraries, etc. Just do a full upgrade release and get it over with.</li>
<li>I want core support of <a href="http://rails-engines.org/" target="_blank">Rails Engines</a>. Currently I use Rails Engines as a plugin. The less plugins to manage the better.</li>
<li>I want to drop use of the <a href="http://mirror.ozdiy.com/assets/b8/2f96a12bc919b37e09d303b86ea1b9_1251811910.html" target="_blank">Jrails</a> plugin and harness <a href="http://www.simonecarletti.com/blog/2010/06/unobtrusive-javascript-in-rails-3/" target="_blank">unobtrusive JavaScript</a></li>
<li>I want the bug fixes and performance improvements. I have no complaints with Ruby/Rails performance, but I would like to use <a href="http://en.wikipedia.org/wiki/YARV" target="_blank">the new Ruby interpreter</a> which is supposedly 15% faster than the old (but slower than the previous interpreter with ActiveRecord? Yikes!).</li>
<li>Rails routes have <a href="http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/" target="_blank">a new sugary syntax</a> (er. <a href="http://www.infoq.com/news/2007/06/dsl-or-not" target="_blank">DSL</a>) which will help clean up my routes.rb files.</li>
<li><a href="http://mightyvites.com/blog/2010/11/12/mighty-nice-lessons-from-chicago-ruby-hack-night/">Ruby has some cool new features</a></li>
</ul>
<p>That&#8217;s more than enough reasons to upgrade, and thankfully I&#8217;ve got the time to do it now. In preparation I&#8217;ve cut a new development branch and I&#8217;ve talked to some fellow Chicago Rubyists to get their take on the upgrade process. One fella I met at last month&#8217;s <a href="http://www.meetup.com/Software-Craftsman-Chicago/" target="_blank">software craftsman meetup</a> pointed me to the <a href="https://github.com/rails/rails_upgrade" target="_blank">rails_upgrade plugin</a>, which I&#8217;ve already tried out and am impressed with. The plugin takes the pain out of the upgrade guess process by running through your code and printing out all you need to change and why. That&#8217;s super handy, and should help cut down significantly on the brute force break/fix upgrade cycle. There is also a good lookin&#8217; <a href="http://www.railsupgradehandbook.com/" target="_blank">PDF</a> written on the upgrade process.</p>
<p>One thing to note: a few people have told me that moving to Rails 3 isn&#8217;t bad, but moving to Ruby 1.9 is not as easy. The reason being that many gems and plugins aren&#8217;t yet compatible. I&#8217;m going to give the move to Ruby 1.9 a try, but we&#8217;ll see how far I get.</p>
<h4>Incoming search terms:</h4><ul><li>rails 3 slower than rails 2</li><li>Mighty Rails</li><li>rails 3 ruby 1 9 performance</li><li>rails3 ruby 1 9 performance</li><li>rails3 slower</li><li>rails3 slower than rails2</li><li>ruby 1 9 2 performance</li><li>invitation plugin in ruby on rails 3</li><li>ruby on rails 3</li><li>upgrade rails 3 to 1 9 2</li></ul>]]></content:encoded>
			<wfw:commentRss>http://mightyvites.com/blog/web-tech/the-mighty-nice-march-to-ruby-on-rails-3-and-ruby-1-9-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mighty Nice Lessons From ChicagoRuby Hack Night</title>
		<link>http://mightyvites.com/blog/web-tech/mighty-nice-lessons-from-chicago-ruby-hack-night/</link>
		<comments>http://mightyvites.com/blog/web-tech/mighty-nice-lessons-from-chicago-ruby-hack-night/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 19:57:18 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Web Tech]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.mighty-nice.com/?p=913</guid>
		<description><![CDATA[Last night I attended a ChicagoRuby Hack Night. It was my first one, and well worth going to. The topic was Ruby 1.9 and how it differs from 1.8. The format was very casual. There was a written introduction to 1.9, and attendees randomly paired up to explore the intro on their laptop&#8217;s irb command [...]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-917" title="ruby 1.9" src="http://mightyvites.com/wp-content/uploads/2010/11/ruby1.png" alt="Ruby 1.9" width="100" height="100" />Last night I attended a <a href="http://www.meetup.com/ChicagoRuby/" target="_blank">ChicagoRuby</a> Hack Night. It was my first one, and well worth going to. The topic was <a href="http://www.ruby-lang.org/en/" target="_blank">Ruby</a> 1.9 and how it differs from 1.8. The format was very casual. There was <a href="http://files.meetup.com/288361/ruby192.txt" target="_blank">a written introduction to 1.9</a>, and attendees randomly paired up to explore the intro on their laptop&#8217;s irb command line. It was a good opportunity to meet like-minded people and geek out on some cool new language features. Here&#8217;s what I learned about Ruby 1.9 at the ChicagoRuby Hack Night:<br />
<span id="more-913"></span></p>
<ul>
<li>Varargs can now appear anywhere in a method definition</li>
<li>Block parameters are now like method parameters: they can have default args and varargs</li>
<li>Since symbols-as-keys hashes are so common in Ruby there is now a concise way of writing it. <code>{ :a =&gt; 1, :b =&gt; 2}</code> can now just be <code>{ a: 1, b: 2 }</code> (hash literals).</li>
<li>Hashes now retain creation order. I&#8217;m mixed on this. A classic hash algorithm won&#8217;t maintain order for the sake of speed. If you want order, use an array. I feel like Ruby is blurring the lines here, much like it does with the distinction between arrays and linked lists in the Array class. However, hashes are used so frequently in Ruby that this is a welcomed feature.</li>
<li>The Fiber library introduces a lighter-than-light-weight-threads way of doing concurrency. Granted you have to schedule the concurrency yourself, so you better know what you&#8217;re doing, but in simple cases this can be an improvement over firing off Threads.</li>
<li>The CSV library is now FasterCSV. I currently use FasterCSV as a gem. The less gems I have to worry about the better.</li>
</ul>
<p>Cool stuff, and I&#8217;m excited to use it in production. Now I just need to upgrade!</p>
<p>By the way, since I haven&#8217;t upgraded my system Ruby yet I played with 1.9 via the <a href="http://rvm.beginrescueend.com/" target="_blank">Ruby Version Manager (RVM)</a>, an easy to use command line tool that allows you to keep different versions of Ruby on your box and switch between them with ease. It works great!</p>
<p><em><a href="http://mighty-nice.com">Mighty Nice</a> <a href="http://mightyvites.com">Mightyvites</a> are proudly powered by Ruby and <a href="http://rubyonrails.org" target="_blank">Ruby On Rails</a></em></p>
<h4>Incoming search terms:</h4><ul><li>chicago ruby hack night</li><li>night vites</li><li>owd hacknight blog</li><li>nite vites re</li><li>nice lessons</li><li>lessons of how to use command prompt to hack</li><li>how to use command prompt to hack</li><li>hack lessons website</li><li>command line ruby hack</li><li>ruby varargs hash</li></ul>]]></content:encoded>
			<wfw:commentRss>http://mightyvites.com/blog/web-tech/mighty-nice-lessons-from-chicago-ruby-hack-night/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
