<?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>Jtanium's Notebook &#187; Subversion</title>
	<atom:link href="http://www.jtanium.com/category/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jtanium.com</link>
	<description>I jot things down, in hopes of finding them later...</description>
	<lastBuildDate>Wed, 21 Dec 2011 23:21:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Using Native Bindings with Ruby Enterprise Edition</title>
		<link>http://www.jtanium.com/2008/10/13/using-native-bindings-with-ruby-enterprise-edition/</link>
		<comments>http://www.jtanium.com/2008/10/13/using-native-bindings-with-ruby-enterprise-edition/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 22:33:55 +0000</pubDate>
		<dc:creator>jtanium</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[phusion]]></category>
		<category><![CDATA[ruby enterprise edition]]></category>
		<category><![CDATA[warehouse]]></category>

		<guid isPermaLink="false">http://www.jtanium.com/blog/?p=63</guid>
		<description><![CDATA[I recently started using Passenger and Ruby Enterprise Edition to run my Rails apps. &#8220;It was just another day at the office, until suddenly&#8230;&#8221; I wanted to run Warehouse. It turns out that things get (just) slightly hairy when you need to use the native bindings for a library, in this case Subversion/SWIG. I ran [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started using <a href="http://www.modrails.com/">Passenger</a> and <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a> to run my Rails apps.</p>
<p>&#8220;It was just another day at the office, until suddenly&#8230;&#8221; I wanted to run <a href="http://www.warehouseapp.com/">Warehouse</a>.  It turns out that things get (just) slightly hairy when you need to use the native bindings for a library, in this case Subversion/SWIG.</p>
<p>I ran <code>rake warehouse:bootstrap</code> without incident, but as soon as I submitted the &#8216;install&#8217; form, it died.  This is what I found in the log:</p>
<pre>ActionView::TemplateError (/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:478:in `const_missing': uninitialized constant Repository::Svn) on line #23 of repositories/index.html.erb:
20:
<li class="repo" id="repo-<%= repo.id %>">
21:     <%= link_to h(repo.name), hosted_url(repo, :admin) %>
22:     <span class="log"><%= repo.path %></span>
23:   <% if repo.sync? %>
24:   <% unless repo.sync_progress == 100 %>
25:
26:
<div class="need-sync" id="sync-<%= repo.id %>">

    /srv/rails/entp-warehouse-78376218f92e6bdf8b72993d9caa384e5d4a5c66/vendor/plugins/expiring_attr_reader/lib/expiring_attr_reader.rb:32:in `silo'
    /srv/rails/entp-warehouse-78376218f92e6bdf8b72993d9caa384e5d4a5c66/app/models/repository.rb:137:in `retrieve_silo'
    (eval):1:in `silo'
    /srv/rails/entp-warehouse-78376218f92e6bdf8b72993d9caa384e5d4a5c66/app/models/repository.rb:100:in `eval'
    /srv/rails/entp-warehouse-78376218f92e6bdf8b72993d9caa384e5d4a5c66/vendor/plugins/expiring_attr_reader/lib/expiring_attr_reader.rb:32:in `silo'
    /srv/rails/entp-warehouse-78376218f92e6bdf8b72993d9caa384e5d4a5c66/app/models/repository.rb:100:in `sync?'
    /srv/rails/entp-warehouse-78376218f92e6bdf8b72993d9caa384e5d4a5c66/app/views/repositories/index.html.erb:23:in `_run_erb_47app47views47repositories47index46html46erb'
    /srv/rails/entp-warehouse-78376218f92e6bdf8b72993d9caa384e5d4a5c66/app/views/repositories/index.html.erb:19:in `each'
    /srv/rails/entp-warehouse-78376218f92e6bdf8b72993d9caa384e5d4a5c66/app/views/repositories/index.html.erb:19:in `_run_erb_47app47views47repositories47index46html46erb'
...</pre>
<p>Naturally I had installed the bindings using <code>sudo apt-get install libsvn-ruby1.8</code> so they were available to the default Ruby (located in <code>/usr/lib/ruby</code>), but not Ruby Enterprise Edition (located in <code>/opt/ruby-enterprise</code>), which the application runs on.</p>
<p>My solution was to simply symlink the Subversion bindings into Ruby Enterprise Edition.  A quick look in the libsvn-ruby package (<code>sudo dpkg -L libsvn-ruby1.8</code>) shows us what we&#8217;re dealing with:</p>
<pre>...
/usr/lib/ruby/1.8/i486-linux
/usr/lib/ruby/1.8/i486-linux/svn
/usr/lib/ruby/1.8/i486-linux/svn/ext
/usr/lib/ruby/1.8/i486-linux/svn/ext/core.so
/usr/lib/ruby/1.8/i486-linux/svn/ext/client.so
/usr/lib/ruby/1.8/i486-linux/svn/ext/delta.so
/usr/lib/ruby/1.8/i486-linux/svn/ext/fs.so
/usr/lib/ruby/1.8/i486-linux/svn/ext/ra.so
/usr/lib/ruby/1.8/i486-linux/svn/ext/repos.so
/usr/lib/ruby/1.8/i486-linux/svn/ext/wc.so
/usr/lib/ruby/1.8/svn
/usr/lib/ruby/1.8/svn/client.rb
/usr/lib/ruby/1.8/svn/core.rb
/usr/lib/ruby/1.8/svn/delta.rb
/usr/lib/ruby/1.8/svn/error.rb
/usr/lib/ruby/1.8/svn/fs.rb
/usr/lib/ruby/1.8/svn/info.rb
/usr/lib/ruby/1.8/svn/ra.rb
/usr/lib/ruby/1.8/svn/repos.rb
/usr/lib/ruby/1.8/svn/util.rb
/usr/lib/ruby/1.8/svn/wc.rb
...</pre>
<p>The key directories are: <code>/usr/lib/ruby/1.8/i486-linux/svn</code> and <code>/usr/lib/ruby/1.8/svn</code>.  So we&#8217;ll make them available to <code>/opt/ruby-enterprise</code> like so:</p>
<pre>cd /opt/ruby-enterprise/lib/ruby/1.8
sudo ln -s /usr/lib/ruby/1.8/svn
cd /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/i686-linux
sudo ln -s /usr/lib/ruby/1.8/i486-linux/svn</pre>
<p>After that, just restart Apache (<code>apache2ctl restart</code>), and it should be working.  Note, a simple <code>touch tmp/restart.txt</code> won&#8217;t work, because that doesn&#8217;t reload the libraries.  You actually need the <code>/opt/ruby-enterprise/ruby</code> process to restart.</p>
<p>Theoretically this same approach should work for any native bindings you need to be available to Ruby Enterprise Edition.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jtanium.com/2008/10/13/using-native-bindings-with-ruby-enterprise-edition/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Search and Replace</title>
		<link>http://www.jtanium.com/2007/08/11/search-and-replace/</link>
		<comments>http://www.jtanium.com/2007/08/11/search-and-replace/#comments</comments>
		<pubDate>Sat, 11 Aug 2007 20:08:14 +0000</pubDate>
		<dc:creator>jtanium</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.jtanium.com/blog/?p=39</guid>
		<description><![CDATA[I always seem to misplace these&#8230; find . -name "*.rb" -exec sed 's/oldstring/newstring' {} \; find . -name "*.yml" &#124; xargs perl -pi~ -e 's/oldstring/newstring/g;' Essentially they do the same thing, the first uses sed, the second uses Perl. Watch out what you&#8217;re doing with these! If you use find . -type f in a [...]]]></description>
			<content:encoded><![CDATA[<p>I always seem to misplace these&#8230;</p>
<p><code>find . -name "*.rb" -exec sed 's/oldstring/newstring' {} \;</code></p>
<p><code>find . -name "*.yml" | xargs perl -pi~ -e 's/oldstring/newstring/g;'</code></p>
<p>Essentially they do the same thing, the first uses <code>sed</code>, the second uses Perl.  Watch out what you&#8217;re doing with these!  If you use <code>find . -type f</code> in a directory managed by Subversion, prepare for some headaches.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jtanium.com/2007/08/11/search-and-replace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Setup Subversion Ignores</title>
		<link>http://www.jtanium.com/2007/08/09/how-to-setup-subversion-ignores/</link>
		<comments>http://www.jtanium.com/2007/08/09/how-to-setup-subversion-ignores/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 15:15:28 +0000</pubDate>
		<dc:creator>jtanium</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">https://www.jtanium.com/blog/?p=36</guid>
		<description><![CDATA[Seriously, what is the deal with the Subversion book? Why can they not make anything clear. Every time I want to ignore stuff it takes me like half an hour to figure out how to do it again &#8212; so this time I&#8217;m writing it down. The basic command looks like this: svn propset svn:ignore [...]]]></description>
			<content:encoded><![CDATA[<p>Seriously, what is the deal with the <a href="http://svnbook.red-bean.com/">Subversion book</a>?  Why can they not make anything clear.  Every time I want to ignore stuff it takes me like half an hour to figure out how to do it again &#8212; so this time I&#8217;m writing it down.</p>
<p>The basic command looks like this:</p>
<pre>svn propset svn:ignore [PATTERN] [DIRECTORY]</pre>
<p>So in a Rails app, if I want to ignore everything in the <code>log/</code> and <code>tmp/</code> directories I would do the following:</p>
<pre>$ svn propset svn:ignore "*" log
$ svn propset svn:ignore "*" tmp</pre>
<p>If that doesn&#8217;t work try this:</p>
<pre>$ cd log/
$ svn propset svn:ignore "*" .
$ cd ../tmp
$ svn propset svn:ignore "*" .</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jtanium.com/2007/08/09/how-to-setup-subversion-ignores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>svn: Not authorized to open root of edit operation</title>
		<link>http://www.jtanium.com/2007/02/07/svn-not-authorized-to-open-root-of-edit-operation/</link>
		<comments>http://www.jtanium.com/2007/02/07/svn-not-authorized-to-open-root-of-edit-operation/#comments</comments>
		<pubDate>Wed, 07 Feb 2007 14:53:48 +0000</pubDate>
		<dc:creator>jtanium</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://jtanium.dsl.xmission.com/blog/?p=26</guid>
		<description><![CDATA[If you are trying to check something out from an svnserve daemon, and keep seeing this error: /build/buildd/subversion-1.3.1/subversion/libsvn_repos/reporter.c:822: (apr_err=220000) svn: Not authorized to open root of edit operation you can fix it easily by going into $SVN_REPOS_ROOT/my_project/conf/svnserve.conf and changing line 12 from # anon-access = read to anon-access = none. It wouldn&#8217;t hurt to uncomment [...]]]></description>
			<content:encoded><![CDATA[<p>If you are trying to check something out from an svnserve daemon, and keep seeing this error:<br />
<code>/build/buildd/subversion-1.3.1/subversion/libsvn_repos/reporter.c:822: (apr_err=220000)<br />
svn: Not authorized to open root of edit operation</code><br />
you can fix it easily by going into <code>$SVN_REPOS_ROOT/my_project/conf/svnserve.conf</code> and changing line 12 from <code># anon-access = read</code> to <code>anon-access = none</code>.  It wouldn&#8217;t hurt to uncomment line 13 either&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jtanium.com/2007/02/07/svn-not-authorized-to-open-root-of-edit-operation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Setup Subversion Externals</title>
		<link>http://www.jtanium.com/2006/02/27/4/</link>
		<comments>http://www.jtanium.com/2006/02/27/4/#comments</comments>
		<pubDate>Mon, 27 Feb 2006 22:22:43 +0000</pubDate>
		<dc:creator>jtanium</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://jtanium.dsl.xmission.com/wordpress/?p=4</guid>
		<description><![CDATA[So I&#8217;ve read the svn book, especially this pages: http://svnbook.red-bean.com/en/1.1/ch07s04.html http://svnbook.red-bean.com/en/1.1/ch07s02.html trying to figure out how to use the svn:externals property.A All I was looking for was something that says: $ svn propset svn:externals "PATH1 URL" PATH2 where PATH1 is what you want the external to be called, URL is the url of the external, [...]]]></description>
			<content:encoded><![CDATA[<p><span />So I&#8217;ve read the svn book, especially this pages:<br />
<a title="http://svnbook.red-bean.com/en/1.1/ch07s04.html" target="_blank" href="http://svnbook.red-bean.com/en/1.1/ch07s04.html">http://svnbook.red-bean.com/en/1.1/ch07s04.html</a><br />
<a title="http://svnbook.red-bean.com/en/1.1/ch07s02.html" target="_blank" href="http://svnbook.red-bean.com/en/1.1/ch07s02.html">http://svnbook.red-bean.com/en/1.1/ch07s02.html</a></p>
<p>trying to figure out how to use the svn:externals property.A  All I was looking for was something that says:</p>
<p><code>$ svn propset svn:externals "PATH1 URL" PATH2</code></p>
<p>where PATH1 is what you want the external to be called, URL is the url of the external, and PATH2 is where you want it placed (I&#8217;m guessing).A  For example:</p>
<p><code>$ svn co http://svn.example.com/repo/myproject</code><br />
<code>$ cd myproject</code><br />
<code>$ svn co http://svn.example.com/repo/mysubproject</code><br />
<code>$ svn co http://svn.example.com/repo/myotherproject</code><br />
<code>$ svn propset svn:externals 'mysubproject http://svn.example.com/repo/mysubproject' .</code><br />
<code>$ svn propset svn:externals 'myotherproject http://svn.example.com/repo/myotherproject' .</code></p>
<p>Now when I check out <code>myproject</code>, <code>mysubproject</code>, and <code>myotherproject</code> will be checked out, and placed their respective directories.</p>
<p>Now that I figured it out, I can see it&#8217;s pretty simple.A  I just don&#8217;t understand why nobody could spell it out for me&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jtanium.com/2006/02/27/4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

