<?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"
	>

<channel>
	<title>myGrid developer blog</title>
	<atom:link href="http://www.mygrid.org.uk/dev/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mygrid.org.uk/dev/blog</link>
	<description>The developers of myGrid tell of their quest of the code</description>
	<pubDate>Thu, 02 Sep 2010 10:31:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Tab navigation and tooltips</title>
		<link>http://www.mygrid.org.uk/dev/blog/?p=37</link>
		<comments>http://www.mygrid.org.uk/dev/blog/?p=37#comments</comments>
		<pubDate>Thu, 02 Sep 2010 10:31:44 +0000</pubDate>
		<dc:creator>Ian Dunlop</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[tab]]></category>

		<category><![CDATA[tabifier]]></category>

		<category><![CDATA[tooltip]]></category>

		<guid isPermaLink="false">http://www.mygrid.org.uk/dev/blog/?p=37</guid>
		<description><![CDATA[We use the tabifier javascript from barelyFitz in a few places in MethodBox.  However, I wanted it to have a different, more descriptive tooltip than the tab title.  The default code doesn&#8217;t seem to do this so I added a couple of little changes to make this happen.
You can see the complete file here but [...]]]></description>
			<content:encoded><![CDATA[<p>We use the tabifier javascript from <a title="Barely Fitz tabifier" href="http://www.barelyfitz.com/projects/tabber/">barelyFitz</a> in a few places in <a title="MethodBox survey browsing and sharing" href="http://www.methodbox.org">MethodBox</a>.  However, I wanted it to have a different, more descriptive tooltip than the tab title.  The default code doesn&#8217;t seem to do this so I added a couple of little changes to make this happen.</p>
<p>You can see the complete file <a title="MethodBox tabifier code" href="http://code.google.com/p/methodbox/source/browse/trunk/methodbox/public/javascripts/tabber-new.js">here</a> but below is a quick synopsis of the changes:</p>
<p>added a boolean to keep track of whether you want a different tooltip than the tab title:</p>
<p><code> this.differentTooltip = true;</code></p>
<p>if this isn&#8217;t the behaviour you wanted then that&#8217;s ok:</p>
<p><code> if (!this.differentTooltip) {<br />
t.headingText = t.div.title;<br />
}<br />
</code></p>
<p>however, if the tooltip is to be different then make sure the<br />
link for the tab is correct:</p>
<p><code> if (this.differentTooltip) {<br />
DOM_a.title = t.tooltipText;<br />
} else {<br />
DOM_a.title = t.headingText;<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mygrid.org.uk/dev/blog/?feed=rss2&amp;p=37</wfw:commentRss>
		</item>
		<item>
		<title>Looping over javascript arrays with Prototype framework</title>
		<link>http://www.mygrid.org.uk/dev/blog/?p=36</link>
		<comments>http://www.mygrid.org.uk/dev/blog/?p=36#comments</comments>
		<pubDate>Mon, 16 Aug 2010 15:11:23 +0000</pubDate>
		<dc:creator>Ian Dunlop</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[for loop]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://www.mygrid.org.uk/dev/blog/?p=36</guid>
		<description><![CDATA[Had an array in javascript and tried to loop over it using
for (x in array){

...some code

}
I was confused why it seemed to have lots more members than I had put in with contents that seemed to be functions.  So I used console.log and firebug to print out the array members and saw that they were [...]]]></description>
			<content:encoded><![CDATA[<p>Had an array in javascript and tried to loop over it using</p>
<pre><code>for (x in array){

...some code

}</code></pre>
<p>I was confused why it seemed to have lots more members than I had put in with contents that seemed to be functions.  So I used console.log and firebug to print out the array members and saw that they were the methods you could call on an array object.</p>
<p>A quick google revealed that (<a title="prototype array api" href="http://www.prototypejs.org/api/array">see here</a>)</p>
<blockquote><p>using <code>for</code>…<code>in</code> on arrays when using Prototype will enumerate all extended methods as well, such as those coming from the <a href="http://www.prototypejs.org/api/enumerable"><code>Enumerable</code></a> module, and those Prototype puts in the <code>Array</code> namespace</p></blockquote>
<p>and that the best (only?) way to do it in Prototype is</p>
<pre><code class="javascript">myArray.each<span class="brackets">(</span><span class="keywords">function</span><span class="brackets">(</span>item<span class="brackets">)</span> {

<span class="comment">// Your code working on item here&#8230;

</span>}<span class="brackets">)</span>;

</code></pre>
<p>It&#8217;s all sorted now!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mygrid.org.uk/dev/blog/?feed=rss2&amp;p=36</wfw:commentRss>
		</item>
		<item>
		<title>RServe on OSX Snow Leopard</title>
		<link>http://www.mygrid.org.uk/dev/blog/?p=34</link>
		<comments>http://www.mygrid.org.uk/dev/blog/?p=34#comments</comments>
		<pubDate>Mon, 24 May 2010 11:09:34 +0000</pubDate>
		<dc:creator>Ian Dunlop</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mygrid.org.uk/dev/blog/?p=34</guid>
		<description><![CDATA[I always seem to have some difficulty getting the Rserve component of the R stats library up and running on OSX.  Installing it via install.packages(&#8221;rserve&#8221;) from within R  appears to work but when running R CMD Rserve I usually get some sort of error like:
/Library/Frameworks/R.framework/Resources/bin/Rcmd: line 62: exec: Rserve: not found
Compiling from source using the [...]]]></description>
			<content:encoded><![CDATA[<p>I always seem to have some difficulty getting the Rserve component of the R stats library up and running on OSX.  Installing it via install.packages(&#8221;rserve&#8221;) from within R  appears to work but when running R CMD Rserve I usually get some sort of error like:</p>
<p>/Library/Frameworks/R.framework/Resources/bin/Rcmd: line 62: exec: Rserve: not found</p>
<p>Compiling from source using the download from <a title="Rosuda" href="http://rosuda.org/Rserve/">http://rosuda.org/Rserve/</a> never seems to work with all sorts of C related horror.</p>
<p>However, the Rserve component actually was installed but it looks like the paths/links were not quite right.  Typing this:</p>
<p>R CMD /Library/Frameworks/R.framework/Resources/library/Rserve/libs/x86_64/Rserve.so</p>
<p>Got everything up and running. Doing this:</p>
<p>cp /Library/Frameworks/R.framework/Resources/library/Rserve/libs/x86_64/Rserve-bin.so /Library/Frameworks/R.framework/Resources/bin/Rserve</p>
<p>fixes it a bit more permanently</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mygrid.org.uk/dev/blog/?feed=rss2&amp;p=34</wfw:commentRss>
		</item>
		<item>
		<title>Obscure mysql bug number 1153 (08S01) (my packet&#8217;s too big)</title>
		<link>http://www.mygrid.org.uk/dev/blog/?p=33</link>
		<comments>http://www.mygrid.org.uk/dev/blog/?p=33#comments</comments>
		<pubDate>Fri, 21 May 2010 14:14:37 +0000</pubDate>
		<dc:creator>Ian Dunlop</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[error]]></category>

		<category><![CDATA[import]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[packet]]></category>

		<category><![CDATA[size]]></category>

		<guid isPermaLink="false">http://www.mygrid.org.uk/dev/blog/?p=33</guid>
		<description><![CDATA[Ok, here&#8217;s one you don&#8217;t see every day.
Importing a mysql dumpfile results in &#8220;ERROR 1153 (08S01) at line 265: Got a packet bigger than &#8216;max_allowed_packet&#8217; bytes&#8221;
Errm.
Log in to a mysql console,
enter the magic commands:
set global net_buffer_length=1000000;
set global max_allowed_packet=1000000000;
Modify your import to include the command:
&#8211;max_allowed_packet=100M
so you have something like
mysql &#8211;max_allowed_packet=100M -u user -p db_name &#60; dump.sql
Try [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, here&#8217;s one you don&#8217;t see every day.</p>
<p>Importing a mysql dumpfile results in &#8220;ERROR 1153 (08S01) at line 265: Got a packet bigger than &#8216;max_allowed_packet&#8217; bytes&#8221;</p>
<p>Errm.</p>
<p>Log in to a mysql console,</p>
<p>enter the magic commands:</p>
<p>set global net_buffer_length=1000000;</p>
<p>set global max_allowed_packet=1000000000;</p>
<p>Modify your import to include the command:</p>
<p>&#8211;max_allowed_packet=100M</p>
<p>so you have something like</p>
<p>mysql &#8211;max_allowed_packet=100M -u user -p db_name &lt; dump.sql</p>
<p>Try again</p>
<p>Your mileage may vary ( do they say kilometerage elsewhere?) so increase the allowed sizes if you have to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mygrid.org.uk/dev/blog/?feed=rss2&amp;p=33</wfw:commentRss>
		</item>
		<item>
		<title>Taming the Savage Beast (Forums)</title>
		<link>http://www.mygrid.org.uk/dev/blog/?p=32</link>
		<comments>http://www.mygrid.org.uk/dev/blog/?p=32#comments</comments>
		<pubDate>Wed, 14 Apr 2010 10:00:24 +0000</pubDate>
		<dc:creator>Ian Dunlop</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[error]]></category>

		<category><![CDATA[forum]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[relative_url_root]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[savage beast]]></category>

		<guid isPermaLink="false">http://www.mygrid.org.uk/dev/blog/?p=32</guid>
		<description><![CDATA[We needed a forum for one of our web projects written in rails and a quick google revealed Savage Beast.  It seemed to fit the bill although needed some css tweeks to co-exist with what we currently have.  However, when clicking on its RSS feed icon it threw an ActionController::Request.relative_url_root method missing error which was [...]]]></description>
			<content:encoded><![CDATA[<p>We needed a forum for one of our web projects written in rails and a quick google revealed <a href="http://www.williambharding.com/blog/rails/savage-beast-23-a-rails-22-23-message-forum-plugin/comment-page-1/#comment-2886">Savage Beast</a>.  It seemed to fit the bill although needed some css tweeks to co-exist with what we currently have.  However, when clicking on its RSS feed icon it threw an ActionController::Request.relative_url_root method missing error which was fixed by creating the class request_error.rb in initializers with the code below:</p>
<p>class ActionController::Request<br />
def relative_url_root<br />
@@relative_url_root ||= case<br />
when @env[&#8221;RAILS_RELATIVE_URL_ROOT&#8221;]<br />
@env[&#8221;RAILS_RELATIVE_URL_ROOT&#8221;]<br />
when server_software == &#8216;apache&#8217;<br />
@env[&#8221;SCRIPT_NAME&#8221;].to_s.sub(/\/dispatch\.(fcgi|rb|cgi)$/, &#8221;)<br />
else<br />
&#8221;<br />
end<br />
end<br />
end</p>
<p>Based on bug reported here: http://railsforum.com/viewtopic.php?pid=73991#p73991.</p>
<p>It all seems to work fine now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mygrid.org.uk/dev/blog/?feed=rss2&amp;p=32</wfw:commentRss>
		</item>
		<item>
		<title>&#8216;Nicer&#8217; URLs for Rails</title>
		<link>http://www.mygrid.org.uk/dev/blog/?p=31</link>
		<comments>http://www.mygrid.org.uk/dev/blog/?p=31#comments</comments>
		<pubDate>Wed, 31 Mar 2010 14:55:57 +0000</pubDate>
		<dc:creator>Ian Dunlop</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[urls]]></category>

		<guid isPermaLink="false">http://www.mygrid.org.uk/dev/blog/?p=31</guid>
		<description><![CDATA[URLs pointing to resources in a Rails app tend to look like www.somesite.com/people/1
Add this to your model:

def to_param
"#{id}-#{title.downcase.gsub(/[^[:alnum:]]/,'-')}".gsub(/-{2,}/,'-')
end
Where title is whatever you want to appear after the id and you will get URLs like
www.somesite.com/people/1-Ian
More info from here
]]></description>
			<content:encoded><![CDATA[<p>URLs pointing to resources in a Rails app tend to look like www.somesite.com/people/1</p>
<p>Add this to your model:<br />
<code><br />
def to_param<br />
"#{id}-#{title.downcase.gsub(/[^[:alnum:]]/,'-')}".gsub(/-{2,}/,'-')<br />
end</code></p>
<p>Where title is whatever you want to appear after the id and you will get URLs like</p>
<p>www.somesite.com/people/1-Ian</p>
<p>More info from <a title="Nicer URLs for rails" href="http://www.seoonrails.com/to_param-for-better-looking-urls.html">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mygrid.org.uk/dev/blog/?feed=rss2&amp;p=31</wfw:commentRss>
		</item>
		<item>
		<title>Sending lots of data using Post and Rails (ie. avoid URI too long error)</title>
		<link>http://www.mygrid.org.uk/dev/blog/?p=30</link>
		<comments>http://www.mygrid.org.uk/dev/blog/?p=30#comments</comments>
		<pubDate>Wed, 31 Mar 2010 14:48:16 +0000</pubDate>
		<dc:creator>Ian Dunlop</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[error]]></category>

		<category><![CDATA[link_to_remote]]></category>

		<category><![CDATA[post]]></category>

		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.mygrid.org.uk/dev/blog/?p=30</guid>
		<description><![CDATA[I was having problems with a link to remote that I had encoded as follows:
link_to_remote &#8216;Variable&#8217;, :url=&#62; sort_variables_surveys_url(:sorted_variables=&#62;sorted_variables, :search_query=&#62;query, :survey_list =&#62; years, :sort =&#62; key)
The sorted_variables param was far too big in some cases and returning a &#8216;uri too long&#8217; error.  So I scratched my head for a while and then looking at the link_to_remote [...]]]></description>
			<content:encoded><![CDATA[<p>I was having problems with a link to remote that I had encoded as follows:</p>
<p>link_to_remote &#8216;Variable&#8217;, :url=&gt; sort_variables_surveys_url(:sorted_variables=&gt;sorted_variables, :search_query=&gt;query, :survey_list =&gt; years, :sort =&gt; key)</p>
<p>The sorted_variables param was far too big in some cases and returning a &#8216;uri too long&#8217; error.  So I scratched my head for a while and then looking at the link_to_remote docs more closely showed that if I wrapped the &#8217;sorted_variables&#8217; up inside a div like so:</p>
<p>&lt;div id=&#8221;sorted_variables&#8221;&gt;</p>
<p>&lt;% sorted_variables.each do |variable| -%&gt;</p>
<p>&lt;%= hidden_field_tag &#8220;sorted_variables[]&#8221;, variable.id.to_s -%&gt;</p>
<p>&lt;% end -%&gt;</p>
<p>&lt;/div&gt;</p>
<p>and then added :submit =&gt; &#8217;sorted_variables&#8217; to the link_to_remote call like this:</p>
<p>link_to_remote &#8216;Variable&#8217;, :submit=&gt; &#8217;sorted_variables&#8217;, :url=&gt; sort_variables_surveys_url(:search_query=&gt;query, :survey_list =&gt; years, :sort =&gt; key)</p>
<p>then it all seems to work fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mygrid.org.uk/dev/blog/?feed=rss2&amp;p=30</wfw:commentRss>
		</item>
		<item>
		<title>Getting data out of MySQL (and then back in)</title>
		<link>http://www.mygrid.org.uk/dev/blog/?p=29</link>
		<comments>http://www.mygrid.org.uk/dev/blog/?p=29#comments</comments>
		<pubDate>Wed, 20 Jan 2010 10:59:32 +0000</pubDate>
		<dc:creator>Ian Dunlop</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[database]]></category>

		<category><![CDATA[dump]]></category>

		<category><![CDATA[export]]></category>

		<category><![CDATA[import]]></category>

		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.mygrid.org.uk/dev/blog/?p=29</guid>
		<description><![CDATA[There seems to be lots of ways to get your databases out of a MySQL database and an even more bewildering array of ways to get it back in.  I have found that the following commands seem to be the best way to do it (for me):
Out
mysqldump &#8211;databases database_name -u username -p &#62; dumpfile.sql
In
mysql -u [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be lots of ways to get your databases out of a MySQL database and an even more bewildering array of ways to get it back in.  I have found that the following commands seem to be the best way to do it (for me):</p>
<p>Out</p>
<p>mysqldump &#8211;databases <em>database_name</em> -u <em>username</em> -p &gt; <em>dumpfile.sql</em></p>
<p>In</p>
<p>mysql -u <em>username</em> -p <em>database_name</em> &lt; <em>dumpfile.sql</em></p>
<p>Find the reference <a title="MySQL database dump reference" href="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html">here</a>.</p>
<p>15/02/10: Here is another variation on getting stuff out:</p>
<p>mysqldump <em>db_name</em> <em>table1</em> <em>table2</em> <em>table3</em> -u <em>usernam</em>e -p &gt; <em>dumpfile.sql</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mygrid.org.uk/dev/blog/?feed=rss2&amp;p=29</wfw:commentRss>
		</item>
		<item>
		<title>Zipfiles, CSV and UUIDs</title>
		<link>http://www.mygrid.org.uk/dev/blog/?p=28</link>
		<comments>http://www.mygrid.org.uk/dev/blog/?p=28#comments</comments>
		<pubDate>Fri, 04 Dec 2009 10:28:27 +0000</pubDate>
		<dc:creator>Ian Dunlop</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[csv]]></category>

		<category><![CDATA[parse]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[uuid]]></category>

		<category><![CDATA[zip]]></category>

		<guid isPermaLink="false">http://www.mygrid.org.uk/dev/blog/?p=28</guid>
		<description><![CDATA[MethodBox currently uses a java servlet to create Comma Separated Value (CSV) files inside a zip file.  These are then sent back to the rails application on demand over http.  What we needed was a metadata file to go into the zip file explaining what the CSV files had in them.  It was easiest to [...]]]></description>
			<content:encoded><![CDATA[<p>MethodBox currently uses a java servlet to create Comma Separated Value (CSV) files inside a zip file.  These are then sent back to the rails application on demand over http.  What we needed was a metadata file to go into the zip file explaining what the CSV files had in them.  It was easiest to use the active records about the CSV columns to get the metadata.</p>
<p>For the zipfile manipulation thanks go to this <a href="http://www.superwick.com/archives/2007/06/14/generating-zip-file-archives-via-ruby-on-rails/">post</a> and the original <a href="http://rubyzip.sourceforge.net/">rubyzip</a> API.</p>
<p>So, first make the HTTP request:</p>
<p>http = Net::HTTP.new(&#8221;localhost&#8221;, 10000)<br />
http.read_timeout=6000<br />
response = http.get(&#8217;csvserver/download/+ filename)</p>
<p>#check that the request was OK<br />
if response.response.class == Net::HTTPOK</p>
<p>#check what the response contains</p>
<p>if response.content_type == &#8216;application/zip&#8217;</p>
<p>#make a new file to hold the zipped data</p>
<p>uuid = UUIDTools::UUID.random_create.to_s</p>
<p>#you might need to install the uuidtools gem</p>
<p>File.makedirs(RAILS_ROOT + &#8220;/&#8221; + &#8220;filestore&#8221; + &#8220;/&#8221; +filename)<br />
uf = File.open(RAILS_ROOT + &#8220;/&#8221; + &#8220;filestore&#8221; + &#8220;/&#8221; + filename  + &#8220;/&#8221; + uuid+ &#8220;.zip&#8221;,&#8221;w&#8221;)</p>
<p>#write the content in the response out to the zip file<br />
uf.write(response.body)<br />
uf.close</p>
<p>After this the metadata is created and written to a string called metadata which can then be added to the zip we just created from the http response.  This next line adds the metadata string to the zip inside a file called metadata.txt.</p>
<p>Zip::ZipFile.open(RAILS_ROOT + &#8220;/&#8221; + &#8220;filestore&#8221; + &#8220;/&#8221; + filename  + &#8220;/&#8221; + uuid+ &#8220;.zip&#8221;, Zip::ZipFile::CREATE) {|zip| zip.get_output_stream(&#8221;metadata.txt&#8221;) { |f| f.puts metadata}}</p>
<p>We can then send the completed file back to the requester</p>
<p>send_file RAILS_ROOT + &#8220;/&#8221; + &#8220;filestore&#8221; + &#8220;/&#8221; + filename  + &#8220;/&#8221; + uuid+ &#8220;.zip&#8221;, :filename =&gt; &#8220;something&#8221; + &#8220;.zip&#8221;, :content_type =&gt; @archive.content_type, :disposition =&gt; &#8216;attachment&#8217;</p>
<p>I have also been looking at using Ruby to do all the CSV file creation but so far speed is proving to be an issue.  However, I found the following <a href="http://snippets.aktagon.com/snippets/246-How-to-parse-CSV-data-with-Ruby">link</a> which mentions several libraries.  I am now looking at using a combination of FasterCSV and <a href="http://raa.ruby-lang.org/project/csvscan/">CSVScan</a> (also available as a <a href="http://github.com/sandofsky/csvscan">gem</a>).  This enables me to write incredibly complex code like this (don&#8217;t you just love ruby&#8217;s blocks!):</p>
<p>CSVScan.scan(infile) { |row| line = FCSV.parse(row[0], :col_sep =&gt; &#8220;\t&#8221;); new_row = Array.new; if i==0: variable_hash[key].each {|var| pos.push(line[0].rindex(var))} end; i=i+1; pos.each {|col| val = line[0][col];new_row.push(val)}; csv_arr.push(new_row)}</p>
<p>Yeah, it scared me as well!!  It parses a CSV file for several headers and then pulls out the columns which correspond to these headers and adds them into an array.  In MethodBox these files can have 2000 header (ie columns) and 20000 rows so you can see why speed is important when only pulling out a subset of these.</p>
<p>We can then use FasterCSV to write out the new CSV file:</p>
<p>FasterCSV.open(outfile, &#8220;w&#8221;) do |csv_file| csv_arr.each {|csv| csv_file &lt;&lt; csv} end</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mygrid.org.uk/dev/blog/?feed=rss2&amp;p=28</wfw:commentRss>
		</item>
		<item>
		<title>More bits == better?  AKA Snow Leopard broke my Gems</title>
		<link>http://www.mygrid.org.uk/dev/blog/?p=27</link>
		<comments>http://www.mygrid.org.uk/dev/blog/?p=27#comments</comments>
		<pubDate>Thu, 26 Nov 2009 15:54:16 +0000</pubDate>
		<dc:creator>Ian Dunlop</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mygrid.org.uk/dev/blog/?p=27</guid>
		<description><![CDATA[Snow Leopard install went fine.  Running methodbox after this didn&#8217;t.  ImageMagick, libxml and mysql gems were all broken.  Followed this advice to get it all working.  Boils down to re-install MacPorts, install ImageMagick and libxml2 from ports, re-install the RMagick and libxml-ruby gems, install mysql-64bit, re-install mysql gem (in 64 bit mode).
Easy!!  Only took 2 [...]]]></description>
			<content:encoded><![CDATA[<p>Snow Leopard install went fine.  Running methodbox after this didn&#8217;t.  ImageMagick, libxml and mysql gems were all broken.  Followed this <a href="http://www.gregbenedict.com/2009/08/29/fixing-ruby-gems-mysql-and-passenger-phusion-on-snow-leopard-10-6/">advice </a>to get it all working.  Boils down to re-install MacPorts, install ImageMagick and libxml2 from ports, re-install the RMagick and libxml-ruby gems, install mysql-64bit, re-install mysql gem (in 64 bit mode).</p>
<p>Easy!!  Only took 2 hours.  So that&#8217;s about 4 hours (and 2GB+ downloads) for the snow leopard upgrade so far!</p>
<p>Also found this <a href="http://github.com/chdorner/magick-installer/blob/master/magick-installer.sh">script</a> for installing ImageMagick.  I couldn&#8217;t get it to work but maybe you can.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mygrid.org.uk/dev/blog/?feed=rss2&amp;p=27</wfw:commentRss>
		</item>
	</channel>
</rss>
