<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Paul On Rails: soap4r is Evil!</title>
    <link>http://paulonrails.com/articles/2007/10/19/soap4r-is-evil</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Paul's thoughts on Rails</description>
    <item>
      <title>soap4r is Evil!</title>
      <description>&lt;p&gt;I was going to talk about setting up rails at MediaTemple, but I just wasted a good portion of yesterday dealing with soap4r.  So I figured I&amp;#8217;d write/vent about that instead.&lt;/p&gt;


	&lt;p&gt;The problem is if soap4r is installed as a gem it tends to kill anything that doesn&amp;#8217;t have &lt;code&gt;require 'soap4r'&lt;/code&gt; installed at the very top of environment.rb.  This is detailed in the this &lt;a href="http://dev.ctor.org/soap4r/ticket/433"&gt;bug&lt;/a&gt;.  Even though its marked as invalid I think the soap4r guys really should do something about it.&lt;/p&gt;


	&lt;p&gt;Anyways until this is fixed and because I didn&amp;#8217;t want to modify some perfectly fine apps, I had to come up with a workaround, perhaps there is a better way to do this, but this is what I came up with.&lt;/p&gt;


	&lt;p&gt;From &lt;span class="caps"&gt;RAILS&lt;/span&gt;_ROOT&lt;/p&gt;


&lt;code&gt;gem install -i vendor/gems soap4r&lt;/code&gt;

	&lt;p&gt;This causes the gem to get installed into vendor/gems.  Note I don&amp;#8217;t think there&amp;#8217;s a way to uninstall the plugin via gem, but for now it&amp;#8217;ll do.&lt;/p&gt;


	&lt;p&gt;Continuing on, I added the following right after the &lt;code&gt;require 'rubygems'&lt;/code&gt; line in boot.rb.&lt;/p&gt;


&lt;code&gt;Gem.path &amp;lt;&amp;lt; "#{RAILS_ROOT}/vendor/gems"&lt;/code&gt;

	&lt;p&gt;and then I just have the standard &lt;code&gt;require 'soap4r'&lt;/code&gt; at the top of requirement.rb.&lt;/p&gt;


	&lt;p&gt;Not what I&amp;#8217;d call the most elegant solution to this problem, but it should work for our env.&lt;/p&gt;</description>
      <pubDate>Fri, 19 Oct 2007 08:00:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:746ef9ed-bc56-4a6a-a453-0a9d1e83c518</guid>
      <author>Paul Haddad</author>
      <link>http://paulonrails.com/articles/2007/10/19/soap4r-is-evil</link>
      <category>Hacks</category>
      <category>soap4r</category>
      <category>Hack</category>
      <category>workaround</category>
      <category>bug</category>
      <category>sucks</category>
    </item>
  </channel>
</rss>
