<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1067158659037736473</id><updated>2012-02-16T11:03:21.960Z</updated><category term='apache'/><category term='idiomatic'/><category term='activerecord'/><category term='installation'/><category term='php'/><category term='rails'/><category term='railsconf'/><category term='iconv'/><category term='silverstripe'/><category term='subsites'/><category term='osx'/><category term='general'/><category term='deploy'/><title type='text'>Barry Keenan</title><subtitle type='html'>Learning Rails, Ruby and other things...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-6275704391137375107</id><published>2009-02-07T01:19:00.007Z</published><updated>2009-02-07T01:37:25.098Z</updated><title type='text'>Develop mobile stylesheets - handheld.css</title><content type='html'>Designing for mobiles &lt;span style="text-decoration: line-through;"&gt;can be&lt;/span&gt; IS a pain. First of all I'd recommend developing a 'handheld.css' stylesheet using these two browsers:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; &lt;strong&gt;Firefox &amp;amp; Web Developer Toolbar.&lt;/strong&gt; (CSS -&gt; display CSS by media type -&gt; handheld)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Opera&lt;/strong&gt;. (View -&gt; Small Screen)&lt;/li&gt;&lt;/ul&gt; &lt;h4&gt;Force mobiles to read the handheld stylesheet&lt;br /&gt;&lt;/h4&gt; &lt;p&gt;Once you have the handheld stylesheet looking how you want it. Add it to your pages using this &lt;a target="_blank" href="http://detectmobilebrowsers.mobi/"&gt;php script&lt;/a&gt;. We all know browser detection is evil and bad, but mobile support for standards isn't here yet and this is the most pain free way. In my case I did something like this:&lt;/p&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="text text_html text_html_basic"&gt;if( mobile_device_detect()==true ) {&lt;br /&gt;//I am a mobile&lt;br /&gt;&lt;span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html"&gt;&amp;lt;&lt;/span&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html"&gt;link&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;rel&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;stylesheet&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;type&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;text/css&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;media&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;screen, handheld&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;href&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;handheld.css&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;//I am a browser&lt;br /&gt;&lt;span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html"&gt;&amp;lt;&lt;/span&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html"&gt;link&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;rel&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;stylesheet&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;type&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;text/css&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;media&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;screen&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;href&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;main_layout.css&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html"&gt;&amp;lt;&lt;/span&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html"&gt;link&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;rel&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;stylesheet&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;type&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;text/css&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;media&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;handheld&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html"&gt;href&lt;/span&gt;=&lt;span class="string string_quoted string_quoted_double string_quoted_double_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html"&gt;"&lt;/span&gt;handheld.css&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_html"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Test on an emulator&lt;/h4&gt;  &lt;p&gt;Installing a mobile phone emulator can be a bit of a lengthy process as well:&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Install &lt;a target="_blank" href="http://www.microsoft.com/windowsmobile/en-us/help/synchronize/device-synch.mspx"&gt;ActiveSync&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Unzip and install V1Emulator &lt;a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c62d54a5-183a-4a1e-a7e2-cc500ed1f19a&amp;amp;DisplayLang=en"&gt;standalone_emulator_V1.exe &lt;/a&gt;&lt;/li&gt;&lt;li&gt;Install the Virtual Network Driver (part of &lt;a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=28C97D22-6EB8-4A09-A7F7-F6C7A1F000B5&amp;amp;displaylang=en"&gt;Virtual PC&lt;/a&gt;) &lt;/li&gt;&lt;li&gt;Install the &lt;a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?familyid=3D6F581E-C093-4B15-AB0C-A2CE5BFFDB47&amp;amp;displaylang=en"&gt;Emulator Images &amp;amp; Device manager for Windows Mobile 6.1&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;The tricky part is enabling internet connectivity. Start ActiceSync and set  "Allow connections to one of the following" to "DMA" in the File, Connection Settings menu of ActiveSync.&lt;/p&gt; &lt;p&gt;Choose an emulator to launch, e.g. &lt;em&gt;Start -&gt; SDK -&gt; Smartphone QVGA - Coldboot&lt;/em&gt;. Once it's running, open &lt;em&gt;Start -&gt; SDK -&gt; Tools -&gt; Device Emulator Manager&lt;/em&gt;. Right click on the device and select 'cradle'. This will place the emulated smartphone in the virtual "cradle" so it can access the network through ActiveSync.&lt;/p&gt; &lt;h4&gt;Test on a phone&lt;/h4&gt; &lt;p&gt;The only sure fire way to test if everything is working properly is to use an actual smart phone.&lt;/p&gt; &lt;p&gt;Good luck&lt;/p&gt; &lt;p&gt;Refs:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.alistapart.com/comments/returnofthemobilestylesheet/"&gt;http://www.alistapart.com/comments/returnofthemobilestylesheet/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://detectmobilebrowsers.mobi/"&gt;http://detectmobilebrowsers.mobi/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.codinghorror.com/blog/archives/000782.html"&gt;http://www.codinghorror.com/blog/archives/000782.html&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-6275704391137375107?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/6275704391137375107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=6275704391137375107' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/6275704391137375107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/6275704391137375107'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2009/02/develop-mobile-stylesheets-handheldcss.html' title='Develop mobile stylesheets - handheld.css'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-2306022218658152662</id><published>2008-11-13T07:06:00.005Z</published><updated>2008-11-14T01:57:04.149Z</updated><title type='text'>Adding a subsite in Silverstripe</title><content type='html'>Assuming you've &lt;a href="http://www.keeny.co.uk/2008/11/install-silverstripe-subsites-module.html"&gt;got the subsites module installed&lt;/a&gt; and created your first subsite 'Template' manually, you can now go about adding subsites!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_v4M7RTyIGCY/SRvTel30_LI/AAAAAAAAABA/89bEBzRRSog/s1600-h/subsite.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 303px; height: 384px;" src="http://4.bp.blogspot.com/_v4M7RTyIGCY/SRvTel30_LI/AAAAAAAAABA/89bEBzRRSog/s400/subsite.png" alt="" id="BLOGGER_PHOTO_ID_5268036711655734450" border="0" /&gt;&lt;/a&gt;Click on the &lt;span style="font-weight: bold;"&gt;Sub-sites&lt;/span&gt; tab at the top of the Silverstripe CMS to add a new subsite.&lt;br /&gt;&lt;br /&gt;You will see this panel on the left hand side. Just enter a name and subdomain and click add.&lt;br /&gt;&lt;br /&gt;You can see I've already added two domains here which point to &lt;span style="font-style: italic;"&gt;http://sub1.localhost&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;http://sub2.localhost&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Each new subsite is based on a 'Template', so in this case will have the domain 'mysite.com' appended.&lt;br /&gt;&lt;br /&gt;I first tried setting this up in my home directory but Silverstripe could not resolve addresses of the form &lt;span style="font-style: italic;"&gt;http://sub1.localhost/~username/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once I installed Silverstripe to the main apache Documents folder it worked no problem, i.e. Silverstripe will resolve &lt;span style="font-style: italic;"&gt;http://whatever.localhost/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In my case, because I'm developing locally I added the following entries to my /etc/hosts file:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;127.0.0.1    sub1.localhost&lt;br /&gt;127.0.0.1    sub2.localhost&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Happy subsiting...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-2306022218658152662?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/2306022218658152662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=2306022218658152662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/2306022218658152662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/2306022218658152662'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2008/11/adding-subsite-in-silverstripe.html' title='Adding a subsite in Silverstripe'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_v4M7RTyIGCY/SRvTel30_LI/AAAAAAAAABA/89bEBzRRSog/s72-c/subsite.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-6508359886208735511</id><published>2008-11-10T12:22:00.023Z</published><updated>2010-07-25T03:33:49.089Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='installation'/><category scheme='http://www.blogger.com/atom/ns#' term='silverstripe'/><category scheme='http://www.blogger.com/atom/ns#' term='subsites'/><title type='text'>Install Silverstripe 'Subsites' module</title><content type='html'>The following steps worked for me when installing the &lt;a href="http://www.silverstripe.com/"&gt;Silverstripe&lt;/a&gt; &lt;a href="http://doc.silverstripe.com/doku.php?id=modules:subsites"&gt;Subsites&lt;/a&gt; module:&lt;br /&gt;&lt;br /&gt;1. Create a directory in your root silverstripe installation. &lt;span style="font-style: italic;"&gt;'~/Sites/silverstripe/subsites'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download, and unzip the code into this directory. I deleted the 'trunk' directory to keep things tidy.&lt;br /&gt;&lt;br /&gt;2. Ensure every folder in your silverstripe hierarchy has the user '_www' read/write access&lt;br /&gt;&lt;br /&gt;3. There is a problem linking the Group table in the database, so for now comment it out in &lt;span style="font-style: italic;"&gt;'silverstripe/subsites/_config.php'&lt;/span&gt;  so it looks like this:&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_php"&gt;&lt;span class="source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_embedded punctuation_definition_embedded_begin punctuation_definition_embedded_begin_php"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="comment comment_block comment_block_documentation comment_block_documentation_phpdoc comment_block_documentation_phpdoc_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_php"&gt;/**&lt;/span&gt;&lt;br /&gt;* The subsites module modifies the behaviour of the CMS - in the SiteTree and Group databases - to store information&lt;br /&gt;* about a number of sub-sites, rather than a single site.&lt;br /&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_php"&gt;*/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;SiteTree&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;SiteTreeSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="comment comment_line comment_line_double-slash comment_line_double-slash_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_php"&gt;//&lt;/span&gt; Hack - this ensures that the SiteTree defineMethods gets called before any of its subclasses...&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword keyword_other keyword_other_new keyword_other_new_php"&gt;new&lt;/span&gt; &lt;span class="support support_class support_class_php"&gt;SiteTree&lt;/span&gt;()&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;ContentController&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;ControllerSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;LeftAndMain&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;LeftAndMainSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;LeftAndMain&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;ControllerSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="comment comment_line comment_line_double-slash comment_line_double-slash_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_php"&gt;//&lt;/span&gt;Object::add_extension('Group', 'GroupSubsites');&lt;br /&gt;&lt;/span&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;File&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;FileSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_embedded punctuation_definition_embedded_end punctuation_definition_embedded_end_php"&gt;&lt;span class="source source_php"&gt;?&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_whitespace punctuation_whitespace_embedded punctuation_whitespace_embedded_trailing punctuation_whitespace_embedded_trailing_php"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Then visit &lt;span style="font-style: italic;"&gt;http://localhost/silverstripe/db/build?flush=1&lt;/span&gt; This will set up the initial database tables for the subsites module.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. We need to manually modify the &lt;span style="font-style: italic;"&gt;Group&lt;/span&gt; table using the following SQL. Note that 'Group' is a reserved keyword in mysql so make sure you wrap it in backquotes:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_sql"&gt;&lt;span class="meta meta_alter meta_alter_sql"&gt;&lt;span class="keyword keyword_other keyword_other_create keyword_other_create_sql"&gt;alter&lt;/span&gt; &lt;span class="keyword keyword_other keyword_other_table keyword_other_table_sql"&gt;table&lt;/span&gt; &lt;/span&gt;&lt;span class="string string_quoted string_quoted_other string_quoted_other_backtick string_quoted_other_backtick_sql"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_sql"&gt;`&lt;/span&gt;Group`&lt;/span&gt; add SubsiteID &lt;span class="storage storage_type storage_type_sql"&gt;int&lt;/span&gt;(&lt;span class="constant constant_numeric constant_numeric_sql"&gt;11&lt;/span&gt;) &lt;span class="keyword keyword_other keyword_other_DDL keyword_other_DDL_create keyword_other_DDL_create_II keyword_other_DDL_create_II_sql"&gt;not null&lt;/span&gt; default &lt;span class="constant constant_numeric constant_numeric_sql"&gt;0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;6. We also need to manually insert the first 'Template' into the &lt;span style="font-style: italic;"&gt;Subsite&lt;/span&gt; table:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_sql"&gt;&lt;span class="keyword keyword_other keyword_other_DML keyword_other_DML_sql"&gt;insert into&lt;/span&gt; Subsite (ID, ClassName, Created, LastEdited, Subdomain, Title, Domain)&lt;br /&gt;&lt;span class="keyword keyword_other keyword_other_DML keyword_other_DML_II keyword_other_DML_II_sql"&gt;values&lt;/span&gt; (&lt;span class="string string_quoted string_quoted_double string_quoted_double_sql"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_sql"&gt;"&lt;/span&gt;"&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_double string_quoted_double_sql"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_sql"&gt;"&lt;/span&gt;Subsite_Template"&lt;/span&gt;, NOW(), NOW(), &lt;span class="string string_quoted string_quoted_double string_quoted_double_sql"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_sql"&gt;"&lt;/span&gt;newsubdomain"&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_double string_quoted_double_sql"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_sql"&gt;"&lt;/span&gt;newtitle"&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_double string_quoted_double_sql"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_sql"&gt;"&lt;/span&gt;mysite.com"&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;7. Now you can uncomment your  &lt;span style="font-style: italic;"&gt;'silverstripe/subsites/_config.php'&lt;/span&gt; file and add the following two lines so that it looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_php"&gt;&lt;span class="source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_embedded punctuation_definition_embedded_begin punctuation_definition_embedded_begin_php"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;SiteTree&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;SiteTreeSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="comment comment_line comment_line_double-slash comment_line_double-slash_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_php"&gt;//&lt;/span&gt; Hack - this ensures that the SiteTree defineMethods gets called before any of its subclasses...&lt;br /&gt;&lt;/span&gt;&lt;span class="keyword keyword_other keyword_other_new keyword_other_new_php"&gt;new&lt;/span&gt; &lt;span class="support support_class support_class_php"&gt;SiteTree&lt;/span&gt;()&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;ContentController&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;ControllerSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;LeftAndMain&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;LeftAndMainSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;LeftAndMain&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;ControllerSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;Group&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;GroupSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;add_extension&lt;/span&gt;(&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;File&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;FileSubsites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="support support_class support_class_php"&gt;Director&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;addRules&lt;/span&gt;(&lt;span class="constant constant_numeric constant_numeric_php"&gt;100&lt;/span&gt;, &lt;span class="meta meta_array meta_array_php"&gt;&lt;span class="support support_function support_function_construct support_function_construct_php"&gt;array&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php"&gt;(&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;admin/subsites/$Action/$ID/$OtherID&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt; &lt;span class="keyword keyword_operator keyword_operator_key keyword_operator_key_php"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;SubsiteAdmin&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;,&lt;br /&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php"&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span class="storage storage_type storage_type_php"&gt;Object&lt;/span&gt;&lt;span class="keyword keyword_operator keyword_operator_class keyword_operator_class_php"&gt;::&lt;/span&gt;&lt;span class="meta meta_function-call meta_function-call_static meta_function-call_static_php"&gt;addStaticVars&lt;/span&gt;( &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;LeftAndMain&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="meta meta_array meta_array_php"&gt;&lt;span class="support support_function support_function_construct support_function_construct_php"&gt;array&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php"&gt;(&lt;/span&gt; &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;extra_menu_items&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt; &lt;span class="keyword keyword_operator keyword_operator_key keyword_operator_key_php"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="meta meta_array meta_array_php"&gt;&lt;span class="support support_function support_function_construct support_function_construct_php"&gt;array&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php"&gt;(&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;Sub-sites&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt; &lt;span class="keyword keyword_operator keyword_operator_key keyword_operator_key_php"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="meta meta_array meta_array_php"&gt;&lt;span class="support support_function support_function_construct support_function_construct_php"&gt;array&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_begin punctuation_definition_array_begin_php"&gt;(&lt;/span&gt;&lt;span class="string string_quoted string_quoted_double string_quoted_double_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;"&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php"&gt;intranets&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;"&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_double string_quoted_double_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;"&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_double meta_string-contents_quoted_double_php"&gt;admin/subsites/&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;"&lt;/span&gt;&lt;/span&gt;, &lt;span class="string string_quoted string_quoted_single string_quoted_single_php"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php"&gt;'&lt;/span&gt;&lt;span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php"&gt;SubsiteAdmin&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php"&gt;'&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_array punctuation_definition_array_end punctuation_definition_array_end_php"&gt;)&lt;/span&gt;&lt;/span&gt;)&lt;span class="punctuation punctuation_terminator punctuation_terminator_expression punctuation_terminator_expression_php"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_embedded punctuation_definition_embedded_end punctuation_definition_embedded_end_php"&gt;&lt;span class="source source_php"&gt;?&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_whitespace punctuation_whitespace_embedded punctuation_whitespace_embedded_trailing punctuation_whitespace_embedded_trailing_php"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;For good measure, visit &lt;span style="font-style: italic;"&gt;http://localhost/silverstripe/?flush=1&lt;/span&gt;&lt;span&gt; to make sure any database changes have been picked up.&lt;br /&gt;&lt;br /&gt;8. Then visit &lt;span style="font-style: italic;"&gt;http://localhost/silverstripe/admin?flush=1&lt;/span&gt; to reload your CMS.&lt;/span&gt; You should now have the 'Sub-Sites' tab in the Silverstripe admin CMS along with a dropdown in the top right hand corner that allows you to select which subsite you are currently working on.&lt;br /&gt;&lt;br /&gt;Documentation for this module is in alpha ;-) , so if anyone has any tips on refining these installation instructions please let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-6508359886208735511?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/6508359886208735511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=6508359886208735511' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/6508359886208735511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/6508359886208735511'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2008/11/install-silverstripe-subsites-module.html' title='Install Silverstripe &apos;Subsites&apos; module'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-6462880320689475926</id><published>2008-11-06T12:17:00.007Z</published><updated>2008-11-10T13:55:41.298Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='iconv'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>iconv will not link when compiling PHP on OSX</title><content type='html'>When trying to compile PHP on OSX Leopard, the ./configure command completed successfully but iconv would not link....&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;Undefined symbols:&lt;br /&gt;"_iconv_close", referenced from:&lt;br /&gt;_php_iconv_string in iconv.o&lt;br /&gt;_php_iconv_string in iconv.o&lt;br /&gt;__php_iconv_strlen in iconv.o&lt;br /&gt;__php_iconv_strpos in iconv.o&lt;br /&gt;__php_iconv_mime_decode in iconv.o&lt;br /&gt;__php_iconv_mime_decode in iconv.o&lt;br /&gt;__php_iconv_mime_decode in iconv.o&lt;br /&gt;_zif_iconv_substr in iconv.o&lt;br /&gt;_zif_iconv_substr in iconv.o&lt;br /&gt;_php_iconv_stream_filter_dtor in iconv.o&lt;br /&gt;_zif_iconv_mime_encode in iconv.o&lt;br /&gt;_zif_iconv_mime_encode in iconv.o&lt;br /&gt;"_iconv_open", referenced from:&lt;br /&gt;_php_iconv_string in iconv.o&lt;br /&gt;__php_iconv_strlen in iconv.o&lt;br /&gt;__php_iconv_strpos in iconv.o&lt;br /&gt;__php_iconv_mime_decode in iconv.o&lt;br /&gt;__php_iconv_mime_decode in iconv.o&lt;br /&gt;_zif_iconv_substr in iconv.o&lt;br /&gt;_zif_iconv_substr in iconv.o&lt;br /&gt;_zif_iconv_mime_encode in iconv.o&lt;br /&gt;_zif_iconv_mime_encode in iconv.o&lt;br /&gt;_php_iconv_stream_filter_factory_create in iconv.o&lt;br /&gt;ld: symbol(s) not found&lt;br /&gt;collect2: ld returned 1 exit status&lt;br /&gt;make: *** [sapi/cli/php] Error 1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I believe this is a problem with the default /usr/include/iconv.h header file in Leopard.&lt;br /&gt;&lt;br /&gt;I have a different version of iconv.h installed with &lt;a href="http://www.finkproject.org/"&gt;Fink&lt;/a&gt; which puts all it's software in /sw&lt;br /&gt;I added the following to the ./configure command's options, as suggested &lt;a href="http://bugs.php.net/bug.php?id=43189"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;--with-iconv=shared,/sw&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This would &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; work unless 'shared' is specified. Perhaps this is because Fink compile iconv as a shared library.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-6462880320689475926?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/6462880320689475926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=6462880320689475926' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/6462880320689475926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/6462880320689475926'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2008/11/iconv-will-not-link-when-compiling-php.html' title='iconv will not link when compiling PHP on OSX'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-2185562707790993368</id><published>2008-11-05T03:23:00.003Z</published><updated>2008-11-05T03:39:47.246Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Broken Web Sharing / Apache on OSX Leopard</title><content type='html'>I recently installed Leopard on my macbook and wanted to enable Web Sharing but when I visited http://localhost, Firefox gave me the following error:&lt;br /&gt;&lt;blockquote&gt;Failed to Connect&lt;br /&gt;Firefox can't establish a connection to the server at io.&lt;/blockquote&gt;I tried to uncheck/check Web Sharing in System Preferences. I also tried stopping/starting Apache on the command line with no luck.&lt;br /&gt;&lt;br /&gt;Finally I used &lt;a href="http://diymacserver.com/installing-apache/compiling-apache-on-leopard/"&gt;this resource&lt;/a&gt; on &lt;a href="http://diymacserver.com/"&gt;DIYMacServer&lt;/a&gt; to reinstall Apache on my machine. It now works like a charm, thanks Richard!&lt;br /&gt;&lt;br /&gt;(This all came about because I want to install &lt;a href="http://www.silverstripe.com/"&gt;SilverStripe&lt;/a&gt; which suggests using &lt;a href="http://www.mamp.info/en/index.php"&gt;MAMP&lt;/a&gt;, but I did not want multiple versions of Apache installed on my machine.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-2185562707790993368?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/2185562707790993368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=2185562707790993368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/2185562707790993368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/2185562707790993368'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2008/11/broken-web-sharing-apache-on-osx.html' title='Broken Web Sharing / Apache on OSX Leopard'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-2022023769301697416</id><published>2007-08-08T15:34:00.000Z</published><updated>2007-08-08T15:43:13.354Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='idiomatic'/><title type='text'>Association Callbacks</title><content type='html'>Similiar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get trigged when you add an object to or removing an object from a association collection. Example:&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_ruby source_ruby_rails"&gt;&lt;span class="meta meta_class meta_class_ruby"&gt;&lt;span class="keyword keyword_control keyword_control_class keyword_control_class_ruby"&gt;class&lt;/span&gt; &lt;span class="entity entity_name entity_name_type entity_name_type_class entity_name_type_class_ruby"&gt;Project&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="support support_function support_function_activerecord support_function_activerecord_rails"&gt;has_and_belongs_to_many&lt;/span&gt; &lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;developers&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby"&gt;,&lt;/span&gt; &lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;after_add&lt;/span&gt; &lt;span class="punctuation punctuation_separator punctuation_separator_key-value"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;evaluate_velocity&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="meta meta_function meta_function_method meta_function_method_with-arguments meta_function_method_with-arguments_ruby"&gt;&lt;span class="keyword keyword_control keyword_control_def keyword_control_def_ruby"&gt;def&lt;/span&gt; &lt;span class="entity entity_name entity_name_function entity_name_function_ruby"&gt;evaluate_velocity&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_ruby"&gt;(&lt;/span&gt;&lt;span class="variable variable_parameter variable_parameter_function variable_parameter_function_ruby"&gt;developer&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_ruby"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword keyword_control keyword_control_ruby"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword keyword_control keyword_control_ruby"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;It’s possible to stack callbacks by passing them as an array.&lt;br /&gt;&lt;br /&gt;Possible callbacks are: before_add, after_add, before_remove and after_remove.&lt;br /&gt;&lt;br /&gt;Should any of the before_add callbacks throw an exception, the object does not get added to the collection. Same with the before_remove callbacks, if an exception is thrown the object doesn’t get removed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-2022023769301697416?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/2022023769301697416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=2022023769301697416' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/2022023769301697416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/2022023769301697416'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/08/association-callbacks.html' title='Association Callbacks'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-1502925364094012286</id><published>2007-07-09T10:01:00.000Z</published><updated>2007-07-09T10:16:06.860Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>ssh segmentation fault osx</title><content type='html'>Argh!! Every time I install an update on my MacBook it breaks ssh. Up until now I'd been using &lt;a href="http://www.charlessoft.com/"&gt;Pacifist&lt;/a&gt; to extract &amp; reinstall the Kerberos Framework from the &lt;a href="http://www.apple.com/support/downloads/macosx1048comboupdateintel.html"&gt;10.4.8 update&lt;/a&gt;, as per &lt;a href="http://macsingularity.org/2007/03/06/fix-ssh-segmentation-faults-in-tiger/"&gt;these instructions&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'm now having to do this on a regular basis which is very annoying &lt;span style="font-style: italic;"&gt;and&lt;/span&gt; I'm getting concerned that replacing Kerberos with an older version is introducing security holes. so I've decided to install &lt;a href="http://finkproject.org/"&gt;Fink&lt;/a&gt; and openssh instead of using Apple's ssh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-1502925364094012286?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/1502925364094012286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=1502925364094012286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/1502925364094012286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/1502925364094012286'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/07/ssh-segmentation-fault-osx.html' title='ssh segmentation fault osx'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-6247974739750871639</id><published>2007-07-05T14:53:00.000Z</published><updated>2007-07-06T09:20:21.166Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='railsconf'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Deploy Rails on Windows: Part 3</title><content type='html'>This is the last part of a series of posts on deploying Rails on a windows server using Oracle, Mongrel &amp; Pen. My thinking: get it working with a simple app first, to minimise headaches later. The other parts can be found here:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-1.html"&gt;Installing Rails&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-2.html"&gt;My-first-app with Oracle&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-3.html"&gt;Pen of pesky Mongrels&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;This part heavily references a talk given by &lt;a href="http://www.napcs.com/"&gt;Brian Hogan&lt;/a&gt; at RailsConf&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="font-weight: bold;"&gt;Part 3: Pen of pesky Mongrels&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Before you go any further, make sure your app works in production mode!&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Install Mongrel&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The easiest way to get started with Mongrel is to install it via RubyGems:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;gem install mongrel&lt;/pre&gt;&lt;br /&gt;Select the highest stable version number marked (mswin32).&lt;br /&gt;&lt;br /&gt;Run Mongrel in the background with:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;cd myrailsapp&lt;br /&gt;mongrel_rails start -d&lt;/pre&gt;&lt;br /&gt;and stop it with:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;mongrel_rails stop&lt;/pre&gt;&lt;br /&gt;There’s quite a few options you can set for the start command. Use the mongrel_rails start -h to see them all.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Mongrel as a Service&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Install the gem (pick the most recent one):&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;gem install win32-service&lt;br /&gt;gem install mongrel_service&lt;/pre&gt;&lt;br /&gt;Install your app as a service:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;mongrel_rails service::install –N comics_4001 -c c:\my\path\to\myapp –p 4001 –e production&lt;/pre&gt;&lt;br /&gt;Your app will then appear under ‘services’ in Computer Management (accessed via Control Panel or by right clicking on My Computer)&lt;br /&gt;&lt;br /&gt;You can then set the service to start automagically. Right click on ‘comics_4001’, choose ‘properties’ and change the startup type to ‘automatic’.&lt;br /&gt;&lt;br /&gt;This is really all you need for a small application – perhaps an internal company app or something.&lt;br /&gt;&lt;br /&gt;Cons:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You don’t get page caching&lt;/li&gt;&lt;li&gt;Doesn’t scale&lt;/li&gt;&lt;li&gt;Rails is single threaded so user requests get queued up.&lt;/li&gt;&lt;/ul&gt;While rails is serving an action to one user, all the other users need to wait. This is bad if some of your actions take a while, which is why we need Pen...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Load Balancing Mongrels with Pen&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Pen requires &lt;a href="http://www.dll-files.com/dllindex/dll-files.shtml?cygwin1"&gt;cygwin1.dll&lt;/a&gt;, so make sure it’s in the same directory as &lt;a href="ftp://siag.nu/pub/pen/pen-0.17.1a.exe"&gt;pen.exe&lt;/a&gt;. Also, make you get the one with the ‘a’ suffix – the other version doesn’t work for some reason.&lt;br /&gt;&lt;br /&gt;To run pen as a service you need the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&amp;displaylang=en"&gt;Windows Server Resource Kit Tools&lt;/a&gt;. Install it somewhere. To keep things simple I'll use c:\reskit&lt;br /&gt;&lt;br /&gt;Start a couple of mongrels:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;mongrel_rails service::install –N comics_4001 -c c:\my\path\to\myapp –p 4001 –e production&lt;br /&gt;mongrel_rails service::install –N comics_4002 -c c:\my\path\to\myapp –p 4002 –e production&lt;/pre&gt;&lt;br /&gt;You could write a batch file to start and stop these multiple servers.&lt;br /&gt;&lt;br /&gt;The following command will balance your mongrels just fine:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;pen 4000 localhost:4001 localhost:4002&lt;/pre&gt;&lt;br /&gt;But to do things properly, keep reading.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Pen as a Service&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Install pen as a service using srvany.exe from the reskit:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;c:\reskit\instsrv Pen c:\reskit\srvany.exe&lt;br /&gt;&gt;&gt; The service was successfuly added!&lt;/pre&gt;&lt;br /&gt;Set some parameters with regedit. Go to 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Pen' and add a new key called 'Parameters'. Add the following three String values to the parameters key:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Application = pen.exe&lt;/li&gt;&lt;li&gt;AppParameters = -f 4000 localhost:4001 localhost:4002&lt;/li&gt;&lt;li&gt;AppDirectory = c:\pen&lt;/li&gt;&lt;/ul&gt;Start the pen service from ‘Services’ or with the command:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;net start pen&lt;/pre&gt;&lt;br /&gt;Remove with:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;sc delete pen&lt;/pre&gt;&lt;br /&gt;Pen will then chug along happily and is suitable for most apps with a few users. You still don’t get page caching, for that you need Apache, but this solution is free, simple and performs moderately well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-6247974739750871639?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/6247974739750871639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=6247974739750871639' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/6247974739750871639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/6247974739750871639'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-3.html' title='Deploy Rails on Windows: Part 3'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-8448077332701465044</id><published>2007-07-05T14:01:00.000Z</published><updated>2007-07-06T09:15:46.938Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='railsconf'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Deploy Rails on Windows: Part 2</title><content type='html'>This post is part of a guide to deploying a small Rails application on a windows server using Oracle, Mongrel &amp; Pen. My thinking: get it working with a simple app first, to minimise headaches later. The other posts can be found here:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-1.html"&gt;Installing Rails&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-2.html"&gt;My-first-app with Oracle&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-3.html"&gt;Pen of pesky Mongrels&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;This part heavily references a &lt;a href="http://www.oracle.com/technology/pub/articles/haefel-oracle-ruby.html"&gt;tutorial&lt;/a&gt; provided by Oracle.&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Part 2: My-first-app with Oracle&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This guide assumes you are either:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;connecting to an Oracle Database installed on your local machine.&lt;/li&gt;&lt;li&gt;connecting  to a remote database using Oracle Instant Client installed on your local machine.&lt;/li&gt;&lt;/ul&gt;If you do not have at least the &lt;a href="http://www.oracle.com/database/index.html"&gt;client software&lt;/a&gt; installed, the Ruby-Oracle driver will complain that it can’t find files such as ‘oci.dll’.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Install Oracle Database Driver&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the &lt;a href="http://rubyforge.org/projects/ruby-oci8"&gt;driver&lt;/a&gt; and install with:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;ruby ruby-oci8-1.0.0-rc3-mswin32.rb&lt;/pre&gt;&lt;br /&gt;You can test your connection to the database with the following one-liner:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;ruby -r oci8 -e "OCI8.new('username', 'password', '127.0.0.1:1521/orcl').exec('SELECT * FROM test_table') do |r| puts r.join('|'); end"&lt;/pre&gt;&lt;br /&gt;Of course, make sure the schema &amp; table that you are testing exists!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Create a User&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Using SQL*Plus, create a user with DBA privileges that you can use for this application.&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_sql"&gt;&lt;span class="keyword keyword_other keyword_other_authorization keyword_other_authorization_sql"&gt;GRANT&lt;/span&gt; dba TO ruby IDENTIFIED BY ruby;&lt;br /&gt;&lt;span class="meta meta_alter meta_alter_sql"&gt;&lt;span class="keyword keyword_other keyword_other_create keyword_other_create_sql"&gt;ALTER&lt;/span&gt; &lt;span class="keyword keyword_other keyword_other_table keyword_other_table_sql"&gt;USER&lt;/span&gt; &lt;/span&gt;ruby DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;&lt;br /&gt;EXIT&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Create a Table&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_sql"&gt;&lt;span class="meta meta_create meta_create_sql"&gt;&lt;span class="keyword keyword_other keyword_other_create keyword_other_create_sql"&gt;CREATE&lt;/span&gt; &lt;span class="keyword keyword_other keyword_other_sql"&gt;TABLE&lt;/span&gt; &lt;span class="entity entity_name entity_name_function entity_name_function_sql"&gt;comics&lt;/span&gt;&lt;/span&gt; (&lt;br /&gt;id &lt;span class="storage storage_type storage_type_sql"&gt;NUMBER&lt;/span&gt;(&lt;span class="constant constant_numeric constant_numeric_sql"&gt;10&lt;/span&gt;) &lt;span class="keyword keyword_other keyword_other_DDL keyword_other_DDL_create keyword_other_DDL_create_II keyword_other_DDL_create_II_sql"&gt;NOT NULL&lt;/span&gt;,&lt;br /&gt;title &lt;span class="storage storage_type storage_type_sql"&gt;VARCHAR2&lt;/span&gt;(&lt;span class="constant constant_numeric constant_numeric_sql"&gt;60&lt;/span&gt;),&lt;br /&gt;issue &lt;span class="storage storage_type storage_type_sql"&gt;NUMBER&lt;/span&gt;(&lt;span class="constant constant_numeric constant_numeric_sql"&gt;4&lt;/span&gt;),&lt;br /&gt;publisher &lt;span class="storage storage_type storage_type_sql"&gt;VARCHAR2&lt;/span&gt;(&lt;span class="constant constant_numeric constant_numeric_sql"&gt;60&lt;/span&gt;),&lt;br /&gt;&lt;span class="storage storage_modifier storage_modifier_sql"&gt;PRIMARY KEY&lt;/span&gt; (id)&lt;br /&gt;);&lt;br /&gt;&lt;span class="meta meta_create meta_create_sql"&gt;&lt;span class="keyword keyword_other keyword_other_create keyword_other_create_sql"&gt;CREATE&lt;/span&gt; &lt;span class="keyword keyword_other keyword_other_sql"&gt;SEQUENCE&lt;/span&gt; &lt;span class="entity entity_name entity_name_function entity_name_function_sql"&gt;comics_seq&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Alternatively use &lt;a href="http://www.oracle.com/technology/pub/files/comics.sql"&gt;this SQL file&lt;/a&gt; to create the application table, COMICS.&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;sqlplus ruby/ruby@rails @comics.sql&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note, in this case the database SID is ‘rails’. The default SID for Oracle Enterprise Edition 10g is ‘orcl’, for Express Edition it’s ‘XE’&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Create a dinky Application&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Your application skeleton:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;rails comics_catalog&lt;br /&gt;cd comics_catalog&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Edit ‘comics_catalog/config/databases.yml’ – rails needs to know your login &amp; password info.&lt;br /&gt;&lt;br /&gt;Within your project directory, there is a directory called config and in it is a file named database.yml. You need to edit database.yml using your favorite text editor. Initially, the file will look like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_yaml"&gt;&lt;span class="meta meta_tag meta_tag_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;development&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;adapter&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;mysql&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;database&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;rails_development&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;host&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;localhost&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;username&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;root&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="meta meta_tag meta_tag_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;password&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml"&gt;#&lt;/span&gt; Warning: The database defined as 'test' will be erased and&lt;br /&gt;&lt;/span&gt;&lt;span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml"&gt;#&lt;/span&gt; re-generated from your development database when you run 'rake'.&lt;br /&gt;&lt;/span&gt;&lt;span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml"&gt;#&lt;/span&gt; Do not set this db to the same as development or production.&lt;br /&gt;&lt;/span&gt;&lt;span class="meta meta_tag meta_tag_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;test&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;adapter&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;mysql&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;database&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;rails_test&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;host&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;localhost&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;username&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;root&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="meta meta_tag meta_tag_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;password&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="meta meta_tag meta_tag_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;production&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;adapter&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;mysql&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;database&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;rails_production&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;host&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;localhost&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;username&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;root&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="meta meta_tag meta_tag_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;password&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Change the development properties as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_yaml"&gt;&lt;span class="meta meta_tag meta_tag_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;development&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;  &lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;adapter&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;oci&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;username&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;ruby&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;password&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;ruby&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;host&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;127.0.0.1:1234/orcl&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;host: takes a connect string of the form &amp;lt;ip_address&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt; for the machine that your Oracle instance resides on.&lt;br /&gt;&lt;br /&gt;Use the magical scaffold command to build a web based CRUD interface to the table we created above...&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;ruby script/generate scaffold Comic&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now you can access your Rails Comic Catalog application on your own development machine, using your favorite Web browser. Just access the following URL: http://localhost:3000/comics/list&lt;br /&gt;&lt;br /&gt;Phew! Done. Last step is Part 3: &lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-3.html"&gt;Pen of pesky Mongrels&lt;/a&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-8448077332701465044?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/8448077332701465044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=8448077332701465044' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/8448077332701465044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/8448077332701465044'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-2.html' title='Deploy Rails on Windows: Part 2'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-376597458192650986</id><published>2007-07-05T13:45:00.001Z</published><updated>2007-07-06T09:14:21.066Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='railsconf'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Deploy Rails on Windows: Part 1</title><content type='html'>An application I'm developing is due to go public around Christmas. I thought the best way to get to grips with deployment would be to set up a little test application, before trying to move all my code onto the server. This guide will consist of 3 parts:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-1.html"&gt;Installing Rails&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-2.html"&gt;My-first-app with Oracle&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-3.html"&gt;Pen of pesky Mongrels&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;I'll be using Windows Server, Oracle 10g, Mongrel &amp; Pen. Many thanks to &lt;a href="http://www.napcs.com/"&gt;Brian Hogan&lt;/a&gt; for his informative talk at RailsConf which made the whole process very easy. See &lt;a href="http://www.napcs.com/howto/rails/deploy/index.html"&gt;Deployment Strategies for Rails on Windows Servers&lt;/a&gt; for more detailed information.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;Part 1: Installing Rails&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Install Ruby&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.rubyonrails.org/down"&gt;Download&lt;/a&gt; the one click windows installer. When installing, uncheck 'SciTE' – there are better editors available. Also, make sure ‘Enable RubyGems’ is checked. This is the package manager for Ruby, used to install Rails itself and myriad of other stuff.&lt;br /&gt;&lt;br /&gt;Install to 'c:\program files\ruby' (or your installation path), then add ‘c:\program files\ruby\bin’ to your PATH for command line stuff.&lt;br /&gt;&lt;br /&gt;Goto ‘Control Panel\System’, select the ‘Advanced’ tab and click ‘Environment Variables’. Look under user variables. If PATH isn’t already defined, click ‘New’.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Variable name = ‘PATH’&lt;/li&gt;&lt;li&gt;Variable value = ‘%PATH%;c:\program files\ruby\bin’&lt;/li&gt;&lt;/ul&gt; Note the ‘;’ separator in the value string. If PATH is already defined just add ‘;c:\program files\ruby\bin’ to the end of it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Install Rails&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; Now that we have ruby installed, we can use RubyGems to install rails.&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;gem install rails --include-dependencies&lt;/pre&gt;&lt;br /&gt;Yes, it &lt;span style="font-style: italic;"&gt;is&lt;/span&gt; that easy.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;My-first-app&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create your application skeleton and start the server:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;rails path/to/your/new/application&lt;br /&gt;cd path/to/your/new/application&lt;br /&gt;ruby script/server&lt;/pre&gt;&lt;br /&gt;Congratulations! You’re now on Rails. Onto Part 2: &lt;a href="http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-2.html"&gt;My-first-app with Oracle&lt;/a&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-376597458192650986?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/376597458192650986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=376597458192650986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/376597458192650986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/376597458192650986'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/07/deploy-rails-on-windows-part-1.html' title='Deploy Rails on Windows: Part 1'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-5019839925711807256</id><published>2007-05-23T15:40:00.000Z</published><updated>2007-07-05T15:14:16.651Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='railsconf'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='activerecord'/><title type='text'>Improve Default Rails Database Performance</title><content type='html'>Active Record (AR) is &lt;span style="font-weight: bold;"&gt;slow&lt;/span&gt;. All that nice reflection comes at a price. You should use AR to prototype your app, then take a look at the logs.&lt;br /&gt;&lt;blockquote&gt;1. Sort your development log.&lt;/blockquote&gt;If a database query is only run a few times, let AR handle it. If one is being run a 1000 times then we should pull it out and tweak it.&lt;br /&gt;&lt;blockquote&gt;2. Pull the SQL from the log&lt;br /&gt;&lt;/blockquote&gt; Rails has already done the hard work for us, right?&lt;br /&gt;&lt;blockquote&gt;3. Tweak the SQL&lt;/blockquote&gt;Stick the tweaked DB queries in your models and things should move along nicely...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-5019839925711807256?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/5019839925711807256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=5019839925711807256' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/5019839925711807256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/5019839925711807256'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/05/improve-default-rails-database.html' title='Improve Default Rails Database Performance'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-4253313043217224214</id><published>2007-05-23T08:58:00.000Z</published><updated>2007-07-05T15:15:06.755Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='railsconf'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>RailsConf 2007</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_v4M7RTyIGCY/RlQEzGeLjFI/AAAAAAAAAAo/TvtM1EGwyng/s1600-h/railsconf_2007.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 509px; height: 340px;" src="http://bp1.blogger.com/_v4M7RTyIGCY/RlQEzGeLjFI/AAAAAAAAAAo/TvtM1EGwyng/s400/railsconf_2007.jpg" alt="" id="BLOGGER_PHOTO_ID_5067680756655688786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Ok, I've just got back from &lt;a href="http://conferences.oreillynet.com/rails/"&gt;RailsConf 2007&lt;/a&gt;, so the next few posts will be about stuff I picked up while I was there. I found the conference a bit light on technical content so don't expect anything ground breaking, just some general advice. For now, &lt;a href="http://wiki.oreillynet.com/wiki/railsconf2007/index.cgi?PresentationSlides"&gt;here's where you can find most of the slides&lt;/a&gt; from the conference.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-4253313043217224214?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/4253313043217224214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=4253313043217224214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/4253313043217224214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/4253313043217224214'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/05/railsconf-2007.html' title='RailsConf 2007'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_v4M7RTyIGCY/RlQEzGeLjFI/AAAAAAAAAAo/TvtM1EGwyng/s72-c/railsconf_2007.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-6982445071608839961</id><published>2007-03-22T10:11:00.000Z</published><updated>2007-06-13T16:08:32.189Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='idiomatic'/><title type='text'>Named Callbacks</title><content type='html'>Coming from a Java background I often find myself wanting to override constructors and other hooks. I should really pay more attention to the &lt;a href="http://www.pragmaticprogrammer.com/titles/rails/"&gt;documentation.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Instead of:&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_ruby"&gt;&lt;span class="meta meta_class meta_class_ruby"&gt;&lt;span class="keyword keyword_control keyword_control_class keyword_control_class_ruby"&gt;class&lt;/span&gt; &lt;span class="entity entity_name entity_name_type entity_name_type_class entity_name_type_class_ruby"&gt;MyClass&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="meta meta_function meta_function_method meta_function_method_without-arguments meta_function_method_without-arguments_ruby"&gt;&lt;span class="keyword keyword_control keyword_control_def keyword_control_def_ruby"&gt;def&lt;/span&gt; &lt;span class="entity entity_name entity_name_function entity_name_function_ruby"&gt;after_initialize&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="comment comment_line comment_line_number-sign comment_line_number-sign_ruby"&gt;    &lt;span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby"&gt;#&lt;/span&gt;Do Something...&lt;br /&gt;&lt;/span&gt;  &lt;span class="keyword keyword_control keyword_control_ruby"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword keyword_control keyword_control_ruby"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Do:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_ruby"&gt;&lt;span class="meta meta_class meta_class_ruby"&gt;&lt;span class="keyword keyword_control keyword_control_class keyword_control_class_ruby"&gt;class&lt;/span&gt; &lt;span class="entity entity_name entity_name_type entity_name_type_class entity_name_type_class_ruby"&gt;MyClass&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;after_initialize &lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;do_something&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="meta meta_function meta_function_method meta_function_method_without-arguments meta_function_method_without-arguments_ruby"&gt;&lt;span class="keyword keyword_control keyword_control_def keyword_control_def_ruby"&gt;def&lt;/span&gt; &lt;span class="entity entity_name entity_name_function entity_name_function_ruby"&gt;do_something&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="comment comment_line comment_line_number-sign comment_line_number-sign_ruby"&gt;    &lt;span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby"&gt;#&lt;/span&gt;Do Something...&lt;br /&gt;&lt;/span&gt;  &lt;span class="keyword keyword_control keyword_control_ruby"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword keyword_control keyword_control_ruby"&gt;end&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Update 13/06/07:&lt;br /&gt;&lt;br /&gt;Using named callbacks better conveys your &lt;span style="font-style: italic;"&gt;intention&lt;/span&gt;, making your code more readable.&lt;br /&gt;&lt;a href="http://www.therailsway.com/2007/6/7/railsconf-recap-named-callbacks"&gt;Similar article&lt;/a&gt; on &lt;a href="http://www.therailsway.com/"&gt;The Rails Way&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-6982445071608839961?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/6982445071608839961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=6982445071608839961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/6982445071608839961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/6982445071608839961'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/03/idomatic-rails.html' title='Named Callbacks'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-5816152367921255932</id><published>2007-03-21T16:30:00.000Z</published><updated>2007-03-22T10:55:02.896Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='idiomatic'/><category scheme='http://www.blogger.com/atom/ns#' term='activerecord'/><title type='text'>Active Record Constructors</title><content type='html'>Do not write your own initialiser to instantiate the object. e.g:&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_ruby"&gt;&lt;span class="meta meta_class meta_class_ruby"&gt;&lt;span class="keyword keyword_control keyword_control_class keyword_control_class_ruby"&gt;class&lt;/span&gt; &lt;span class="entity entity_name entity_name_type entity_name_type_class entity_name_type_class_ruby"&gt;MyClass&lt;span class="entity entity_other entity_other_inherited-class entity_other_inherited-class_ruby"&gt; &lt;span class="punctuation punctuation_separator punctuation_separator_inheritance punctuation_separator_inheritance_ruby"&gt;&amp;lt;&lt;/span&gt; ActiveRecord::Base&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="meta meta_function meta_function_method meta_function_method_with-arguments meta_function_method_with-arguments_ruby"&gt;&lt;span class="keyword keyword_control keyword_control_def keyword_control_def_ruby"&gt;def&lt;/span&gt; &lt;span class="entity entity_name entity_name_function entity_name_function_ruby"&gt;initialize&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_ruby"&gt;(&lt;/span&gt;&lt;span class="variable variable_parameter variable_parameter_function variable_parameter_function_ruby"&gt;params&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_ruby"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_ruby"&gt;@&lt;/span&gt;params&lt;/span&gt; = params&lt;br /&gt;  &lt;span class="keyword keyword_control keyword_control_ruby"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword keyword_control keyword_control_ruby"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Instead do this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_ruby"&gt;my_object = &lt;span class="support support_class support_class_ruby"&gt;MyClass&lt;/span&gt;.&lt;span class="keyword keyword_other keyword_other_special-method keyword_other_special-method_ruby"&gt;new&lt;/span&gt;(&lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;params&lt;/span&gt; =&amp;gt; params)&lt;br /&gt;my_object.save&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Or this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_ruby"&gt;&lt;span class="support support_class support_class_ruby"&gt;MyClass&lt;/span&gt;.create &lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;params&lt;/span&gt; =&amp;gt; params&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;The above will automatically save the record to the DB.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-5816152367921255932?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/5816152367921255932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=5816152367921255932' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/5816152367921255932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/5816152367921255932'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/03/active-record-constructors.html' title='Active Record Constructors'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-1012630759330552452</id><published>2007-03-21T14:36:00.000Z</published><updated>2007-07-09T10:00:29.148Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>Environment Variables in Mac OS X</title><content type='html'>I've been recently having trouble starting &lt;a href="https://www.gotomeeting.com/"&gt;certain java applets&lt;/a&gt; on my MacBook. For some reason , once downloaded, the Jar file would not extract or run. After much tinkering I found that the applets &lt;span style="font-style: italic;"&gt;would work&lt;/span&gt; if I started my browser from the command line rather than the dock.&lt;br /&gt;&lt;br /&gt;Similarly I couldn't get certain scripts to work from textmate, but they would work if I started textmate from the command line.&lt;br /&gt;&lt;br /&gt;The problem was that the $PATH variable I had set in my .bash_profile was not the same as that set in my ~/.MacOS/environment.plist file.&lt;br /&gt;&lt;br /&gt;Certain applications depend on being able to read your PATH and other environment variables. However those set in .bash_profile have absolutely no effect on apps started from the Dock. Instead make sure that the PATH variable in your environment.plist file is in sync with that in your .bash_login by doing 'echo $PATH' in a terminal and copying the result into said file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-1012630759330552452?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/1012630759330552452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=1012630759330552452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/1012630759330552452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/1012630759330552452'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/03/environment-variables-in-mac-os-x.html' title='Environment Variables in Mac OS X'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-2294358504356313238</id><published>2007-03-21T14:07:00.000Z</published><updated>2007-07-05T15:13:04.405Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>Syntax Highlighting in blogger</title><content type='html'>Eventually (in the far distint future) I want to set up my own server to host rails apps on and perhaps a blog driven by &lt;a href="http://mephistoblog.com/"&gt;Mephisto&lt;/a&gt; - particularly cause you can get good syntax highlighting plugins for it.&lt;br /&gt;&lt;br /&gt;In the meantime, I &lt;a href="http://www.quirkey.com/blog/2006/07/13/highlight-me-baby/"&gt;discovered&lt;/a&gt; that you can export your current highlighting theme from textmate as CSS, using the bundle command 'Create CSS From Current Theme' (vaguely enough ;) ). Then any time I want to post code snippets here, I use the similarly vague command 'Create HTML From Document'&lt;br /&gt;&lt;br /&gt;All you need to do is copy and paste the CSS into your Blogger template.&lt;br /&gt;&lt;br /&gt;Beautiful.&lt;a href="http://www.quirkey.com/blog/2006/07/13/highlight-me-baby/"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mephistoblog.com/"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-2294358504356313238?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/2294358504356313238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=2294358504356313238' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/2294358504356313238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/2294358504356313238'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/03/syntax-higlighting-in-blogger.html' title='Syntax Highlighting in blogger'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-822125744274274399</id><published>2007-03-21T13:02:00.000Z</published><updated>2007-03-21T14:32:26.413Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Selection List syntax</title><content type='html'>&lt;p&gt;I dont think the explanation of 'selection lists' in Agile Web Development with Rails(1st ed) is very clear. It mentions:&lt;br /&gt;&lt;/p&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_ruby"&gt;select(&lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;variable&lt;/span&gt;, &lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;attribute&lt;/span&gt;, choices, options, html_options)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Where you can then set the default selection with:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_ruby"&gt;&lt;span class="variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_ruby"&gt;@&lt;/span&gt;variable&lt;/span&gt;.attribute&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;However this variable is not available automatically, you need to create it yourself. The def in the api is more intuitively described as:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_ruby"&gt;select(&lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;my_object&lt;/span&gt;, &lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;method&lt;/span&gt;, choices, options, html_options)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;You must then create your own class with the accessor methods you need so that in the controller you can do something like:&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_ruby"&gt;&lt;span class="meta meta_function meta_function_method meta_function_method_without-arguments meta_function_method_without-arguments_ruby"&gt;&lt;span class="keyword keyword_control keyword_control_def keyword_control_def_ruby"&gt;def&lt;/span&gt; &lt;span class="entity entity_name entity_name_function entity_name_function_ruby"&gt;action&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_ruby"&gt;@&lt;/span&gt;my_object&lt;/span&gt; = &lt;span class="support support_class support_class_ruby"&gt;MyClass&lt;/span&gt;.&lt;span class="keyword keyword_other keyword_other_special-method keyword_other_special-method_ruby"&gt;new&lt;/span&gt;&lt;br /&gt; &lt;span class="variable variable_other variable_other_readwrite variable_other_readwrite_instance variable_other_readwrite_instance_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_ruby"&gt;@&lt;/span&gt;my_object&lt;/span&gt;.method = params[&lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;my_object&lt;/span&gt;][&lt;span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby"&gt;:&lt;/span&gt;method&lt;/span&gt;]&lt;br /&gt;&lt;span class="keyword keyword_control keyword_control_ruby"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-822125744274274399?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/822125744274274399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=822125744274274399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/822125744274274399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/822125744274274399'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/03/selection-list-syntax.html' title='Selection List syntax'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-5347785343137883194</id><published>2007-03-21T13:01:00.000Z</published><updated>2007-03-21T14:32:26.414Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>session variable not available</title><content type='html'>&lt;div class="post-body"&gt;You CANNOT access the session hash from within a controllers initialize() method.             &lt;/div&gt;                 &lt;span class="post-author"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-5347785343137883194?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/5347785343137883194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=5347785343137883194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/5347785343137883194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/5347785343137883194'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/03/session-variable-not-available.html' title='session variable not available'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-1524024858796452360</id><published>2007-03-21T13:00:00.000Z</published><updated>2007-03-21T14:32:26.414Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Rails Fixtures with Legacy Database</title><content type='html'>&lt;div class="post-body"&gt;       &lt;p&gt;My setup was:&lt;br /&gt;&lt;br /&gt;MySQL Table name: &lt;span style="font-style: italic;"&gt;TABLENAME&lt;/span&gt;&lt;br /&gt;Rails Model name: &lt;span style="font-style: italic;"&gt;TableName&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;The fixture file has to be &lt;span style="font-style: italic;"&gt;TABLENAME.yml&lt;/span&gt; (not case sensitive)&lt;/li&gt;&lt;li&gt;fixtures() takes the symbol name of the Model, in this case &lt;span style="font-style: italic;"&gt;:tableName &lt;/span&gt;(note the first lowercase letter)&lt;span style="font-style: italic;"&gt; &lt;/span&gt;This is the bit that drove me mad - i was writing &lt;span style="font-style: italic;"&gt;fixtures :TableName &lt;/span&gt;which appeared to work, but then the test failed if I tried &lt;span style="font-style: italic;"&gt;TableName(:foo)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Now you can write &lt;span style="font-style: italic;"&gt;tableName(:foo)&lt;/span&gt;&lt;span class="post-author"&gt;&lt;/span&gt;&lt;span class="post-timestamp"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;             &lt;/div&gt;&lt;span class="post-comment-link"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-1524024858796452360?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/1524024858796452360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=1524024858796452360' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/1524024858796452360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/1524024858796452360'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/03/rails-fixtures-with-legacy-database.html' title='Rails Fixtures with Legacy Database'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1067158659037736473.post-3659273546479873310</id><published>2007-03-21T12:56:00.000Z</published><updated>2007-05-23T11:44:18.694Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>Hello and Welcome!</title><content type='html'>This humble blog serves mainly as an aide-memoire for the Ruby on Rails mistakes I've made, so that the head-against-brick-wall process is less painful next time. Who knows, perhaps as I get better, some of these posts will be useful to others too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1067158659037736473-3659273546479873310?l=barrykeenan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://barrykeenan.blogspot.com/feeds/3659273546479873310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1067158659037736473&amp;postID=3659273546479873310' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/3659273546479873310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1067158659037736473/posts/default/3659273546479873310'/><link rel='alternate' type='text/html' href='http://barrykeenan.blogspot.com/2007/03/hello-and-welcome.html' title='Hello and Welcome!'/><author><name>Barry</name><uri>http://www.blogger.com/profile/05032432528106076639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
