<?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>Backdrifter &#187; rails</title>
	<atom:link href="http://www.backdrifter.com/tags/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.backdrifter.com</link>
	<description>The personal site of Jared Hanson</description>
	<lastBuildDate>Fri, 02 Sep 2011 03:49:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Stack Level Too Deep with RSpec 2 and Webrat</title>
		<link>http://www.backdrifter.com/2010/11/07/stack-level-too-deep-with-rspec-2-and-webrat/</link>
		<comments>http://www.backdrifter.com/2010/11/07/stack-level-too-deep-with-rspec-2-and-webrat/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 19:54:33 +0000</pubDate>
		<dc:creator>Jared Hanson</dc:creator>
				<category><![CDATA[Unknown]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[webrat]]></category>

		<guid isPermaLink="false">http://www.backdrifter.com/?p=253</guid>
		<description><![CDATA[I&#8217;m currently following along with the Ruby on Rails Tutorial, hoping to pick up some tips and improve my understanding of Rails 3.  I recommend the tutorial, especially to people just learning Rails.  For those with more experience, you&#8217;ll find certain aspects to be a bit elementary.  However, I&#8217;m personally appreciating the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently following along with the <a href="http://railstutorial.org/book">Ruby on Rails Tutorial</a>, hoping to pick up some tips and improve my understanding of <a href="http://rubyonrails.org/">Rails</a> 3.  I recommend the tutorial, especially to people just learning Rails.  For those with more experience, you&#8217;ll find certain aspects to be a bit elementary.  However, I&#8217;m personally appreciating the focus on testing throughout the development process.</p>
<p>The Rails community is still catching up to the recently released Rails 3.  <a href="http://rspec.info/">RSpec</a>, which the tutorial recommends for testing, is no exception.  RSpec 2 is the latest version, and the first to bring compatibility with Rails 3.  However, I&#8217;m finding that there are still a few kinks that need to be worked out.</p>
<p>Most of the issues I&#8217;ve encountered have been easy to solve.  However, I encountered a particularly frustrating problem dealing with the interrelation between <a href="https://github.com/rspec/rspec-rails">rspec-rails</a> and <a href="https://github.com/brynary/webrat">webrat</a>, which is described in this <a href="https://github.com/rspec/rspec-rails/issues/#issue/140">issue</a>.  It is a known problem that has been variously fixed and re-broken by commits to the two libraries in question.</p>
<p><span id="more-253"></span></p>
<p>When executing an integration test using the following code:<br />
<code style="text-align: left;"><br />
describe "LayoutLinks" do<br />
&nbsp;&nbsp;describe "GET /" do<br />
&nbsp;&nbsp;&nbsp;&nbsp;it "should have a Home page at '/'" do<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get '/'<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;response.should have_selector('title', :content => "Home")<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;end<br />
end<br />
</code></p>
<p>A failure is reported:<br />
<code><br />
Failures:<br />
&nbsp;&nbsp;1) LayoutLinks GET / should have a Home page at '/'<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Failure/Error: response.should have_selector('title', :content => "Home")<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stack level too deep<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# ./spec/requests/layout_links_spec.rb:8<br />
</code></p>
<p>I haven&#8217;t traced down the exact issue, but it appears to be caused by webrat 0.7.2, and its interaction with both rspec-rails 2.0.1 and 2.1.0.  I attempted upgrading to webrat 0.7.2.beta.2, but that did not resolve the issue. However, <i>downgrading</i> to webrat 0.7.1 did.</p>
<p>Simply specify the following in your Gemfile:<br />
<code><br />
group :test do<br />
&nbsp;&nbsp;gem "webrat", "0.7.1"<br />
end<br />
</code></p>
<p>Execute <code>bundle install</code> to use webrat 0.7.1 and the error will be resolved.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backdrifter.com/2010/11/07/stack-level-too-deep-with-rspec-2-and-webrat/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails 1.2 Released</title>
		<link>http://www.backdrifter.com/2007/01/19/ruby-on-rails-12-released/</link>
		<comments>http://www.backdrifter.com/2007/01/19/ruby-on-rails-12-released/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 05:34:08 +0000</pubDate>
		<dc:creator>Jared Hanson</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.backdrifter.com/2007/01/19/ruby-on-rails-12-released/</guid>
		<description><![CDATA[Ruby on Rails 1.2 has been released!  This is the latest version of the popular framework for building web applications.  Coinciding with this release of Rails 1.2 is the release of Prototype 1.5.  Prototype is the JavaScript framework that powers the rich functionality of many web applications.
Ruby on Rails dramatically altered the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rubyonrails.org/">Ruby on Rails</a> 1.2 has been <a href="http://weblog.rubyonrails.org/2007/1/19/rails-1-2-rest-admiration-http-lovefest-and-utf-8-celebrations">released</a>!  This is the latest version of the popular framework for building web applications.  Coinciding with this release of Rails 1.2 is the <a href="http://weblog.rubyonrails.org/2007/1/19/prototype-1-5-now-with-a-manual">release</a> of <a href="http://www.prototypejs.org/">Prototype</a> 1.5.  Prototype is the JavaScript framework that powers the rich functionality of many web applications.</p>
<p>Ruby on Rails dramatically altered the way people build web applications.  With the 1.2 release, it continues to influence thought patterns by bringing <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">REST</a> to the forefront.  REST provides a set of principles for the design of network-based software.  By presenting these patterns to a mainstream audience, Rails is having a profound impact on the future of software development.</p>
<p>The release also has numerous other improvements, including Unicode support, a new URL routing implementation, and better module loading.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backdrifter.com/2007/01/19/ruby-on-rails-12-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Message Passing Web</title>
		<link>http://www.backdrifter.com/2006/10/15/the-message-passing-web/</link>
		<comments>http://www.backdrifter.com/2006/10/15/the-message-passing-web/#comments</comments>
		<pubDate>Mon, 16 Oct 2006 01:48:36 +0000</pubDate>
		<dc:creator>Jared Hanson</dc:creator>
				<category><![CDATA[http]]></category>
		<category><![CDATA[objectivec]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[smalltalk]]></category>

		<guid isPermaLink="false">http://www.backdrifter.com/2006/10/15/the-message-passing-web/</guid>
		<description><![CDATA[Objective-C is hands-down my favorite programming language.  Even though I was taught primarily C++ in college, and indeed spend most of my time coding in that language, I consider knowledge of Objective-C to have given me the most useful insights into software design and architecture.
My Objective-C leanings lead me to use Ruby as a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/">Objective-C</a> is hands-down my favorite programming language.  Even though I was taught primarily C++ in college, and indeed spend most of my time coding in that language, I consider knowledge of Objective-C to have given me the most useful insights into software design and architecture.</p>
<p>My Objective-C leanings lead me to use <a href="http://www.ruby-lang.org/">Ruby</a> as a scripting language.  Ruby has been propelled into the spotlight recently by <a href="http://www.rubyonrails.org/">Ruby on Rails</a>, an incredible framework for developing web applications.</p>
<p>Objective-C and Ruby are both descendants of <a href="http://www.smalltalk.org/">Smalltalk</a>.  All three languages are object-oriented, and have the notion of message passing as a central construct.  Message passing is not found in more popular languages like C++ and <a href="http://java.sun.com/">Java</a>, yet understanding it can give any developer an invaluable new perspective.</p>
<p><span id="more-10"></span></p>
<p>In an attempt to further my understanding of these concepts, I&#8217;ve recently been studying Smalltalk.  While having been around for more than 30 years, the concepts behind the language are still considered state-of-the-art and its influence is broad.  That influence extends all the way to the web, as I discovered in a recent <a href="http://www.cincomsmalltalk.com/blog/blogView?showComments=true&#038;entry=3338189012">entry</a> by James Robertson.</p>
<p>Found in the comments is a link to an <a href="http://www.w3.org/People/Connolly/9703-web-apps-essay.html">editorial</a> by <a href="http://www.w3.org/People/Connolly/">Dan Connolly</a>, dated February 13, 1997.  From the article:</p>
<blockquote><p>
HTTP was design as a distributed realization of the Objective C (originally Smalltalk) message passing infrastructure: the first few bytes of every HTTP message are a method name: GET or POST. Uniform Resource Locator is just the result of squeezing the term object reference through the IETF standardization process.
</p></blockquote>
<p>Recent projects have caused me to view the web as just such a distributed object system.  However, I was not aware of the historical link to Objective-C and Smalltalk.  Seen in that light, though, the message passing approach is remarkably consistent.</p>
<p>David Heinemeier Hansson, the creator of Ruby on Rails, is a true innovator in the web application frontier.  His addition of Active Resource to edge Rails is the natural next step in this line of thinking.  In his <a href="http://blog.scribestudio.com/articles/2006/07/09/david-heinemeier-hansson-railsconf-2006-keynote-address">keynote address</a> at <a href="http://www.railsconf.org/">RailsConf 2006</a>, he gives a compelling presentation about the benefits of <a href="http://www.loudthinking.com/arc/000593.html">discovering</a> a world of resources.</p>
<p>Message passing languages are efficient and productive for application development.  Unfortunately, they have a minority stake of developer mindshare.  Ruby and Rails are currently improving this situation.  It may be wishful thinking, but I&#8217;d like to see these trends renew interest in Objective-C and Smalltalk as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.backdrifter.com/2006/10/15/the-message-passing-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

