<?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>Chris Irish &#124; Ruby, Rails, Javascript Developer &#124; Phoenix, AZ &#187; OpenSSL</title>
	<atom:link href="http://www.christopherirish.com/tag/openssl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christopherirish.com</link>
	<description>Ruby, Rails, Javascript, all things web development related</description>
	<lastBuildDate>Mon, 19 Jan 2026 07:43:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Ruby 1.8.7 openssl Bus Error</title>
		<link>http://www.christopherirish.com/2010/06/21/ruby-1-8-7-openssl-bus-error/</link>
		<comments>http://www.christopherirish.com/2010/06/21/ruby-1-8-7-openssl-bus-error/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 15:00:37 +0000</pubDate>
		<dc:creator>Irish</dc:creator>
				<category><![CDATA[Installation]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RVM]]></category>

		<guid isPermaLink="false">http://www.christopherirish.com/?p=333</guid>
		<description><![CDATA[Recently I switched from using my local ruby install to using RVM for managing all my ruby installations. RVM is pretty awesome and I highly recommend it. I went ahead and installed a few versions of ruby that I&#8217;d like to use including, ruby 1.8.7 (for work projects) and 1.9.2 (for playing with rails 3). [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Recently I switched from using my local ruby install to using RVM for managing all my ruby installations.  RVM is pretty awesome and I highly recommend it.  I went ahead and installed a few versions of ruby that I&#8217;d like to use including, ruby 1.8.7 (for work projects) and 1.9.2 (for playing with rails 3).</p>
<p>I came across an issue though with my 1.8.7 install when trying to run a rake db:migrate:reset command with my current work project.  It was along the lines of this:</p>

<div class="wp-terminal">$ rake db:migrate:reset<br/>(in /Users/cirish/Projects/so-ch)<br/>/Users/cirish/.rvm/rubies/ruby-1.8.7-tv1_8_7_173/lib/ruby/1.8/openssl/ssl.rb:31: [BUG] Bus Error<br/>ruby 1.8.7 (2009-06-08 patchlevel 173) [i686-darwin9.8.0]<br/><br/>Abort trap<br/>$ <br/></div>

<p>Well that&#8217;s no bueno.  It turns out that this is happening because, I have two openssl installations.  A system one and other that I installed through macports.  The reason the bus error is being thrown is that my eventmachine gem wasn&#8217;t compiled with the same openssl lib as my ruby 1.8.7 install.  We can confirm this by running the following:</p>

<div class="wp-terminal">$ ruby -rubygems -e" require 'openssl' "; echo $? 0<br/>0 0<br/><br/>$ ruby -rubygems -e" require 'eventmachine'; require 'openssl' "; echo $?<br/>/Users/cirish/.rvm/rubies/ruby-1.8.7-tv1_8_7_173/lib/ruby/1.8/openssl/ssl.rb:31: [BUG] Bus Error<br/>ruby 1.8.7 (2009-06-08 patchlevel 173) [i686-darwin9.8.0]<br/><br/>Abort trap<br/>134<br/><br/></div>

<p>At this point you could either recompile ruby and point it to the correct openssl lib or recompile eventmachine to use the system&#8217;s openssl.  Since this was a new ruby install anyways, I chose to just recompile ruby.</p>

<div class="wp-terminal">$ rvm install ruby-1.8.7-tv1_8_7_174 --configure --enable-shared=true,--with-openssl-dir=/opt/local --debug<br/></div>

<p>Now let&#8217;s check the install again</p>

<div class="wp-terminal">$ ruby -rubygems -e" require 'eventmachine'; require 'openssl' "; echo $?<br/>0<br/></div>

<p>Fixed <img src='http://www.christopherirish.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherirish.com/2010/06/21/ruby-1-8-7-openssl-bus-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
