<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Ruby On Rails Gotchas</title>
	<atom:link href="http://railsgotchas.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://railsgotchas.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sat, 20 Oct 2012 13:57:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='railsgotchas.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Ruby On Rails Gotchas</title>
		<link>http://railsgotchas.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://railsgotchas.wordpress.com/osd.xml" title="Ruby On Rails Gotchas" />
	<atom:link rel='hub' href='http://railsgotchas.wordpress.com/?pushpress=hub'/>
		<item>
		<title>attr_accessible with many roles</title>
		<link>http://railsgotchas.wordpress.com/2012/10/20/attr_accessible-with-many-roles/</link>
		<comments>http://railsgotchas.wordpress.com/2012/10/20/attr_accessible-with-many-roles/#comments</comments>
		<pubDate>Sat, 20 Oct 2012 13:57:10 +0000</pubDate>
		<dc:creator>gabeodess</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://railsgotchas.wordpress.com/?p=81</guid>
		<description><![CDATA[I recently ran into an interesting issue with attr_accessible due to overlooking certain configurations I made in my application. The symptom was that when I would add attr_accessible to one of my models, suddenly all of the attributes would be inaccessible. The problem stems from the fact that I had configured mass_assignment_role (used by attr_accessible) to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=81&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I recently ran into an interesting issue with attr_accessible due to overlooking certain configurations I made in my application.</p>
<p>The symptom was that when I would add attr_accessible to one of my models, suddenly all of the attributes would be inaccessible.</p>
<p>The problem stems from the fact that I had configured mass_assignment_role (used by attr_accessible) to resolve to :admin automatically if I was logged in as an administrator.</p>
<pre>class ActiveRecord::Base
  def mass_assignment_role
    role = mass_assignment_options[:as] || (Authorization.current_user.role_symbols.include?(:admin) ? :admin : :default)
  end
end</pre>
<p>The problem is that by defining attr_accessible for the :default role it automatically locks down all attributes for any other role.</p>
<p>The solution was to simple remember to define the accessibility for both roles whenever defining attr_accessible:</p>
<pre>class MyModel &lt; ActiveRecord::Base
  @@accessible_attributes = %(attr1 attr2 attr3)
  attr_accessible *@@accessible_attributes
  attr_accessible *@@accessible_attributes, as: :admin
end</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railsgotchas.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railsgotchas.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=81&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railsgotchas.wordpress.com/2012/10/20/attr_accessible-with-many-roles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0d08ce21b62bcb009e5f274c22b03fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabeodess</media:title>
		</media:content>
	</item>
		<item>
		<title>ActiveAdmin, Spork, and the infamous &#8220;undefined local variable or method `view_factory&#8217;&#8221;</title>
		<link>http://railsgotchas.wordpress.com/2012/01/31/activeadmin-spork-and-the-infamous-undefined-local-variable-or-method-view_factory/</link>
		<comments>http://railsgotchas.wordpress.com/2012/01/31/activeadmin-spork-and-the-infamous-undefined-local-variable-or-method-view_factory/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 16:24:07 +0000</pubDate>
		<dc:creator>gabeodess</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://railsgotchas.wordpress.com/?p=72</guid>
		<description><![CDATA[If you are using ActiveAdmin and you are also using Spork as part of your testing suite you are probably extremely frustrated with an error that looks something like this: ActionView::Template::Error: undefined local variable or method `view_factory' for #&#60;#Class:0x000001070ccf80:0x000001070c7648&#62; This issue has been queued and is discussed further here: https://github.com/gregbell/active_admin/issues/918 Your solution is simple.  Just add [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=72&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>If you are using ActiveAdmin and you are also using Spork as part of your testing suite you are probably extremely frustrated with an error that looks something like this:</p>
<pre>ActionView::Template::Error: undefined local variable or method `view_factory' for #&lt;#Class:0x000001070ccf80:0x000001070c7648&gt;</pre>
<p>This issue has been queued and is discussed further here: <a href="https://github.com/gregbell/active_admin/issues/918#issuecomment-3741826" target="_blank">https://github.com/gregbell/active_admin/issues/918</a></p>
<p>Your solution is simple.  Just add the following to your test/test_helper.rb:</p>
<pre>Spork.each_run do
  ActionView::Template.register_template_handler :arb, lambda { |template|
    "self.class.send :include, Arbre::Builder; @_helpers = self; self.extend ActiveAdmin::ViewHelpers; @__current_dom_element__ = Arbre::Context.new(assigns, self); begin; #{template.source}; end; current_dom_context"
  }
end</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railsgotchas.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railsgotchas.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=72&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railsgotchas.wordpress.com/2012/01/31/activeadmin-spork-and-the-infamous-undefined-local-variable-or-method-view_factory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0d08ce21b62bcb009e5f274c22b03fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabeodess</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding Custom Buttons To Active Admin</title>
		<link>http://railsgotchas.wordpress.com/2012/01/26/adding-custom-buttons-to-active-admin/</link>
		<comments>http://railsgotchas.wordpress.com/2012/01/26/adding-custom-buttons-to-active-admin/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 23:50:34 +0000</pubDate>
		<dc:creator>gabeodess</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://railsgotchas.wordpress.com/?p=61</guid>
		<description><![CDATA[While there doesn&#8217;t appear to be explicit support for managing the buttons that appear in the top right of active admin (&#8220;New Share&#8221;, &#8220;Delete&#8221;, etc.) I did some digging and managed to find a solution. ActiveAdmin.register Share do action_item only:[:show] do link_to "Message Customers", new_admin_share_blast_path(share_blast:{share_id:share}) end end Calling the action_item method will print the contents [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=61&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>While there doesn&#8217;t appear to be explicit support for managing the buttons that appear in the top right of active admin (&#8220;New Share&#8221;, &#8220;Delete&#8221;, etc.) I did some digging and managed to find a solution.</p>
<pre>ActiveAdmin.register Share do

 action_item only:[:show] do
   link_to "Message Customers", new_admin_share_blast_path(share_blast:{share_id:share})
 end

end</pre>
<p>Calling the action_item method will print the contents of the block as a button in the area in question.  You can control which pages you would like the custom action item to be displayed on by passing a hash with either an :except or <img src='http://s1.wp.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> nly key.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railsgotchas.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railsgotchas.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=61&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railsgotchas.wordpress.com/2012/01/26/adding-custom-buttons-to-active-admin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0d08ce21b62bcb009e5f274c22b03fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabeodess</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing ruby with rvm and homebrew</title>
		<link>http://railsgotchas.wordpress.com/2012/01/06/installing-ruby-with-rvm-and-homebrew/</link>
		<comments>http://railsgotchas.wordpress.com/2012/01/06/installing-ruby-with-rvm-and-homebrew/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 21:20:15 +0000</pubDate>
		<dc:creator>gabeodess</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://railsgotchas.wordpress.com/?p=56</guid>
		<description><![CDATA[When I tried install ruby 1.9.3 I kept getting this error: It seems your ruby installation is missing psych (for YAML output) I checked my installations and found that I had libyaml located in /usr/local/Cellar/ courtesy of homebrew.  The solution was to tell RVM where to find libyaml during install: rvm install ruby-1.9.3-p0 --with-libyaml-dir=/usr/local/Cellar<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=56&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>When I tried install ruby 1.9.3 I kept getting this error:</p>
<pre>It seems your ruby installation is missing psych (for YAML output)</pre>
<p>I checked my installations and found that I had libyaml located in /usr/local/Cellar/ courtesy of homebrew.  The solution was to tell RVM where to find libyaml during install:</p>
<pre>rvm install ruby-1.9.3-p0 --with-libyaml-dir=/usr/local/Cellar</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railsgotchas.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railsgotchas.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=56&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railsgotchas.wordpress.com/2012/01/06/installing-ruby-with-rvm-and-homebrew/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0d08ce21b62bcb009e5f274c22b03fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabeodess</media:title>
		</media:content>
	</item>
		<item>
		<title>Why doesn&#8217;t Stringex work with Mocha?</title>
		<link>http://railsgotchas.wordpress.com/2011/12/19/why-doesnt-stringex-work-with-mocha/</link>
		<comments>http://railsgotchas.wordpress.com/2011/12/19/why-doesnt-stringex-work-with-mocha/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 23:49:10 +0000</pubDate>
		<dc:creator>gabeodess</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://railsgotchas.wordpress.com/?p=53</guid>
		<description><![CDATA[If you are getting routing issues with models using acts_as_url from Stringex, but on in your tests, and only tests that use Mocha&#8217;s stubbing methods, this is for you. Stringex does all of its acts_as_url crunching in before_validation callbacks.  If you are stubbing the :valid? method, that is your problem.  Mocha&#8217;s stubbing method actually rewrites [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=53&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>If you are getting routing issues with models using acts_as_url from Stringex, but on in your tests, and only tests that use Mocha&#8217;s stubbing methods, this is for you.</p>
<p>Stringex does all of its acts_as_url crunching in before_validation callbacks.  If you are stubbing the :valid? method, that is your problem.  Mocha&#8217;s stubbing method actually rewrites the method being stubbed, therefore, unless you stub the :valid? method to actually call it&#8217;s callbacks you will no longer get all the handy url setting done by Stringex.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railsgotchas.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railsgotchas.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=53&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railsgotchas.wordpress.com/2011/12/19/why-doesnt-stringex-work-with-mocha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0d08ce21b62bcb009e5f274c22b03fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabeodess</media:title>
		</media:content>
	</item>
		<item>
		<title>Overriding Load Methods for Declarative Authorization</title>
		<link>http://railsgotchas.wordpress.com/2011/12/17/overriding-load-methods-for-declarative-authorization/</link>
		<comments>http://railsgotchas.wordpress.com/2011/12/17/overriding-load-methods-for-declarative-authorization/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 20:10:39 +0000</pubDate>
		<dc:creator>gabeodess</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://railsgotchas.wordpress.com/?p=51</guid>
		<description><![CDATA[The trick here is to be sure that the methods you are overriding are declared specifically as protected methods.  If they are public or private methods, Declarative Authorization will ignore them. So, in your UsersController, declare it like so: protected def load_user @user = User.find_by_login(params[:id]) raise ActiveRecord::RecordNotFound.new("Could not find User with login=#{params[:id]}") unless @user end If [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=51&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The trick here is to be sure that the methods you are overriding are declared specifically as <em>protected</em> methods.  If they are public or private methods, Declarative Authorization will ignore them.</p>
<p>So, in your UsersController, declare it like so:</p>
<pre>protected
def load_user
  @user = User.find_by_login(params[:id])
  raise ActiveRecord::RecordNotFound.new("Could not find User with login=#{params[:id]}") unless @user
end</pre>
<p>If you do not explicitly raise the error in this method when the record is not found, DA will fall back to it&#8217;s default loading methods.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railsgotchas.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railsgotchas.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=51&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railsgotchas.wordpress.com/2011/12/17/overriding-load-methods-for-declarative-authorization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0d08ce21b62bcb009e5f274c22b03fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabeodess</media:title>
		</media:content>
	</item>
		<item>
		<title>Testing with Spork, Guard, and Test::Unit</title>
		<link>http://railsgotchas.wordpress.com/2011/12/16/testing-with-spork-guard-and-testunit/</link>
		<comments>http://railsgotchas.wordpress.com/2011/12/16/testing-with-spork-guard-and-testunit/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 18:39:47 +0000</pubDate>
		<dc:creator>gabeodess</dc:creator>
				<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://railsgotchas.wordpress.com/?p=41</guid>
		<description><![CDATA[Gemfile: group :test do gem 'factory_girl_rails' gem 'mocha' gem 'capybara' gem 'spork', '~&#62; 0.9.0.rc' gem 'spork-testunit' gem 'guard-spork' gem 'guard-test' gem 'rb-inotify', :require =&#62; false gem 'rb-fsevent', :require =&#62; false gem 'rb-fchange', :require =&#62; false gem 'growl_notify' end Run: bundle install spork --bootstrap guard init spork guard init test Guardfile: guard 'spork', :wait =&#62; 60, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=41&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h2>Gemfile:</h2>
<pre>group :test do
 gem 'factory_girl_rails'
 gem 'mocha'
 gem 'capybara'
 gem 'spork', '~&gt; 0.9.0.rc'
 gem 'spork-testunit'
 gem 'guard-spork'
 gem 'guard-test'
 gem 'rb-inotify', :require =&gt; false
 gem 'rb-fsevent', :require =&gt; false
 gem 'rb-fchange', :require =&gt; false
 gem 'growl_notify'
end</pre>
<h2>Run:</h2>
<p><code>bundle install</code><br />
<code>spork --bootstrap</code><br />
<code>guard init spork</code><br />
<code>guard init test</code></p>
<h2>Guardfile:</h2>
<pre>guard 'spork', :wait =&gt; 60, :test_unit_env =&gt; { 'RAILS_ENV' =&gt; 'test' } do
 watch('config/application.rb')
 watch('config/environment.rb')
 watch(%r{^config/environments/.+\.rb$})
 watch(%r{^config/initializers/.+\.rb$})
 watch('Gemfile')
 watch('Gemfile.lock')
 watch('test/test_helper.rb') { :test_unit }
end

guard :test, :drb =&gt; true do
 watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
 watch(%r{^test/.+_test\.rb$})
 watch('test/test_helper.rb') { "test" }
 # Rails example
 watch(%r{^app/models/(.+)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
 watch(%r{^app/controllers/(.+)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
 watch(%r{^app/views/.+\.rb$}) { "test/integration" }
 watch('app/controllers/application_controller.rb') { ["test/functional", "test/integration"] }
end</pre>
<h2>test/test_helper.rb:</h2>
<pre>require 'rubygems'
require 'spork'
Spork.prefork do
 # Loading more in this block will cause your tests to run faster. However,
 # if you change any configuration or code from libraries loaded here, you'll
 # need to restart spork for it take effect.

 ENV["RAILS_ENV"] = "test"
 require File.expand_path('../../config/environment', __FILE__)
 require 'rails/test_help'
 require 'mocha'

 # =====================
 # = Integration Tests =
 # =====================
 require "capybara/rails"
 module ActionController
  class IntegrationTest
   include Capybara::DSL
  end
 end

 # ===============
 # = Other Tests =
 # ===============
 class ActiveSupport::TestCase
  fixtures :all
 end
end
Spork.each_run do
 # This code will be run each time you run your specs.
end</pre>
<p>If you are using Active Admin you are going to want to include a little patch in your each_run block to avoid getting an &#8220;undefined method: view_factory&#8221; error:</p>
<pre>Spork.each_run do
  ActionView::Template.register_template_handler :arb, lambda { |template|
    "self.class.send :include, Arbre::Builder; @_helpers = self; self.extend ActiveAdmin::ViewHelpers; @__current_dom_element__ = Arbre::Context.new(assigns, self); begin; #{template.source}; end; current_dom_context"
  }
end</pre>
<h2>Run your tests:</h2>
<pre>guard</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railsgotchas.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railsgotchas.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=41&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railsgotchas.wordpress.com/2011/12/16/testing-with-spork-guard-and-testunit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0d08ce21b62bcb009e5f274c22b03fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabeodess</media:title>
		</media:content>
	</item>
		<item>
		<title>Active Admin Printing Raw HTML</title>
		<link>http://railsgotchas.wordpress.com/2011/11/06/active-admin-printing-raw-html/</link>
		<comments>http://railsgotchas.wordpress.com/2011/11/06/active-admin-printing-raw-html/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 02:28:46 +0000</pubDate>
		<dc:creator>gabeodess</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://railsgotchas.wordpress.com/?p=39</guid>
		<description><![CDATA[My development log was spitting out a number of instances of &#8220;String#to_html was called without RedCloth being successfully required&#8221;.  This turned out to be a conflict between Active Admin and Stringex.  It turns out that they both declare a to_html method but in the order of loading, Stringex&#8217;s version prevails. In the latest updates in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=39&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>My development log was spitting out a number of instances of &#8220;String#to_html was called without RedCloth being successfully required&#8221;.  This turned out to be a conflict between Active Admin and Stringex.  It turns out that they both declare a to_html method but in the order of loading, Stringex&#8217;s version prevails.</p>
<p>In the latest updates in active admin this conflict has been removed, but not so in the latest release.  To get the latest updates from the master branch explicitely grab the master branch in your Gemfile:</p>
<pre># =&gt; unreleased changes in the activeadmin master branch remove to_html conflict with stringex
gem "activeadmin", git:'git://github.com/gregbell/active_admin.git', branch:"master"</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railsgotchas.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railsgotchas.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=39&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railsgotchas.wordpress.com/2011/11/06/active-admin-printing-raw-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0d08ce21b62bcb009e5f274c22b03fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabeodess</media:title>
		</media:content>
	</item>
		<item>
		<title>rake db:create complaining about charsets and collation</title>
		<link>http://railsgotchas.wordpress.com/2011/10/26/rake-dbcreate-complaining-about-charsets-and-collation/</link>
		<comments>http://railsgotchas.wordpress.com/2011/10/26/rake-dbcreate-complaining-about-charsets-and-collation/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 16:10:37 +0000</pubDate>
		<dc:creator>gabeodess</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://railsgotchas.wordpress.com/?p=36</guid>
		<description><![CDATA[I ran into this problem after upgrading from Leopard to Snow Leopard, the main difference being an upgrade from a 32-bit OS to a 64-bit OS. I had to re-install MySQL to get the 64-bit version.  To avoid the stated error you must also re-install the mysql gem as it will configure itself to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=36&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I ran into this problem after upgrading from Leopard to Snow Leopard, the main difference being an upgrade from a 32-bit OS to a 64-bit OS.</p>
<p>I had to re-install MySQL to get the 64-bit version.  To avoid the stated error you must also re-install the mysql gem as it will configure itself to the currently installed version of MySQL.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railsgotchas.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railsgotchas.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=36&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railsgotchas.wordpress.com/2011/10/26/rake-dbcreate-complaining-about-charsets-and-collation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0d08ce21b62bcb009e5f274c22b03fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabeodess</media:title>
		</media:content>
	</item>
		<item>
		<title>MySQL 5.5 won&#8217;t start in Snow Leopard!</title>
		<link>http://railsgotchas.wordpress.com/2011/10/26/mysql-5-5-wont-start-in-snow-leopard/</link>
		<comments>http://railsgotchas.wordpress.com/2011/10/26/mysql-5-5-wont-start-in-snow-leopard/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 16:01:04 +0000</pubDate>
		<dc:creator>gabeodess</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://railsgotchas.wordpress.com/?p=34</guid>
		<description><![CDATA[What do you do when you&#8217;ve upgraded to Snow Leopard and you download the 64-bit dmg of MySQL 5.5 and it installs and you install the preference pane and you click &#8220;start&#8221; and nothing happens? Well, I couldn&#8217;t figure it out, so I installed MySQL 5.1 because it just works.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=34&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>What do you do when you&#8217;ve upgraded to Snow Leopard and you download the 64-bit dmg of MySQL 5.5 and it installs and you install the preference pane and you click &#8220;start&#8221; and nothing happens?</p>
<p>Well, I couldn&#8217;t figure it out, so I installed MySQL 5.1 because it just works.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railsgotchas.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railsgotchas.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railsgotchas.wordpress.com&#038;blog=23540813&#038;post=34&#038;subd=railsgotchas&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railsgotchas.wordpress.com/2011/10/26/mysql-5-5-wont-start-in-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0d08ce21b62bcb009e5f274c22b03fe?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabeodess</media:title>
		</media:content>
	</item>
	</channel>
</rss>
