<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D0UGRXw9eyp7ImA9WhBaEkU.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512</id><updated>2013-05-23T15:00:24.263+10:00</updated><category term="logging" /><category term="controllers" /><category term="geek culture" /><category term="postgres" /><category term="passive income" /><category term="ssh tunneling" /><category term="dinner" /><category term="salaries" /><category term="before_filter" /><category term="cheatsheets" /><category term="taste" /><category term="strategy" /><category term="community" /><category term="lens" /><category term="privacy" /><category term="text-only email" /><category term="algorithms" /><category term="HttpMock" /><category term="acts_as_state_machine" /><category term="linkedin" /><category term="upgrade" /><category term="comparisons" /><category term="finders" /><category term="passenger" /><category term="work psychology" /><category term="redbubble" /><category term="SLUG" /><category term="linuxchix" /><category term="acts_as_authenticated" /><category term="dehumanize" /><category term="too much choice" /><category term="visa" /><category term="fixtures" /><category term="choice" /><category term="wizard" /><category term="uuid" /><category term="CSS" /><category term="talk" /><category term="FOSS" /><category term="rants" /><category term="rails hosting" /><category term="gems" /><category term="networking" /><category term="scaffold" /><category term="code snippet" /><category term="mvc" /><category term="blacklists" /><category term="negotiation" /><category term="moist_scaffold" /><category term="telecommuting" /><category term="&quot;Eric Drexler&quot;" /><category term="puzzles" /><category term="&quot;login form&quot;" /><category term="design" /><category term="email marketing" /><category term="meetings" /><category term="ubuntu" /><category term="blogging" /><category term="bureaucracy" /><category term="svn" /><category term="evangelism" /><category term="ruby" /><category term="accuracy" /><category term="DRY" /><category term="web applications" /><category term="git gotchas" /><category term="geeks" /><category term="social sites" /><category term="partial templates" /><category term="redirect_to" /><category term="gem_bundler" /><category term="floating-point arithmetic" /><category term="best practice" /><category term="explaining technology" /><category term="tuning" /><category term="single sign on" /><category term="&quot;gem bundler&quot;" /><category term="productivity" /><category term="clients" /><category term="encapsulation" /><category term="scripts" /><category term="rails edge" /><category term="navigation" /><category term="ask the right question" /><category term="csv_builder" /><category term="women in it" /><category term="cookies" /><category term="port forwarding" /><category term="files" /><category term="ssh" /><category term="data-mining" /><category term="death threats" /><category term="harmony" /><category term="HyRes" /><category term="rails2.0" /><category term="stopcyberbullying" /><category term="agement" /><category term="words" /><category term="discipline" /><category term="authenticity token" /><category term="reverse flash mob" /><category term="routing" /><category term="forking" /><category term="social media" /><category term="writing" /><category term="select_tag" /><category term="filtering" /><category term="Australia Post" /><category term="self-determinism" /><category term="engines" /><category term="pictures" /><category term="LUGs" /><category term="documentation" /><category term="aasm" /><category term="encoding" /><category term="controversy" /><category term="shower" /><category term="average" /><category term="methodology" /><category term="art" /><category term="freedom" /><category term="coding practice" /><category term="extending class methods" /><category term="outsourcing" /><category term="exceptions" /><category term="flat html" /><category term="rails patches" /><category term="founders" /><category term="migrations" /><category term="goodwill" /><category term="performance" /><category term="generator" /><category term="warnings" /><category term="xml" /><category term="unobtrusive javascript" /><category term="urls" /><category term="worst practice" /><category term="entrepreneur" /><category term="arrays" /><category term="maths" /><category term="ruby-prof" /><category term="milestones" /><category term="parameters" /><category term="forgery protection" /><category term="gotchas" /><category term="dosbox" /><category term="dry_scaffold" /><category term="decisions" /><category term="style" /><category term="rationality" /><category term="rspec" /><category term="PR" /><category term="dilemma" /><category term="integration" /><category term="presenting" /><category term="monetisation" /><category term="shoulda" /><category term="obituaries" /><category term="errors" /><category term="graphic-design" /><category term="proffessionalism" /><category term="kcachegrind" /><category term="heroku" /><category term="requirements" /><category term="computing" /><category term="alternative frameworks" /><category term="navel gazing" /><category term="articles" /><category term="roaming" /><category term="users" /><category term="optimisation" /><category term="trust" /><category term="javascript" /><category term="craziness" /><category term="appliances" /><category term="takahashi" /><category term="IT" /><category term="AJAX" /><category term="help" /><category term="fastercsv" /><category term="analogies" /><category term="portfolio" /><category term="consulting" /><category term="forms" /><category term="csv" /><category term="timezones" /><category term="fitnesse" /><category term="recommendations" /><category term="&quot;ruby enterprise&quot;" /><category term="catch-up" /><category term="headhunters" /><category term="personal" /><category term="time wasters" /><category term="logger" /><category term="views" /><category term="culture" /><category term="random" /><category term="stateful roles" /><category term="assertions" /><category term="metaprogramming" /><category term="games" /><category term="goals" /><category term="website" /><category term="http status" /><category term="API" /><category term="toys" /><category term="idiom" /><category term="life" /><category term="enumerable" /><category term="tags" /><category term="economics" /><category term="hacks" /><category term="poetry" /><category term="article" /><category term="Time" /><category term="non-conformity" /><category term="tweaks" /><category term="sociology" /><category term="estimation" /><category term="indexes" /><category term="restful rails" /><category term="bundler" /><category term="installing" /><category term="web-development" /><category term="icons" /><category term="cults" /><category term="rubcas" /><category term="bugs" /><category term="books" /><category term="personal challenge" /><category term="validations" /><category term="&quot;read widely&quot;" /><category term="organisation" /><category term="silverpop" /><category term="mocha" /><category term="contracting" /><category term="SQLite" /><category term="scaling" /><category term="rubyfit" /><category term="scoping" /><category term="motivation" /><category term="complaints" /><category term="truth" /><category term="job" /><category term="toasters" /><category term="git" /><category term="rails" /><category term="core-extensions" /><category term="locales" /><category term="user interface design" /><category term="project scope" /><category term="Rails 2.0" /><category term="&quot;release early" /><category term="tone" /><category term="job ads" /><category term="times" /><category term="why isn't this in rails?" /><category term="feminism" /><category term="success" /><category term="obsolete" /><category term="anti-virus software" /><category term="humour" /><category term="HyperactiveResource" /><category term="ffmpeg" /><category term="rubygems" /><category term="philosophy" /><category term="employment" /><category term="ui" /><category term="problems" /><category term="ReXML" /><category term="tech support" /><category term="old games" /><category term="foreign keys" /><category term="webcomics" /><category term="marketing" /><category term="squidoo" /><category term="&quot;single sign out&quot;" /><category term="mobile broadband" /><category term="moving" /><category term="education" /><category term="&quot;single sign on&quot;" /><category term="states" /><category term="ActiveRecord" /><category term="lists" /><category term="christmas" /><category term="github" /><category term="capability" /><category term="bullshit" /><category term="restful_authentication" /><category term="NaNoWriMo" /><category term="howtos" /><category term="badges" /><category term="test helper" /><category term="enumerables" /><category term="inflections" /><category term="user interface" /><category term="overloading" /><category term="stylesheets" /><category term="blog software" /><category term="learning" /><category term="on the road" /><category term="social context" /><category term="comments" /><category term="inflector" /><category term="helpers" /><category term="PHBs" /><category term="easier than you think" /><category term="stored procedures" /><category term="freebies" /><category term="login" /><category term="antispam" /><category term="perspective" /><category term="etiquette" /><category term="deployment" /><category term="hudson" /><category term="code snippets" /><category term="ship it" /><category term="seo" /><category term="copyright" /><category term="ruby on rails" /><category term="infrastructure" /><category term="params" /><category term="paypal" /><category term="partials" /><category term="Authentication" /><category term="project management" /><category term="front end" /><category term="rjs" /><category term="update_attribute" /><category term="fitness" /><category term="Nokogiri" /><category term="templates" /><category term="illness" /><category term="recruiting" /><category term="funding" /><category term="release often&quot;" /><category term="patches" /><category term="Feynman" /><category term="webistrano" /><category term="mutt" /><category term="psychology" /><category term="travel" /><category term="novel" /><category term="current events" /><category term="tips" /><category term="macro" /><category term="tabbed navigation" /><category term="startups" /><category term="monkey-patches" /><category term="buttons" /><category term="waiting" /><category term="business" /><category term="gravatar" /><category term="reviews" /><category term="MySQL" /><category term="refactoring" /><category term="security" /><category term="emulators" /><category term="customer service" /><category term="mistakes" /><category term="models" /><category term="backlinking" /><category term="private messaging" /><category term="links" /><category term="lca2007" /><category term="yaml" /><category term="resume" /><category term="timezone" /><category term="ActiveResource" /><category term="HTML" /><category term="coding" /><category term="file upload" /><category term="soap4r" /><category term="quality" /><category term="version control" /><category term="testing" /><category term="plugins" /><category term="skill" /><category term="ActionMailer" /><category term="form_tag_helper" /><category term="working overseas" /><category term="gallery" /><category term="rules" /><category term="workflow" /><category term="developing" /><category term="exuberant programming" /><category term="rubycas" /><category term="conference" /><category term="string" /><category term="achievement" /><category term="email base64" /><category term="processes" /><category term="transactions" /><category term="namespaces" /><category term="links founders" /><category term="screencasts" /><category term="internet" /><category term="layout" /><category term="haccp" /><category term="dos" /><category term="working with other people" /><category term="authorization" /><category term="science" /><category term="database" /><category term="linux" /><category term="apache" /><category term="women" /><category term="repositories" /><category term="soap" /><category term="kathy sierra" /><category term="law" /><category term="vacation" /><category term="sliding doors" /><category term="releases" /><category term="shower ambassador" /><category term="programming" /><category term="sorting" /><category term="edge" /><category term="lisp" /><category term="&quot;broad education&quot;" /><category term="precision" /><category term="geek girls" /><category term="config" /><category term="conversions" /><category term="meetups" /><category term="job offers" /><category term="&quot;error messages&quot;" /><category term="why isn't this in ruby?" /><category term="optimism" /><category term="uploading" /><category term="dates" /><category term="controller niftiness" /><category term="authorisation" /><category term="world domination" /><category term="fixes" /><category term="capistrano" /><category term="Rails 3.0" /><category term="fiction" /><category term="satire" /><category term="profiling" /><category term="db" /><category term="matchfounders" /><title>Ruby-coloured glasses</title><subtitle type="html">Tech blog of a rails contractor.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://rubyglasses.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>303</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/RubyGlasses" /><feedburner:info uri="rubyglasses" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0IMR3wyeyp7ImA9WhBaEU8.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-1623246089398453053</id><published>2013-05-21T17:33:00.000+10:00</published><updated>2013-05-21T17:33:06.293+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-21T17:33:06.293+10:00</app:edited><title>Backporting "in_array" to older versions of should'a "ensure_inclusion_of" </title><content type="html">&lt;p&gt;Here's another shoulda backport I added recently. If you're still stuck using a legacy Rails system, this backport will let you use "in_array" in the "ensures_inclusion_of" Matcher.&lt;/p&gt;

&lt;p&gt;Save it into something like: &lt;span class="code"&gt;config/initializers/shoulda_monkeypatches.rb&lt;/span&gt;, then use it like this:&lt;/p&gt;


&lt;pre class="code"&gt;
   should ensure_inclusion_of(:widget_status).in_array(Widget::VALID_STATUSES).allow_blank.with_message(:is_invalid).use_integer_test_value
&lt;/pre&gt;

&lt;pre class="code"&gt;
  # backport the "in_array" method for the ensure_inclusion_of matcher
  # While we're at it, add allow_blank and allow_nil too
  module Shoulda # :nodoc:
    module ActiveRecord # :nodoc:
      module Matchers
        class EnsureInclusionOfMatcher
          ARBITRARY_OUTSIDE_STRING = 'shouldamatchersteststring'
          ARBITRARY_OUTSIDE_INT = -999999999

          # to initialize the options
          def initialize(attribute)
            super(attribute)
            @options = {}
          end

          # add the method we want to allow us to pass in arrays instead of
          # just ranges
          def in_array(array)
            @array = array
            self
          end          

          # might as well also add the allow_blank and allow_nil methods too
          def allow_blank(allow_blank = true)
            @options[:allow_blank] = allow_blank
            self
          end

          def allow_nil(allow_nil = true)
            @options[:allow_nil] = allow_nil
            self
          end

          # This is a method of my own addition to point out that the
          # test-value must be an Int, not a String... because a string can
          # evaluate to 0 which is a valid Int... which will make the test
          # pass where it shouldn't :P
          def use_integer_test_value(only_integer = true)
            @options[:use_integer_test_value] = only_integer
            self
          end

          # override description so it doesn't just try to inspect the range
          def description
            "ensure inclusion of #{@attribute} in #{inspect_message}"
          end

          # override the matches method to allow arrays as well as ranges
          def matches?(subject)
            super(subject)

            if @range
              @low_message ||= :inclusion
              @high_message ||= :inclusion

              disallows_lower_value &amp;amp;&amp;amp;
                allows_minimum_value &amp;amp;&amp;amp;
                disallows_higher_value &amp;amp;&amp;amp;
                allows_maximum_value
            elsif @array
              if allows_all_values_in_array? &amp;amp;&amp;amp; allows_blank_value? &amp;amp;&amp;amp; allows_nil_value? &amp;amp;&amp;amp; disallows_value_outside_of_array?
                true
              else
                @failure_message_for_should = "#{@array} doesn't match array in validation"
                false
              end
            end
          end

 
        private

          # provide the message-inspect method to use either array or range
          def inspect_message
            @range.nil? ? @array.inspect : @range.inspect
          end          

          # array helper methods
          def allows_all_values_in_array?
            @array.all? do |value|
              allows_value_of(value, @low_message)
            end
          end

          def disallows_value_outside_of_array?
            disallows_value_of(value_outside_of_array)
          end

          def value_outside_of_array
            test_val = @options[:use_integer_test_value] ? ARBITRARY_OUTSIDE_INT : ARBITRARY_OUTSIDE_STRING
            if @array.include?(test_val)
              raise CouldNotDetermineValueOutsideOfArray
            else
              test_val
            end
          end

          # blank and nil helper methods

          def allows_blank_value?
            if @options.key?(:allow_blank)
              blank_values = ['', ' ', "\n", "\r", "\t", "\f"]
              @options[:allow_blank] == blank_values.all? { |value| allows_value_of(value) }
            else
              true
            end
          end

          def allows_nil_value?
            if  @options.key?(:allow_nil)
              @options[:allow_nil] == allows_value_of(nil)
            else
              true
            end
          end         




        end

      end
    end
  end

&lt;/pre&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=OQ-s7zhqIaA:C_ZewyN6aS4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=OQ-s7zhqIaA:C_ZewyN6aS4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=OQ-s7zhqIaA:C_ZewyN6aS4:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=OQ-s7zhqIaA:C_ZewyN6aS4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=OQ-s7zhqIaA:C_ZewyN6aS4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=OQ-s7zhqIaA:C_ZewyN6aS4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=OQ-s7zhqIaA:C_ZewyN6aS4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=OQ-s7zhqIaA:C_ZewyN6aS4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=OQ-s7zhqIaA:C_ZewyN6aS4:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/OQ-s7zhqIaA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/1623246089398453053/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=1623246089398453053" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/1623246089398453053?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/1623246089398453053?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/OQ-s7zhqIaA/backporting-inarray-to-older-versions.html" title="Backporting &quot;in_array&quot; to older versions of should'a &quot;ensure_inclusion_of&quot; " /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/05/backporting-inarray-to-older-versions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUBQn0zeip7ImA9WhBUE08.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-452921770116067147</id><published>2013-04-30T22:50:00.000+10:00</published><updated>2013-04-30T22:50:53.382+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-30T22:50:53.382+10:00</app:edited><title>Enforced computer-free time</title><content type="html">&lt;p&gt;Gah - I've been computer-free for the past week, and not by choice.&lt;/p&gt;

&lt;p&gt;My ageing macbook suddenly started to switch off... at random. This was ok for a while... but when it took four times for it to even get through the boot process - I had to take it into the Apple shop. meanwhile I finally set about getting a new desktop, and work gave me a new macbook to try and use.&lt;/p&gt;


&lt;p&gt;I couldn't get the monitor to work on the desktop, and the macbook is too new to run the current ubuntu LTS (though I somehow managed to get 9.10 to install... but it won't find the ethernet port)...&lt;/p&gt;
&lt;p&gt;I've finally got the desktop working (I was using the wrong video connection) but I still can't get mail to work properly (the joys of mail on a linux machine...), and my macbook is back from the shop... but the ethernet isn't working.&lt;/p&gt;
&lt;p&gt;soooo.... still no email and it's been a week. But at least I have google now.&lt;/p&gt;


&lt;p&gt;You realise just how dependant on something you've become when you suddenly don't have it anymore.&lt;/p&gt;
&lt;p&gt;You also find just how stuck you can be. How do you find the location of a good internet shop if you don't have access to google to look one up? There used to be a directory-services phone number, but I have no idea what that is anymore, and of course I don't have a copy of the yellow pages anymore (who bothers with those when you have google)?&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yK2f-odHXPk:6jNPeiL1Doo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yK2f-odHXPk:6jNPeiL1Doo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yK2f-odHXPk:6jNPeiL1Doo:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yK2f-odHXPk:6jNPeiL1Doo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=yK2f-odHXPk:6jNPeiL1Doo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yK2f-odHXPk:6jNPeiL1Doo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yK2f-odHXPk:6jNPeiL1Doo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=yK2f-odHXPk:6jNPeiL1Doo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yK2f-odHXPk:6jNPeiL1Doo:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/yK2f-odHXPk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/452921770116067147/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=452921770116067147" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/452921770116067147?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/452921770116067147?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/yK2f-odHXPk/enforced-computer-free-time.html" title="Enforced computer-free time" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/04/enforced-computer-free-time.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUNSXk6fip7ImA9WhBVGE0.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-4507057240117417471</id><published>2013-04-24T22:24:00.001+10:00</published><updated>2013-04-24T22:24:58.716+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-24T22:24:58.716+10:00</app:edited><title>Ubuntu without the Unity!</title><content type="html">&lt;p&gt;For some time now my ageing (and now quite flaky) Macbook Pro has been running Lucid Lynx (an older version of Ubuntu). I've been biding my time and avoiding upgrading since, well, April 2010, I guess.&lt;/p&gt;
&lt;p&gt;For most of the time it was because upgrading your only machine that you rely on for 100% of your income, to a potentially unstable, non long-term release version is generally a bad idea; but then, when I went to a new employer, I tried a new install of the new long term release... and slammed headlong into the weirdness that is the Unity Interface.&lt;/p&gt;
&lt;p&gt;To sum up my experience: when I buy a desktop, I want it to *be* a desktop... not a iPad.&lt;/p&gt;

&lt;p&gt;Now - maybe I'm just being backwards and should embrace the new unified interface which I'm told is meant to be amazing... if a little bloated.. and sometimes corrupts your file system if something goes wrong... but this is still my only machine (for now) and I need to be sure it's ok. I don't want to upgrade to Unity.&lt;/p&gt;

&lt;p&gt;Of course, there is now a new long-term-release version, and sadly, the old one is now no longer supported, so I'm feeling a bit like a sprite in an old platform game, being relentlessly pushed towards the future by the scrolling screen...&lt;/p&gt;

&lt;p&gt;Thankfully, I've malingered just long enough for the &lt;a href="https://wiki.ubuntu.com/UbuntuGNOME"&gt;Ubuntu Gnome&lt;/a&gt; project to have been officially blessed by . it's not an LTR version yet, but it will be. &lt;/p&gt;
&lt;p&gt;Until then - it's also possible to upgrade to the LTR but keep gnome. I've been putting it off because I'm ultra-busy and kept finding other, much more important things to do than figuring out how to do it myself... but I've just found a neat article on how to &lt;a href="http://www.geek.com/chips/dont-uninstall-ubuntu-just-change-the-interface-1542514/"&gt;change your ubuntu interface to gnome&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Just what the doctor ordered&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=6QtXZy4oPBo:2YGCW9p2CYA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=6QtXZy4oPBo:2YGCW9p2CYA:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=6QtXZy4oPBo:2YGCW9p2CYA:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=6QtXZy4oPBo:2YGCW9p2CYA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=6QtXZy4oPBo:2YGCW9p2CYA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=6QtXZy4oPBo:2YGCW9p2CYA:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=6QtXZy4oPBo:2YGCW9p2CYA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=6QtXZy4oPBo:2YGCW9p2CYA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=6QtXZy4oPBo:2YGCW9p2CYA:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/6QtXZy4oPBo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/4507057240117417471/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=4507057240117417471" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/4507057240117417471?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/4507057240117417471?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/6QtXZy4oPBo/ubuntu-without-unity.html" title="Ubuntu without the Unity!" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/04/ubuntu-without-unity.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMGSHs4eCp7ImA9WhBWF0g.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-4626235096400900490</id><published>2013-04-12T18:47:00.000+10:00</published><updated>2013-04-12T18:47:09.530+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-12T18:47:09.530+10:00</app:edited><title>Huge medieval camping event - come and join in!</title><content type="html">&lt;img src="http://1.bp.blogspot.com/_jWqDV673Shw/SeKzZWf_w2I/AAAAAAAAAkU/boS5ZLd0DCc/s400/rowany.jpg" alt="war at Rowany festival" width="550px" /&gt;

&lt;p&gt;The reason it's been so quiet around here this month is that I've been crazy busy in my main hobby due to our major event for the year (run by our local group).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://festival.lochac.sca.org/"&gt;Rowany Festival&lt;/a&gt; is the largest Medieval re-enactment event in the Southern Hemisphere. I've heard it described as "kind of like Burning Man but with a medieval theme" - we prepare all year for this! &lt;/p&gt;
&lt;p&gt;This year 800 of us all got together at Peats Ridge and camped medieval-style, fought wars, sang, danced, drank a *lot* of booze (some of it made by me) and generally had a great time...&lt;/p&gt;
&lt;p&gt;Needless to say not a lot of Ruby got written... but that'll pick up again now I've got most of my washing done and camp kit packed away again.&lt;/p&gt;
&lt;p&gt;If you'd like to join me on this stuff - I'm the president the NSW branch of the &lt;a href="http://www.sca.org/"&gt;SCA&lt;/a&gt;, known as &lt;a href="http://rowany.lochac.sca.org/"&gt;Rowany&lt;/a&gt;. The Australian kingdom is called &lt;a href="http://lochac.sca.org/"&gt;Lochac&lt;/a&gt; (and also covers NZ too).&lt;/p&gt;
&lt;p&gt;The whole Society is huge: 100,000 worldwide, and we all run regular events (camping roughly once a quarter, and feasts/tourneys once a month and just general hanging-out and learning fun stuff every week) and it's a great deal of fun.&lt;/p&gt;
&lt;p&gt;Come along to our casual fighter-practice which is held on Tuesday nights at Petersham Town Hall on Crystal St (near to Petersham Station). We regularly get 30-50 people every week and they're running beginners fighting classes right now*. We also have regular singing, Calligraphy fibre-craft and costuming days every month.&lt;/p&gt; 
&lt;hr&gt;
&lt;p&gt;* its $5 a night for non-members, or you can join for a year for $30 - but you have to do &lt;a href="https://registry.sca.org.au/MembershipForm.php"&gt;your membership online here&lt;/a&gt; (we're not allowed to take payment directly for that)&lt;/p&gt;

&lt;p&gt;Picture Credit: &lt;a href="http://enoughwealth.blogspot.com.au/2009/04/rowany-festival.html"&gt;Enough Wealth: Rowany Festival&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yo4WSq-SQYc:8ohekoYEbiI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yo4WSq-SQYc:8ohekoYEbiI:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yo4WSq-SQYc:8ohekoYEbiI:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yo4WSq-SQYc:8ohekoYEbiI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=yo4WSq-SQYc:8ohekoYEbiI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yo4WSq-SQYc:8ohekoYEbiI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yo4WSq-SQYc:8ohekoYEbiI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=yo4WSq-SQYc:8ohekoYEbiI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=yo4WSq-SQYc:8ohekoYEbiI:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/yo4WSq-SQYc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/4626235096400900490/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=4626235096400900490" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/4626235096400900490?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/4626235096400900490?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/yo4WSq-SQYc/huge-medieval-camping-event-come-and.html" title="Huge medieval camping event - come and join in!" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_jWqDV673Shw/SeKzZWf_w2I/AAAAAAAAAkU/boS5ZLd0DCc/s72-c/rowany.jpg" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/04/huge-medieval-camping-event-come-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEGQ3w5eyp7ImA9WhBRFEs.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-5034468541910467294</id><published>2013-03-05T17:06:00.002+11:00</published><updated>2013-03-05T17:07:02.223+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-05T17:07:02.223+11:00</app:edited><title>Link: Why Yammer believes the traditional engineering organizational structure is dead</title><content type="html">&lt;p&gt;This is a great article describing the way that Yammer has set up its organisational structure to be nimble and effective. &lt;a href="http://pandodaily.com/2013/02/28/why-yammer-believes-the-traditional-engineering-organizational-structure-is-dead/"&gt;Why Yammer believes the traditional engineering organizational structure is dead&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Highlights for me:&lt;/p&gt;
&lt;blockquote&gt;Yammer’s biggest rule of thumb is “2 to 10 people, 2 to 10 weeks,” ... If you employ the “2 to 10″ rule, it’ll also force you to release often, test your assumptions, and not over-invest in mistakes.&lt;/blockquote&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;blockquote&gt;While everybody knows how expensive context switching is, it’s staggering that nobody builds that into their organization as a constraint. With total focus, you build one thing, ship it, and then are able to move onto something else.&lt;/blockquote&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=8iLi7NJKFmU:CIaN-05ZdqQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=8iLi7NJKFmU:CIaN-05ZdqQ:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=8iLi7NJKFmU:CIaN-05ZdqQ:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=8iLi7NJKFmU:CIaN-05ZdqQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=8iLi7NJKFmU:CIaN-05ZdqQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=8iLi7NJKFmU:CIaN-05ZdqQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=8iLi7NJKFmU:CIaN-05ZdqQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=8iLi7NJKFmU:CIaN-05ZdqQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=8iLi7NJKFmU:CIaN-05ZdqQ:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/8iLi7NJKFmU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/5034468541910467294/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=5034468541910467294" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/5034468541910467294?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/5034468541910467294?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/8iLi7NJKFmU/link-why-yanmer-believes-traditional.html" title="Link: Why Yammer believes the traditional engineering organizational structure is dead" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/03/link-why-yanmer-believes-traditional.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEECQXg7fSp7ImA9WhBSFkQ.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-8094702886559280093</id><published>2013-02-24T20:04:00.001+11:00</published><updated>2013-02-24T20:04:20.605+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-24T20:04:20.605+11:00</app:edited><title>rubyconf was awesome</title><content type="html">that is all...&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=UaIt9DcV024:3rDK32JFOq0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=UaIt9DcV024:3rDK32JFOq0:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=UaIt9DcV024:3rDK32JFOq0:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=UaIt9DcV024:3rDK32JFOq0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=UaIt9DcV024:3rDK32JFOq0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=UaIt9DcV024:3rDK32JFOq0:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=UaIt9DcV024:3rDK32JFOq0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=UaIt9DcV024:3rDK32JFOq0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=UaIt9DcV024:3rDK32JFOq0:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/UaIt9DcV024" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/8094702886559280093/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=8094702886559280093" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/8094702886559280093?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/8094702886559280093?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/UaIt9DcV024/rubyconf-was-awesome.html" title="rubyconf was awesome" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/02/rubyconf-was-awesome.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMAQXk8fCp7ImA9WhBTGE8.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-4593595790861385546</id><published>2013-02-14T17:14:00.000+11:00</published><updated>2013-02-14T17:14:00.774+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-14T17:14:00.774+11:00</app:edited><title>Quick and dirty facebook feed parsing</title><content type="html">&lt;p&gt;So, there's this big discussion going on for &lt;a href="lochac.sca.org.au"&gt;my hobby group&lt;/a&gt; at the moment, and the main discussion has been going on in facebook - mainly because that's where I was first asked to set up a discussion and it took all of five minutes to get the page up and running.&lt;/p&gt;

&lt;p&gt;However - now that discussions are progressing, there are a number of people *outside* the facebookiverse who have raised quite reasonable objections to the discussion happening there. not everyone is on facebook, not everyone *wants* to be on facebook, and to be honest, a facebook group kinda sucks for searching and archiving really important discussions.&lt;/p&gt;

&lt;p&gt;thus it has been requested that I copy all the posts and comments to Someplace Else, to make them available for more general consumption.&lt;/p&gt;

&lt;p&gt;At first I balked at this request - 24 posts and 250 comments to be individually copied/pasted??? Who has that kind of time?&lt;/p&gt;

&lt;p&gt;Of course when I actually sat down to think about the problem seriously, it took far less time than I though to solve it. So here's what I did, including the quick-and-dirty ruby script that will massage the facebook feed into something that resembles readable format. It aint pretty - but it'll pass for government work.&lt;/p&gt;

&lt;h3&gt;Step 1: get the feed from the API&lt;/h3&gt;

&lt;p&gt;I'll assume you are actually a member of the group that you're after. You will need to be.&lt;/p&gt;
&lt;p&gt;You need to go to your group and get the group's ID from the URL.
&lt;p&gt;The facebook API page is here: &lt;a href="https://developers.facebook.com/tools/explorer"&gt;Facebook Graph API explorer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;First you need to create an access token to get the data out of facebook. This is essentially the same as doing one of those "allow application to access my data" things that you click on when you add a new app.  In this stage, you need to allow the Graph-API application to access *your* group-data, to prove that you have access to he feed of the group - and to allow it to fetch out all the posts for you.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;click the "Get access token" button&lt;/li&gt;
&lt;li&gt;Select the "user_groups" checkbox&lt;/li&gt;
&lt;li&gt;click the new "get access token" button&lt;/li&gt;
&lt;li&gt;follow any prompts (if this is the first time using this API, you'll get the "allow access for this application" process - but it may not happen for subsequent attempts&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You should now have a long encoded token in the box at the top of the page.&lt;/p&gt;

&lt;p&gt;Next up we need to tell it what feed to use. There's a drop-down labelled "GET" which you should leave as-is. In the text-box next to that, type in the ID of the group in a URL-format like this: &lt;span class="code"&gt;/1234567890?fields=feed&lt;/span&gt; and then click "Submit". The "fields=feed" tells the API to actually go and fetch the feed of posts and comments.&lt;/p&gt;

&lt;p&gt;At this stage, you should be able to see a huge hash full of posts and comments in the box to the right hand side of the screen. Copy and paste that into a file.&lt;/p&gt;

&lt;h3&gt;Step 2: massage it into shape&lt;/h3&gt;

&lt;p&gt;Now you've got your feed data, you just need to play with it and spit it out into a nicer format. In our case, I decided to go for just a rough html format that showed what the posts were, what comments were attached, and who said what. My script is posted below - which can serve as a starting point for whatever you'd like to see done.&lt;/p&gt;

&lt;p&gt;This script accepts the input filename and an optional output filename (or it just jams '.html' on the end of the input filename). It'll generate a really rough-and-ready html file that contains the posts and comments (with names and datetimes) plus some of the links (if present).&lt;/p&gt;

&lt;p&gt;Enjoy...&lt;/p&gt;

&lt;hr /&gt;

&lt;pre class="code"&gt;
#!/usr/bin/env ruby

DATE_FORMAT = "%H:%M:%S %d-%m-%Y"

class Object
  def blank?
    self.nil? || (self.respond_to?(:empty?) &amp;amp;&amp;amp; self.empty?)
  end
  def present?
    !self.blank?
  end
end

new_file_name = nil

# if they've passed in the filename, use it
if ARGV &amp;amp;&amp;amp; ARGV.length &amp;gt;= 1
  file_name = ARGV[0]
  if ARGV.length &amp;gt; 2
    new_file_name = ARGV[1]
  end
end
if file_name.blank?
  p "usage: facebookfeed &amp;lt;file_name&amp;gt; [&amp;lt;outfile_name&amp;gt;]"
  exit(1)
end
p "got file_name of: #{file_name}"

unless File.exists?(file_name)
  p "file: #{file_name} does not exist"
  exit(1)
end

# munge up an html filename for the output file
new_file_name ||= file_name.split('.').first + '.html'


if File.exists?(new_file_name)
  p "output file: #{new_file_name} already exists, please supply another"
  p "usage: facebookfeed &amp;lt;file_name&amp;gt; [&amp;lt;outfile_name&amp;gt;]"
  exit(1)
end

# parse json in file into ruby - preferably a hash
require 'rubygems'
require 'json'
require 'date'
facebook_hash = JSON.parse(IO.read(file_name))

feed_data = facebook_hash["feed"]["data"]



if feed_data.present?
  File.open(new_file_name,'w') do |outfile|
    puts "parsing #{feed_data.count} posts"
    sum = 0
    feed_data.each {|post| sum += post["comments"]["count"].to_i }
    puts "with: #{sum} total comments"

    feed_name = feed_data.first["to"]["data"]["name"]

    # html headers go here
    outfile.puts "&amp;lt;html&amp;gt;"
    outfile.puts "&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;#{feed_name}&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;"
    outfile.puts "&amp;lt;body&amp;gt;"
    outfile.puts "&amp;lt;h1&amp;gt;#{feed_name}&amp;lt;/h1&amp;gt;"

    feed_data.each do |post|
      outfile.puts "&amp;lt;p&amp;gt;by &amp;lt;b&amp;gt;#{post["from"]["name"]}&amp;lt;/b&amp;gt; at: &amp;lt;b&amp;gt;#{DateTime.parse(post["created_time"]).strftime(DATE_FORMAT)}&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;"

      if post["picture"].present?
        outfile.puts "&amp;lt;div style=\"float:left;\"&amp;gt;&amp;lt;img src=\"#{post["picture"]}\" /&amp;gt;&amp;lt;/div&amp;gt;"
      end
      name_str = post["name"]
      name_str = "&amp;lt;a href=\"#{post["link"]}\"&amp;gt;#{name_str}&amp;lt;/a&amp;gt;" if post["link"].present?
      outfile.puts "&amp;lt;h2&amp;gt;#{name_str}&amp;lt;/h2&amp;gt;"

      message = post["message"]
      message.each do |para|
        outfile.puts "&amp;lt;p style=\"clear:both;\"&amp;gt;#{para}&amp;lt;/p&amp;gt;"
      end

      comments = post["comments"]

      if comments.present? &amp;amp;&amp;amp; comments["count"].present? &amp;amp;&amp;amp; comments["count"].to_i &amp;gt; 0
        outfile.puts "&amp;lt;h3&amp;gt;Comments&amp;lt;/h3&amp;gt;"
        outfile.puts "&amp;lt;dl&amp;gt;"

        comments["data"].each do |comment|
          outfile.puts "&amp;lt;dt&amp;gt;by &amp;lt;b&amp;gt;#{comment["from"]["name"]}&amp;lt;/b&amp;gt; at: &amp;lt;b&amp;gt;#{DateTime.parse(comment["created_time"]).strftime(DATE_FORMAT)}&amp;lt;/b&amp;gt;&amp;lt;/dt&amp;gt;"
          outfile.puts "&amp;lt;dd&amp;gt;#{comment["message"]}&amp;lt;/dd&amp;gt;"
        end
        outfile.puts "&amp;lt;/dl&amp;gt;"
      end #any comments present
      outfile.puts "&amp;lt;hr /&amp;gt;"
    end # each post

    # html footers go here
    outfile.puts "&amp;lt;/body&amp;gt;"
    outfile.puts "&amp;lt;/html&amp;gt;"
  end # with open outfile
end #feed data present

&lt;/pre&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=NP-Bp7Zagb4:_IXrGPxR7OM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=NP-Bp7Zagb4:_IXrGPxR7OM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=NP-Bp7Zagb4:_IXrGPxR7OM:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=NP-Bp7Zagb4:_IXrGPxR7OM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=NP-Bp7Zagb4:_IXrGPxR7OM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=NP-Bp7Zagb4:_IXrGPxR7OM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=NP-Bp7Zagb4:_IXrGPxR7OM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=NP-Bp7Zagb4:_IXrGPxR7OM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=NP-Bp7Zagb4:_IXrGPxR7OM:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/NP-Bp7Zagb4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/4593595790861385546/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=4593595790861385546" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/4593595790861385546?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/4593595790861385546?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/NP-Bp7Zagb4/quick-and-dirty-facebook-feed-parsing.html" title="Quick and dirty facebook feed parsing" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/02/quick-and-dirty-facebook-feed-parsing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8MQXw9eCp7ImA9WhBTEkQ.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-1508988802357963482</id><published>2013-02-08T14:08:00.000+11:00</published><updated>2013-02-08T14:08:00.260+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-08T14:08:00.260+11:00</app:edited><title>Link: What rails security means for your startup</title><content type="html">&lt;p&gt;If you hadn't already heard, Rails has a &lt;a href="http://rubyglasses.blogspot.com.au/2013/01/serious-rails-vulnerabillity-read-this.html"&gt;
security vulnerability&lt;/a&gt; that affects all versions of Rails. This one is about XML-parsing of YAML strings.&lt;/p&gt;

&lt;p&gt;This was followed by a second &lt;a href="https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/1h2DR63ViGo"&gt;vulnerability in the JSON parser&lt;/a&gt; - again of YAML-parsed code.&lt;/p&gt;

&lt;p&gt;So what does this all mean for all of us running Rails-based systems? Is this just a flash-in-the-pan issue that will fade away the moment it's out of the public eye? or is it a herald of the coming apocalypse?&lt;/p&gt;

&lt;p&gt; A really cogent overview of &lt;a href="http://www.kalzumeus.com/2013/01/31/what-the-rails-security-issue-means-for-your-startup/"&gt;what the rails security issue means for your startup&lt;/a&gt; has been written by &lt;a href="http://www.kalzumeus.com/author/kalzumeus/"&gt;Patrick&lt;/a&gt;, and I strongly recommend you read it, and pass it on.&lt;/p&gt;

&lt;p&gt;Amongst a number of useful overviews, it covers such things as "yeah, but we're not a high-profile site, nobody's going to attack us right?" and concludes that the worst may not yet be past, and that:&lt;/p&gt;
&lt;blockquote&gt;&lt;a href="http://www.kalzumeus.com/2013/01/31/what-the-rails-security-issue-means-for-your-startup/"&gt;You Should Be At Defcon 2 For Most Of February&lt;/blockquote&gt;&lt;/a&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=5OsOt_dlP0A:reYeAIUZJxo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=5OsOt_dlP0A:reYeAIUZJxo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=5OsOt_dlP0A:reYeAIUZJxo:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=5OsOt_dlP0A:reYeAIUZJxo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=5OsOt_dlP0A:reYeAIUZJxo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=5OsOt_dlP0A:reYeAIUZJxo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=5OsOt_dlP0A:reYeAIUZJxo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=5OsOt_dlP0A:reYeAIUZJxo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=5OsOt_dlP0A:reYeAIUZJxo:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/5OsOt_dlP0A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/1508988802357963482/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=1508988802357963482" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/1508988802357963482?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/1508988802357963482?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/5OsOt_dlP0A/link-what-rails-security-means-for-your.html" title="Link: What rails security means for your startup" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/02/link-what-rails-security-means-for-your.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UEQXc_eCp7ImA9WhNaF0s.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-5485952998752695479</id><published>2013-02-02T12:40:00.000+11:00</published><updated>2013-02-02T12:40:00.940+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-02T12:40:00.940+11:00</app:edited><title>Link: Help Vampires: A Spotter’s Guide</title><content type="html">&lt;p&gt;Here's a great post on the ubiquitous "Help Vampire" who drains the life out of helpful communities...&lt;/p&gt;
&lt;p&gt;&lt;a href="http://slash7.com/2006/12/22/vampires/"&gt;Help Vampires: A Spotter’s Guide&lt;/a&gt; gives tips on how to spot, avoid and reform them for the future benefit of humanity...&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=sZfbbjppvkQ:IGDwGVoCz5c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=sZfbbjppvkQ:IGDwGVoCz5c:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=sZfbbjppvkQ:IGDwGVoCz5c:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=sZfbbjppvkQ:IGDwGVoCz5c:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=sZfbbjppvkQ:IGDwGVoCz5c:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=sZfbbjppvkQ:IGDwGVoCz5c:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=sZfbbjppvkQ:IGDwGVoCz5c:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=sZfbbjppvkQ:IGDwGVoCz5c:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=sZfbbjppvkQ:IGDwGVoCz5c:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/sZfbbjppvkQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/5485952998752695479/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=5485952998752695479" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/5485952998752695479?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/5485952998752695479?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/sZfbbjppvkQ/link-help-vampires-spotters-guide.html" title="Link: Help Vampires: A Spotter’s Guide" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/02/link-help-vampires-spotters-guide.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08GQX05eip7ImA9WhNaEkg.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-2551014811671701125</id><published>2013-01-27T12:57:00.000+11:00</published><updated>2013-01-27T12:57:00.322+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-27T12:57:00.322+11:00</app:edited><title>XML-YAML-parsing security fix for older versions of rails</title><content type="html">&lt;p&gt;Earlier I mentioned the &lt;a href="http://rubyglasses.blogspot.com.au/2013/01/serious-rails-vulnerabillity-read-this.html"&gt;Serious Rails vulnerability&lt;/a&gt; that affects all versions of Rails for the last six years.&lt;/p&gt;

&lt;p&gt;A fix has been put into the latest versions of Rails 2 and 3. but it requires you to upgrade to the latest version.&lt;/p&gt;

&lt;p&gt;If you have an older version of rails and can't upgrade for various reasons (eg we are still stuck on v 2.3.2 due to some legacy code), there's a better fix for the *link* xml parsing error than the workarounds on offer (which tend to switch off your ability to parse XML).&lt;/p&gt;

&lt;p&gt;The fix that we've done requires that you use bundler, though you could equally-well freeze rails into vendor/gems and make the same patch there. We chose the bundler/github approach because it reduces the size of our repository.&lt;/p&gt;

&lt;h3&gt;Step 1: fork a copy of rails for yourself&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; fork rails &lt;/li&gt;
&lt;li&gt; git clone it into a local directory. &lt;/li&gt;
&lt;li&gt; checkout the *tag* that corresponds with the version you are on (eg for us: v2.3.2.1) - you can see what tags there are by running: "git tag -l"&lt;/li&gt;
&lt;li&gt;Don't worry about the big scary message it gives you about a detached HEAD - that just means you've got a specific commit checked out instead of  a branch. &lt;/li&gt;
&lt;li&gt; create a branch for yourself eg for us: git branch v2.3.2_xmlfixes &lt;/li&gt;
&lt;li&gt; checkout that branch eg git checkout v2.3.2_xmlfixes &lt;/li&gt;
&lt;li&gt; push that to your repo on github with eg: git push -u origin v2.3.2_xmlfixes &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now you have a forked copy of the rails repo with a branch at the rails-version you are using that you can refer to in your Gemfile.&lt;/p&gt;

&lt;h3&gt;Step 2: actually apply the patch...&lt;/h3&gt;

&lt;p&gt;cherry-pick &lt;a href="https://github.com/rails/rails/commit/70adb9613e4a40c5645c99da374639c41012e4fc"&gt;this commit&lt;/a&gt; (which if you look at github is is the one from v 2.3.15 that fixes this very error). Using:&lt;/p&gt;

&lt;pre class="code"&gt;
git cherry-pick 70adb9613e4a40c5645c99da37
&lt;/pre&gt;

&lt;p&gt;Note: You are likely to get conflicts with the CHANGELOG - you can keep them or just throw them away as you wish (it's just the changelog which describes the latest changes).&lt;/p&gt;


&lt;p&gt;commit and push to your repository.&lt;/p&gt;

&lt;p&gt;Now you have a patched version of rails in your git repository.&lt;/p&gt;


&lt;h3&gt;Step 3: update your Gemfile&lt;/h3&gt;

&lt;p&gt;Your Gemfile is likely to have a line that includes rails such as:&lt;/p&gt;

&lt;pre class="code"&gt;
gem 'rails', '2.3.2'
&lt;/pre&gt;

&lt;p&gt;You need to update that line to point at *your* git repository and your new branch.&lt;/p&gt;

&lt;p&gt;The following *should* Just Work:&lt;/p&gt;

&lt;pre class="code"&gt;
gem 'rails', '2.3.2', :branch =&amp;gt; "v2.3.2_xmlfixes", 
:git =&amp;gtl 'git://github.com/&amp;lt;your_git_repo&amp;gt;/rails.git'
&lt;/pre&gt;

&lt;p&gt;To find the git url, you can go to your forked copy of git, look near the top of the page where it has a text-box with a git-link. Make sure you click on the "Git Read-only" button, and copy what's in the box on the right. &lt;/p&gt;

&lt;p&gt;The branch to use is whatever you named your branch in step 5 above.&lt;/p&gt;

&lt;p&gt;You should now be able to run &lt;span class="code"&gt;bundle install&lt;/span&gt; to regenerate your copy of rails - and it will pull the details from your forked-and-patched copy&lt;/p&gt;


&lt;h2&gt;Troubleshooting&lt;/h2&gt;

&lt;p&gt;Unfortunately, when I used the above, it bundled correctly, but any attempt to spin up the server just caused the following error:&lt;/p&gt;

&lt;pre class="code"&gt;
./script/../config/boot.rb:61:in `require': no such file to load -- initializer (LoadError)
 from ./script/../config/boot.rb:61:in `load_initializer'
 from ./script/../config/boot.rb:117:in `run'
 from ./script/../config/boot.rb:17:in `boot!'
 from ./script/../config/boot.rb:130
 from script/server:2:in `require'
 from script/server:2
&lt;/pre&gt;

&lt;p&gt;Luckily the answer is in the &lt;a href="http://stackoverflow.com"&gt;StackOverflow&lt;/a&gt; question: &lt;a href="http://stackoverflow.com/questions/4043089/how-to-use-a-branch-in-a-fork-of-rails-in-a-project-with-bundler"&gt;how to use a branch in a fork of rails in a project with bundler&lt;/a&gt;.&lt;p&gt;

&lt;p&gt;First, you need to add .gemspec files into your patched copy of rails. 
If you're forking 2.3.10, you can copy the gemspec files from the commit &lt;a href="https://github.com/traveliq/rails/commit/46d9042c9125abbbedfc672f8523d81210f4f320"&gt;Adding .gemspec files for all gems in the 2-3-stable version of rails&lt;/a&gt; created by the author of the above stackoverflow issue.&lt;/p&gt;

&lt;p&gt;Otherwise you'll need ones correct for your own version. The commit above talks about generating them from the associated Rakefiles. I created them by copying the gemspec files listed in the commit above, and then just copying over the &lt;span class="code"&gt;spec = Gem::Specification&lt;/span&gt; block with the equivalent block that is in the Rakefiles.&lt;/p&gt;

&lt;p&gt;eg for &lt;span class="code"&gt;actionpack.gemspec&lt;/span&gt;, I copied the &lt;span class="code"&gt;actionpack.gemspec&lt;/span&gt; from the commit into the &lt;span class="code"&gt;rails/actionpack&lt;/span&gt; directory in my forked copy of rails. Then I opened up &lt;span class="code"&gt;rails/actionpack/Rakefile&lt;/span&gt; and copied the whole block of code that begins with &lt;span class="code"&gt;spec = Gem::Specification&lt;/span&gt; into the &lt;span class="code"&gt;actionpack.gemspec&lt;/span&gt; file, deleting the previous block from that file first.&lt;/p&gt;

&lt;p&gt;You will know if you got the gem-dependencies wrong if you get an error like the following:&lt;/p&gt;

&lt;pre class="code"&gt;
Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
    actionpack (&amp;gt;= 0) ruby depends on
      activesupport (= 2.3.10) ruby

    activesupport (2.3.2)
&lt;/pre&gt;



&lt;p&gt;Now you have generated the gemspecs, add them to your forked copy of Rails, commit them and push the commit to your github repo.&lt;/p&gt;

&lt;p&gt;Then you can put the following in your Gemfile:&lt;/p&gt;

&lt;pre class="code"&gt;
:git =&amp;gt; 'git://github.com/&amp;lt;your_git_repo&amp;gt;/rails.git', :branch =&amp;gt; "v2.3.2_xmlfixes" do
  # Note: load-order is essential for dependencies
  gem 'activesupport',  :branch =&amp;gt; "v2.3.2_xmlfixes" # this must go first
  gem 'actionpack',     :branch =&amp;gt; "v2.3.2_xmlfixes" # this must go second
  gem 'actionmailer',   :branch =&amp;gt; "v2.3.2_xmlfixes"
  gem 'activerecord',   :branch =&amp;gt; "v2.3.2_xmlfixes"
  gem 'activeresource', :branch =&amp;gt; "v2.3.2_xmlfixes"
  gem 'rails',          :branch =&amp;gt; "v2.3.2_xmlfixes" # this must go last
end 
&lt;/pre&gt;

&lt;p&gt;Note: make sure the gems are in the order above, with rails last - otherwise you'll get something like:&lt;/p&gt;

&lt;pre class="code"&gt;
Could not find gem 'activesupport (= 2.3.10) ruby', 
   which is required by gem 'activerecord (&amp;gt;= 0) ruby', in any of the sources.
&lt;/pre&gt;

&lt;p&gt;Also note: you *must* explicitly set the branch on the git-repo line and *also8 on all the gem-lines (and they must match) otherwise &lt;span class="code"&gt;bundle install&lt;/span&gt; will work fine, but if you try anything else you'll get the infuriating error:&lt;/p&gt;

&lt;pre class="code"&gt;
git://github.com/&amp;lt;your_git_repo&amp;gt;/rails.git (at v2.3.2_xmlfixes) is not checked out. Please run `bundle install`
&lt;/pre&gt;

&lt;h2&gt;Finally&lt;/h2&gt;

&lt;p&gt;you should now be able to run &lt;span class="code"&gt;bundle update&lt;/span&gt; and 
&lt;span class="code"&gt;bundle install&lt;/span&gt; and it should now work.&lt;/p&gt;

&lt;p&gt;This has been tricky to explain, and the steps are complex - if something's not clear, let me know and I'll try and make it more plain.&lt;/p&gt; &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=64sVYju44M0:R-vPRwt6efE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=64sVYju44M0:R-vPRwt6efE:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=64sVYju44M0:R-vPRwt6efE:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=64sVYju44M0:R-vPRwt6efE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=64sVYju44M0:R-vPRwt6efE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=64sVYju44M0:R-vPRwt6efE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=64sVYju44M0:R-vPRwt6efE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=64sVYju44M0:R-vPRwt6efE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=64sVYju44M0:R-vPRwt6efE:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/64sVYju44M0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/2551014811671701125/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=2551014811671701125" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/2551014811671701125?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/2551014811671701125?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/64sVYju44M0/xml-yaml-parsing-security-fix-for-older.html" title="XML-YAML-parsing security fix for older versions of rails" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>3</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/01/xml-yaml-parsing-security-fix-for-older.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYMQXw6fCp7ImA9WhNbF08.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-646999657948327735</id><published>2013-01-21T10:23:00.000+11:00</published><updated>2013-01-21T10:23:00.214+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-21T10:23:00.214+11:00</app:edited><title>Link: DHH - testing like the TSA</title><content type="html">&lt;p&gt;Learning how to test is an important skill, learning what *not* to test is also an important skill. DHH shares his thoughts on this subject, with a brief article: &lt;a href="http://37signals.com/svn/posts/3159-testing-like-the-tsa"&gt;Testing like the TSA&lt;/a&gt; which cuts through the "security theatre" aspect that can sometimes begin to surround our testing efforts.&lt;/p&gt;

&lt;p&gt;There's also a long discussion on Y-combinator about the article here &lt;a href="http://news.ycombinator.com/item?id=3828470"&gt;Hacker News: Testing like the TSA&lt;/a&gt;&lt;/p&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=GJKtJa1Wmsw:AXXBDri-30I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=GJKtJa1Wmsw:AXXBDri-30I:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=GJKtJa1Wmsw:AXXBDri-30I:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=GJKtJa1Wmsw:AXXBDri-30I:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=GJKtJa1Wmsw:AXXBDri-30I:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=GJKtJa1Wmsw:AXXBDri-30I:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=GJKtJa1Wmsw:AXXBDri-30I:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=GJKtJa1Wmsw:AXXBDri-30I:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=GJKtJa1Wmsw:AXXBDri-30I:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/GJKtJa1Wmsw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/646999657948327735/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=646999657948327735" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/646999657948327735?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/646999657948327735?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/GJKtJa1Wmsw/link-dhh-testing-like-tsa.html" title="Link: DHH - testing like the TSA" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/01/link-dhh-testing-like-tsa.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcMQX84cCp7ImA9WhNbEkw.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-7759051820283464536</id><published>2013-01-15T13:48:00.000+11:00</published><updated>2013-01-15T13:48:00.138+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-15T13:48:00.138+11:00</app:edited><title>Link: Why 2012 was the best year ever</title><content type="html">&lt;p&gt;So many people are on the doom-and-gloom bus - so much so that it blinds them to the spectacular, amazing things happening in the world today. New things are being created and built, and medicine is practically screaming along.&lt;/p&gt;

&lt;p&gt;Not that this stops the doom-sayers who claim, darkly that it all comes at a heavy price, that the advances of the first world are killing the rest of the world, and that poverty and death are on the rise...&lt;/p&gt;

&lt;p&gt;Well, pooh to that. Here's an article that explains that actually, the world is improving at a rapid pace, including all of the usual favourite doom-and-gloom topics:
&lt;a href="http://www.spectator.co.uk/the-week/leading-article/8789981/glad-tidings/"&gt;Why 2012 was the best year ever&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Read that before you try and tell me we "shouldn't bring children into this world" or that the world isn't as good as it was back when...&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=jMZ9Dcnvw2Y:RfAxVAAXbjs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=jMZ9Dcnvw2Y:RfAxVAAXbjs:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=jMZ9Dcnvw2Y:RfAxVAAXbjs:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=jMZ9Dcnvw2Y:RfAxVAAXbjs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=jMZ9Dcnvw2Y:RfAxVAAXbjs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=jMZ9Dcnvw2Y:RfAxVAAXbjs:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=jMZ9Dcnvw2Y:RfAxVAAXbjs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=jMZ9Dcnvw2Y:RfAxVAAXbjs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=jMZ9Dcnvw2Y:RfAxVAAXbjs:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/jMZ9Dcnvw2Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/7759051820283464536/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=7759051820283464536" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/7759051820283464536?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/7759051820283464536?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/jMZ9Dcnvw2Y/link-why-2012-was-best-year-ever.html" title="Link: Why 2012 was the best year ever" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/01/link-why-2012-was-best-year-ever.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYBQnk4fyp7ImA9WhNaGUk.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-402023889409121434</id><published>2013-01-09T11:16:00.001+11:00</published><updated>2013-02-04T13:49:13.737+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-04T13:49:13.737+11:00</app:edited><title>Serious rails vulnerability - read this!</title><content type="html">&lt;p&gt;A serious vulnerability in *all* versions of rails (for the last six years) has been spotted.&lt;/p&gt;

&lt;p&gt;In brief: complex xml-style params go through an XML-parser that will interpret based on types. "yaml" is a valid type, and that loads the YAML-parser... which instantiates any embedded classes that can include arbitrary code - leading to all kinds of injection-attack possibilities.&lt;/p&gt;

&lt;p&gt;A general discussion of the problem, including patched versions and workarounds for old versions is available here: &lt;a href="https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion"&gt;Multiple vulnerabilities in parameter parsing in Action Pack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A more in-depth look at what the problem entails is available here: &lt;a href="http://www.insinuator.net/2013/01/rails-yaml/"&gt;Analysis of Rails XML Parameter Parsing Vulnerability&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=XUibGX3VJl4:jXA9JmaZWEc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=XUibGX3VJl4:jXA9JmaZWEc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=XUibGX3VJl4:jXA9JmaZWEc:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=XUibGX3VJl4:jXA9JmaZWEc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=XUibGX3VJl4:jXA9JmaZWEc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=XUibGX3VJl4:jXA9JmaZWEc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=XUibGX3VJl4:jXA9JmaZWEc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=XUibGX3VJl4:jXA9JmaZWEc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=XUibGX3VJl4:jXA9JmaZWEc:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/XUibGX3VJl4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/402023889409121434/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=402023889409121434" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/402023889409121434?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/402023889409121434?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/XUibGX3VJl4/serious-rails-vulnerabillity-read-this.html" title="Serious rails vulnerability - read this!" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2013/01/serious-rails-vulnerabillity-read-this.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUERnwycCp7ImA9WhNXF0o.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-1182919911816175446</id><published>2012-12-06T18:00:00.000+11:00</published><updated>2012-12-06T18:00:07.298+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-06T18:00:07.298+11:00</app:edited><title>Link: Everything you need to know about the National Broadband Network</title><content type="html">&lt;p&gt;Hi all, this one is aimed at other Australians. Since it was first announced in 2009, there's been a lot of rumbling about the National Broadband Network plan - what it actually is, whether it's worth it, what it actually means for us or for the Australian budget etc etc&lt;/p&gt;
&lt;p&gt;This link provides an article that fully explains what it's all about and is well worth a read.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.techradar.com/news/internet/the-nbn-everything-you-need-to-know-1112427"&gt;The NBN: everything you need to know&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;TL;DR: it's a plan to replace the antiquated Telstra copper-network with high speed fibre (preferably to-the-home) so that we can keep up with the massive influx of bandwidth we're all using these days just like all the other high-tech countries did ages ago... and yes, it's worth it.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=k35en6iaoF4:gfoVJvfGVC4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=k35en6iaoF4:gfoVJvfGVC4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=k35en6iaoF4:gfoVJvfGVC4:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=k35en6iaoF4:gfoVJvfGVC4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=k35en6iaoF4:gfoVJvfGVC4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=k35en6iaoF4:gfoVJvfGVC4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=k35en6iaoF4:gfoVJvfGVC4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=k35en6iaoF4:gfoVJvfGVC4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=k35en6iaoF4:gfoVJvfGVC4:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/k35en6iaoF4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/1182919911816175446/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=1182919911816175446" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/1182919911816175446?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/1182919911816175446?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/k35en6iaoF4/link-everything-you-need-to-know-about.html" title="Link: Everything you need to know about the National Broadband Network" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/12/link-everything-you-need-to-know-about.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUGQXo5eip7ImA9WhNXEkg.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-3394887278504699370</id><published>2012-11-30T17:17:00.000+11:00</published><updated>2012-11-30T17:17:00.422+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-30T17:17:00.422+11:00</app:edited><title>Link: Why engineers are grumpy</title><content type="html">&lt;p&gt;There have been many great articles on how to deal with IT-folks. This is another of them: &lt;a href="http://www.nczonline.net/blog/2012/06/12/the-care-and-feeding-of-software-engineers-or-why-engineers-are-grumpy/"&gt;The care and feeding of software engineers (or, why engineers are grumpy)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It explains: what makes engineers tick, what makes them grumpy and why, and also solutions to make it all Just Work. It covers both the strengths and weaknesses of engineers, and how to build on the former, while avoiding the latter.&lt;/p&gt;

&lt;p&gt;I'll leave you with a few quotes:&lt;/p&gt;

&lt;blockquote&gt;In almost every other industry where things are built, it is expected that all requirements and details are agreed upon and finalized before building commences. Except in software. In software there’s “not enough time” to gather all the requirements ahead of time. The importance of moving quickly is hammered into us from day one. And so engineers learn to fill in the gaps left by product managers just to keep the project going. Product managers, of course, also have the reputation for changing their minds frequently, which means engineers assumptions are often invalidated partway through the process.

Is it any wonder that software engineers tend to burn out quickly and change jobs frequently?&lt;/blockquote&gt;

&lt;blockquote&gt;True priorities aren’t transient, they are static. The frequency with which people above us change their minds is incredibly frustrating for software engineers. We frequently stand ready to march into battle and just want a direction to march in. But if you tell us one day that we’re building a house and the next day that we’re building a car, you should expect some dissension in the ranks.&lt;/blockquote&gt;

&lt;blockquote&gt;There are few phrases that anger software engineers more than, “I used to code.” ... If I were to ask LeBron James how much time he needs to prepare for a game, I’m sure he’d be amused if I disagreed because I played basketball in high school. Software engineers get the equivalent all the time. &lt;/blockquote&gt;

&lt;blockquote&gt;We software engineers are an interesting bunch. There’s a definite personality that comes along with us, and we really do want to make the best thing possible. If you stop treating us like short-order cooks and start treating us like part of the creative process, you are likely to get much farther, faster than you would otherwise. The teams on which I’ve worked have all had varying degrees of friction caused by not understanding the engineers’ mindset and what drives them. It’s my sincere hope that this article will lead to better communication between engineers and those that they work with. It’s really not that hard. We’re all just people who want to feel like a part of the solution rather than a worker bee.&lt;/blockquote&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Sm6iiE9RS7k:efDB6vSgWJg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Sm6iiE9RS7k:efDB6vSgWJg:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Sm6iiE9RS7k:efDB6vSgWJg:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Sm6iiE9RS7k:efDB6vSgWJg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=Sm6iiE9RS7k:efDB6vSgWJg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Sm6iiE9RS7k:efDB6vSgWJg:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Sm6iiE9RS7k:efDB6vSgWJg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=Sm6iiE9RS7k:efDB6vSgWJg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Sm6iiE9RS7k:efDB6vSgWJg:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/Sm6iiE9RS7k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/3394887278504699370/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=3394887278504699370" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/3394887278504699370?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/3394887278504699370?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/Sm6iiE9RS7k/link-why-engineers-are-grumpy.html" title="Link: Why engineers are grumpy" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/11/link-why-engineers-are-grumpy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8MQH4yeCp7ImA9WhNXEEU.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-2286940558030038116</id><published>2012-11-24T15:25:00.000+11:00</published><updated>2012-11-28T17:24:41.090+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-28T17:24:41.090+11:00</app:edited><title>Deleting un-named foreign keys in a migration</title><content type="html">&lt;p&gt;So, we use foreign-key constraints in our db. It's pretty annoying to get Rails to work nicely with that, but we have some basic helper methods (which I didn't write, so I cant share).&lt;/p&gt;

&lt;p&gt;However I recently had some trouble dropping an old table. I kept getting these errors:&lt;/p&gt;

&lt;pre class="code"&gt;
Mysql::Error: Error on rename of './mydbname/#sql-1ca8_f7842' to 
   './mydbname/my_table_name' (errno: 150): DROP INDEX `my_table_name_idx3` 
   ON my_table_name
&lt;/pre&gt;


&lt;p&gt;I discovered that this was because it had foreign-key constraints. The awful error message is itself listed as a bug on mysql... but the real problem is that it doesn't want to drop an index I've asked it - because there's a foreign-key constraint on the column referenced by that index&lt;a href="#other_failure_mode"&gt;*&lt;/a&gt;.&lt;/p&gt;



&lt;p&gt;Fair enough.&lt;/p&gt;

&lt;p&gt;Unfortunately, the "remove_foreign_key" code we have assumes the foreign-key has been named in a certain way (&lt;span class="code"&gt;table_name_column_name&lt;/span&gt;) but in this case it wasn't. So Trying a drop index on that caused it to give an equally unhelpful message along the same lines...&lt;/p&gt;


&lt;p&gt;This foreign key has been hanging around since the dawn-o-time, and it has one of those automagically-generated constraint-names built by the db itself... something like: &lt;span class="code"&gt;my_table_name_ibfk_16&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;Now that'd be fine to drop if we just had one client. with one database... you can easily put the following into a migration:&lt;/p&gt;

&lt;pre class="code"&gt;
   execute "ALTER TABLE `my_table_name` DROP FOREIGN KEY `my_table_name_ibfk_16`" 
&lt;/pre&gt;


&lt;p&gt;Unfortunately for us, we have 150 clients - each with their own db... and it looks like that constraint-name differs depending on which order the foreign-keys got created. ie sometimes it's &lt;span class="code"&gt;my_table_name_ibfk_16&lt;/span&gt; and sometimes it's &lt;span class="code"&gt;my_table_name_ibfk_3&lt;/span&gt; - and if you drop it by number - you could be killing the WRONG foreign-key constraint... which would just be embarrassing.&lt;/p&gt;

&lt;p&gt;The way out of this quandary is to query the information_schema table to find the foreign-key's actual constraint-name. and here it is for your amusement. (note: put this into initializers eg by saving it as &lt;span class="code"&gt;config/initializers/migrations.rb&lt;/span&gt;&lt;/p&gt;

&lt;pre class="code"&gt;
class ActiveRecord::Migration
  # grab the db-name out of the connection and persist it
  # it's not going to change over the course of a single migration
  def self.fetch_database_name
    @@database_name ||= connection.database_name
  end

  # Use this if the foreign-key was created without an explicit name - 
  # and has one of the automatically-generated constraint-names.
  #
  # This method queries the information-schema table to fetch out the key
  # name before continuing to drop the foreign-key
  #
  # Use this in your migrations with:
  #    remove_legacy_foreign_key :table_name, :field_name
  # eg:
  #    remove_legacy_foreign_key :widgets, :wodget_id
  def self.remove_legacy_foreign_key(table, column_name)
    # first pull the foreign-key name from the information schema
    result = execute "select constraint_name from information_schema.key_column_usage as ke where ke.table_schema = '#{fetch_database_name}' and ke.table_name = '#{table}' and ke.column_name = '#{column_name}';"
    name = result.fetch_hash['constraint_name']
    raise "Got no foreign key by that name" unless name.present?
    execute "ALTER TABLE `#{table}` DROP FOREIGN KEY `#{name}`"
  end
end
&lt;/pre&gt;


&lt;hr /&gt;

&lt;p&gt;&lt;a name="other_failure_mode"&gt;[*]&lt;/a&gt; Note: mysql also gives a similar error if you're dropping a foreign-key constraint that doesn't exist at all by the name you give it:&lt;/p&gt;

&lt;pre class="code"&gt;
ERROR 1025 (HY000): Error on rename of './mydbname/my_table_name' to 
   './mydbname/#sql2-1ca8-f6cc5' (errno: 152)
&lt;/pre&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=peuHwrzh4ZQ:ncjPq-yMC4Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=peuHwrzh4ZQ:ncjPq-yMC4Y:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=peuHwrzh4ZQ:ncjPq-yMC4Y:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=peuHwrzh4ZQ:ncjPq-yMC4Y:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=peuHwrzh4ZQ:ncjPq-yMC4Y:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=peuHwrzh4ZQ:ncjPq-yMC4Y:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=peuHwrzh4ZQ:ncjPq-yMC4Y:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=peuHwrzh4ZQ:ncjPq-yMC4Y:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=peuHwrzh4ZQ:ncjPq-yMC4Y:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/peuHwrzh4ZQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/2286940558030038116/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=2286940558030038116" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/2286940558030038116?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/2286940558030038116?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/peuHwrzh4ZQ/deleting-un-named-foreign-keys-in.html" title="Deleting un-named foreign keys in a migration" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>1</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/11/deleting-un-named-foreign-keys-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4MQng7fyp7ImA9WhNQEUw.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-2260859210499078206</id><published>2012-11-17T11:59:00.001+11:00</published><updated>2012-11-17T11:59:43.607+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-17T11:59:43.607+11:00</app:edited><title>Kiva is addictive</title><content type="html">&lt;p&gt;No IT angle today...&lt;/p&gt;
&lt;p&gt;I have a mixed approach to giving to charity. I have a number of regular direct debits for various causes, and I also give sporadically in lump sums when inspiration strikes me.&lt;/p&gt;
&lt;p&gt;My latest of these is Kiva (here's a &lt;a href="http://www.kiva.org/invitedby/taryneast"&gt;Kiva invite&lt;/a&gt;) - which is a site that does micro-loans to people in developing countries.&lt;/p&gt;
&lt;p&gt;Kiva has been on my radar for a while now, but I'd been putting it off because I had a few misconceptions about the whole process and I finally got down and actually did some reading on what it's all about.&lt;/p&gt;
&lt;p&gt;I was mainly concerned by the fact that in most cases, the loans have already been given out, and you are paying for something that is already a fait accompli - which I thought was weird, and that it meant that you weren't really lending the money to the people you had chosen.&lt;/p&gt;
&lt;p&gt;Turns out to make a bit more sense. These people need loans immediately, so the partner in that country does so, and then posts the loan up to Kiva. When you choose to "fund" that loan, your money then underwrites it. You are taking on the risk for the loan.&lt;/p&gt;
&lt;p&gt;Now I've had it explained, it makes sense to me, so I've been having fun donating... it's a bit more addictive than I expected. I've already made five loans in as many countries, three of which have now been fully funded - one of which I was the final person that funded it (and that feels pretty good). We'll see how they go.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Bp_SyOeLjLI:Y55z9J_-fV0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Bp_SyOeLjLI:Y55z9J_-fV0:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Bp_SyOeLjLI:Y55z9J_-fV0:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Bp_SyOeLjLI:Y55z9J_-fV0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=Bp_SyOeLjLI:Y55z9J_-fV0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Bp_SyOeLjLI:Y55z9J_-fV0:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Bp_SyOeLjLI:Y55z9J_-fV0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=Bp_SyOeLjLI:Y55z9J_-fV0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=Bp_SyOeLjLI:Y55z9J_-fV0:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/Bp_SyOeLjLI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/2260859210499078206/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=2260859210499078206" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/2260859210499078206?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/2260859210499078206?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/Bp_SyOeLjLI/kiva-is-addictive.html" title="Kiva is addictive" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/11/kiva-is-addictive.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYCQX8yfSp7ImA9WhNRE04.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-173380499070990602</id><published>2012-11-08T10:16:00.000+11:00</published><updated>2012-11-08T10:16:00.195+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-08T10:16:00.195+11:00</app:edited><title>Link: Unit tests don't find bugs</title><content type="html">&lt;p&gt;A quick article called &lt;a href="http://java.dzone.com/articles/unit-tests-dont-find-bugs"&gt;unit tests don't find bugs&lt;/a&gt; points out what unit tests are really for, and advises us not to forget that unit tests cannot be used as a substitute for QA-style testing.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=WHN8I8E5jtU:BY2rdZYjnLU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=WHN8I8E5jtU:BY2rdZYjnLU:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=WHN8I8E5jtU:BY2rdZYjnLU:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=WHN8I8E5jtU:BY2rdZYjnLU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=WHN8I8E5jtU:BY2rdZYjnLU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=WHN8I8E5jtU:BY2rdZYjnLU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=WHN8I8E5jtU:BY2rdZYjnLU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=WHN8I8E5jtU:BY2rdZYjnLU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=WHN8I8E5jtU:BY2rdZYjnLU:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/WHN8I8E5jtU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/173380499070990602/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=173380499070990602" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/173380499070990602?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/173380499070990602?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/WHN8I8E5jtU/link-unit-tests-dont-find-bugs.html" title="Link: Unit tests don't find bugs" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/11/link-unit-tests-dont-find-bugs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMCQX8_cSp7ImA9WhNSGEw.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-1686769709712021697</id><published>2012-11-02T11:51:00.000+11:00</published><updated>2012-11-02T11:51:00.149+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-02T11:51:00.149+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="gotchas" /><title>ruby gotcha: beware trailing commas</title><content type="html">&lt;p&gt;I had something like the following (though with more values):&lt;/p&gt;

&lt;pre class="code"&gt;
 h = OrderedHash.new()
 h[:a] = {:a =&amp;gt; 1}
 h[:b] = {:b =&amp;gt; 2}, # note the trailing comma - oops
 h[:c] = {:c =&amp;gt; 3}
&lt;/pre&gt;

&lt;p&gt;and started getting errors telling me that h[:b] was an array, when I was expecting it to be a hash...&lt;/p&gt;

&lt;p&gt;Here's what's actually happening (via irb):&lt;/p&gt;

&lt;pre class="code"&gt;
&amp;gt;&amp;gt; a = {:a =&amp;gt; 1}
=&amp;gt; {:a=&amp;gt;1}
&amp;gt;&amp;gt; b = {:b =&amp;gt; 2},
?&amp;gt; c = {:c =&amp;gt; 3}         # still part of the previous statement
=&amp;gt; [{:a=&amp;gt;1}, {:c=&amp;gt;3}] # so we end up with an array
&lt;/pre&gt;

&lt;p&gt;Note to self: beware trailing commas&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=FESUrPWP74I:lMrTWqRZEqc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=FESUrPWP74I:lMrTWqRZEqc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=FESUrPWP74I:lMrTWqRZEqc:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=FESUrPWP74I:lMrTWqRZEqc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=FESUrPWP74I:lMrTWqRZEqc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=FESUrPWP74I:lMrTWqRZEqc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=FESUrPWP74I:lMrTWqRZEqc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=FESUrPWP74I:lMrTWqRZEqc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=FESUrPWP74I:lMrTWqRZEqc:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/FESUrPWP74I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/1686769709712021697/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=1686769709712021697" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/1686769709712021697?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/1686769709712021697?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/FESUrPWP74I/ruby-gotcha-beware-trailing-commas.html" title="ruby gotcha: beware trailing commas" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/11/ruby-gotcha-beware-trailing-commas.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YAQXw5eip7ImA9WhNSEkQ.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-5263228607383003184</id><published>2012-10-27T09:39:00.000+11:00</published><updated>2012-10-27T09:39:00.222+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-27T09:39:00.222+11:00</app:edited><title>[SOLVED] undefined method `name' for "Ascii85":String</title><content type="html">&lt;p&gt;So, we're still using Rails 2.3.2 for our client... but I'm *trying* to upgrade it piece by piece. In doing so, I recently had to upgrade rubygems, so that it would work with a recent version of a gem we desperately needed.&lt;/p&gt;

&lt;p&gt;Unfortunately it led to the  &lt;a href="http://rubyforge.org/tracker/index.php?func=detail&amp;aid=29188&amp;group_id=126&amp;atid=575"&gt;undefined method `name' for "Ascii85":String&lt;/a&gt; bug that I wrote about when I last tried to &lt;a href="http://www.blogger.com/blogger.g?blogID=1502761093196431512#editor/target=post;postID=5493920131039895057"&gt;upgrade rubygems&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back when it broke rubygems the first time, the only solution seemed to be to downgrade rubygems and hope for a future time when I could upgrade everything and get it working again.&lt;/p&gt;

&lt;p&gt;But that wasn't an option this time... and so I had to hack up a solution.&lt;/p&gt;

&lt;p&gt;The problem is described below in solution 2, but it's basically a problem with rails - which isn't using the newer rubygems gem-comparing "==" function properly any more.&lt;/p&gt;



&lt;h3&gt;Solution 1: Gem bundler&lt;/h3&gt;

&lt;p&gt;One solution that definitely works is to upgrade to using &lt;a href="http://gembundler.com/"&gt;gem bundler&lt;/a&gt; (or the &lt;a href="http://gembundler.com/rails23.html"&gt;Rails2.3 version of bundler&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;This definitely works because bundler doesn't have the same bug in it that Rails 2 has - it uses gem-comparison the new way.&lt;/p&gt;

&lt;p&gt;But some of our clients aren't on the bundled release yet, and I need to quickly fix bugs and push to those clients... so I needed a solution that would let me still load the bundler-free version without having to downgrade rubygems to do it.&lt;/p&gt;



&lt;h3&gt;Solution 2: Fix rails&lt;/h3&gt;


&lt;p&gt;This solution requires a (very small) hack on Rails... but I figured that was ok as it was just to get my own system working so I can fix things without having to go through the pain of installing rvm (which I don't have time for right now).&lt;/p&gt;

&lt;p&gt;So far the fix seems to be working, so I'll share (with the caveat that it's not well tested yet so YMMV).&lt;/p&gt;

&lt;p&gt;The problem is really a Rails bug... not rubygems. So that's where you can safely hack (for now). From the stacktrace of the bug, find the copy of "rails/gem_dependency.rb" that is causing the issue:&lt;/p&gt;

&lt;pre class="code"&gt;
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/gem_dependency.rb:239:in `==': 
undefined method `name' for "Ascii85":String (NoMethodError)
 from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:218:in `==='
&lt;/pre&gt;

&lt;p&gt;In my case, I opened &lt;span class="code"&gt;/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/gem_dependency.rb&lt;/span&gt; in a text editor (with sudo permissions). It'll have something like the following:&lt;/p&gt;

&lt;pre class="code"&gt;
    def ==(other)
      self.name == other.name &amp;&amp; self.requirement == other.requirement
    end
&lt;/pre&gt;

&lt;p&gt;The actual problem occurs because Rails is sometimes passing the name already as a string to this function, instead of an actual spec. So to fix it, we just check for that with the following code:&lt;/p&gt;

&lt;pre class="code"&gt;
    def ==(other)
      # The following line has been inserted to get around the bug:
      # "undefined method `name' for "Ascii85":String (NoMethodError)"
      return self.name == other if other.is_a?(String) # bugfix
      self.name == other.name &amp;&amp; self.requirement == other.requirement
    end
&lt;/pre&gt;

&lt;p&gt;It shouldn't alter existing functionality, it'll just get past the broken code that is in rails until you can upgrade rails, or use bundler.&lt;/p&gt;

&lt;p&gt;If you (horror) actually need to install this fix on a live system; I'd recommend freezing rails to your gems directory before applying the fix. But in reality, I'd actually recommend just finding a way to upgrade to using bundler. It's a neater solution that won't require ongoing maintenance.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=LJKF14YcuN0:xXQzRarUi-M:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=LJKF14YcuN0:xXQzRarUi-M:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=LJKF14YcuN0:xXQzRarUi-M:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=LJKF14YcuN0:xXQzRarUi-M:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=LJKF14YcuN0:xXQzRarUi-M:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=LJKF14YcuN0:xXQzRarUi-M:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=LJKF14YcuN0:xXQzRarUi-M:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=LJKF14YcuN0:xXQzRarUi-M:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=LJKF14YcuN0:xXQzRarUi-M:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/LJKF14YcuN0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/5263228607383003184/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=5263228607383003184" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/5263228607383003184?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/5263228607383003184?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/LJKF14YcuN0/solved-undefined-method-name-for.html" title="[SOLVED] undefined method `name' for &quot;Ascii85&quot;:String" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/10/solved-undefined-method-name-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8AQX84fCp7ImA9WhNTF0U.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-9147910360352827633</id><published>2012-10-21T11:54:00.000+11:00</published><updated>2012-10-21T11:54:00.134+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-21T11:54:00.134+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="feminism" /><title>Link: Primer on sexism in the tech-industry</title><content type="html">&lt;blockquote&gt;"The topic of sexism and its role in the technology industry has seen a huge resurgence over the past 12 to18 months. Yet despite being discussed and examined with increasing frequency, a lot of the subject remains unclear and under-explained, making it difficult for those who care deeply about our industry to partake in these discussions. This is, in part, because the problems are incredibly complex, nuanced and difficult to explain, making it impossible for any one article to address them sufficiently (lest that article becomes a book). Nevertheless, today we're going to try and see how much of the basics we can clear up."&lt;/blockquote&gt;

&lt;p&gt;Faruk Ateş has written a most-excellent &lt;a href="http://www.netmagazine.com/features/primer-sexism-tech-industry"&gt;primer on sexism in the tech industry&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should read this (especially if you are male) before even considering posting an article or comment about women in the tech industry.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=wW50rz4LWX0:I3DJmfvdw2Q:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=wW50rz4LWX0:I3DJmfvdw2Q:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=wW50rz4LWX0:I3DJmfvdw2Q:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=wW50rz4LWX0:I3DJmfvdw2Q:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=wW50rz4LWX0:I3DJmfvdw2Q:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=wW50rz4LWX0:I3DJmfvdw2Q:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=wW50rz4LWX0:I3DJmfvdw2Q:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=wW50rz4LWX0:I3DJmfvdw2Q:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=wW50rz4LWX0:I3DJmfvdw2Q:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/wW50rz4LWX0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/9147910360352827633/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=9147910360352827633" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/9147910360352827633?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/9147910360352827633?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/wW50rz4LWX0/link-primer-on-sexism-in-tech-industry.html" title="Link: Primer on sexism in the tech-industry" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/10/link-primer-on-sexism-in-tech-industry.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YGRHY5cSp7ImA9WhNTEkg.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-6249009973568302158</id><published>2012-10-15T09:52:00.000+11:00</published><updated>2012-10-15T09:52:05.829+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-15T09:52:05.829+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="code snippet" /><category scheme="http://www.blogger.com/atom/ns#" term="gems" /><category scheme="http://www.blogger.com/atom/ns#" term="monkey-patches" /><title>Making views/triggers/functions work in mysql for rails</title><content type="html">&lt;p&gt;We use mysql with Rails. We also use foreign-keys, views, triggers and stored procedures.&lt;/p&gt;

&lt;p&gt;Rails's mysql gem still doesn't know how to handle any of the above yet... which is kind of inconvenient if you want to test your application.&lt;/p&gt;

&lt;p&gt;The problem arises because even with a SQL schema dump - it only dumps the tables and foreign keys. No views, no triggers, no stored procedures. If you have code that relies on these... your application starts getting MySql errors.&lt;/p&gt;

&lt;p&gt;Luckily there seems to be a solution with the &lt;a href="https://github.com/railsware/db_structure_ext"&gt;db_structure_ext gem&lt;/a&gt;, which I've been using happily now for a couple of weeks.&lt;/p&gt;

&lt;p&gt;I found the README isn't at all clear as to how to get it set up, so here's some basic instructions on how I made it work with MySQL on Rails 2.3.X&lt;/p&gt;

&lt;h3&gt;1) Install it as per the README:&lt;/h3&gt;

&lt;p&gt;&lt;span class="code"&gt;gem install db_structure_ext&lt;/span&gt; and/or add &lt;span class="code"&gt;gem 'db_structure_ext'&lt;/span&gt; to Gemfile and then &lt;span class="code"&gt;bundle install&lt;/span&gt;&lt;/p&gt;

&lt;h3&gt;2) require it in your Rakefile&lt;/h3&gt;

&lt;pre class="code"&gt;
# extended db-structure-dump (also does triggers, routines etc)
require 'db_structure_ext/tasks'
&lt;/pre&gt;

&lt;h3&gt;3) Monkey-patch ActiveRecord&lt;/h3&gt;

&lt;p&gt;Create a file call &lt;span class="code"&gt;config/initializers/mysql_adapter.rb&lt;/span&gt; (or similar) and add the following code:&lt;/p&gt;

&lt;pre class="code"&gt;

module ActiveRecord
  module ConnectionAdapters
    class MysqlAdapter
      require 'db_structure_ext/init_mysql_adapter'

      # This is an overridden implementation of the structure_dump so that the
      # rake take db:structure:dump will dump out the schema elements.
      def structure_dump
        connection_proxy = DbStructureExt::MysqlConnectionProxy.new(ActiveRecord::Base.connection)
        connection_proxy.structure_dump
      end

    end
  end
end
&lt;/pre&gt;

&lt;p&gt;You need this so that Active Record actually extends the new methods. If you don't do this, then you can call "structure_dump" yourself in your code, independently for certain tables. But the new functionality won't come through as the default for all of your db tables unless you extend MysqlAdapter as per above.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=xMPCwHqWzII:6MAqU4vu4qQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=xMPCwHqWzII:6MAqU4vu4qQ:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=xMPCwHqWzII:6MAqU4vu4qQ:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=xMPCwHqWzII:6MAqU4vu4qQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=xMPCwHqWzII:6MAqU4vu4qQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=xMPCwHqWzII:6MAqU4vu4qQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=xMPCwHqWzII:6MAqU4vu4qQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=xMPCwHqWzII:6MAqU4vu4qQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=xMPCwHqWzII:6MAqU4vu4qQ:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/xMPCwHqWzII" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/6249009973568302158/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=6249009973568302158" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/6249009973568302158?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/6249009973568302158?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/xMPCwHqWzII/making-viewstriggersfunctions-work-in.html" title="Making views/triggers/functions work in mysql for rails" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/10/making-viewstriggersfunctions-work-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YCRnoyeSp7ImA9WhNTEkg.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-1635262148859267666</id><published>2012-10-09T13:38:00.001+11:00</published><updated>2012-10-15T09:52:47.491+11:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-15T09:52:47.491+11:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="feminism" /><title>Link: Women at work in Silicon Valley</title><content type="html">&lt;p&gt;Balancing work with family is one of the Hard Problems of Social Engineering a career... especially if you're female, and already suffer from several disadvantages in a high-tech workplace.&lt;/p&gt;

&lt;p&gt;This article on The Guardian gives a great overview about how women in Silicon valley are making "&lt;a href="http://www.guardian.co.uk/money/2012/oct/05/women-work-life-balance-twitter"&gt;Women at work&lt;/a&gt;" work.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=-hVgzg4fjpA:h90ETP5KXDM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=-hVgzg4fjpA:h90ETP5KXDM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=-hVgzg4fjpA:h90ETP5KXDM:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=-hVgzg4fjpA:h90ETP5KXDM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=-hVgzg4fjpA:h90ETP5KXDM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=-hVgzg4fjpA:h90ETP5KXDM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=-hVgzg4fjpA:h90ETP5KXDM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=-hVgzg4fjpA:h90ETP5KXDM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=-hVgzg4fjpA:h90ETP5KXDM:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/-hVgzg4fjpA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/1635262148859267666/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=1635262148859267666" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/1635262148859267666?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/1635262148859267666?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/-hVgzg4fjpA/link-women-at-work-in-silicon-valley.html" title="Link: Women at work in Silicon Valley" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/10/link-women-at-work-in-silicon-valley.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QFRX4_cSp7ImA9WhJbF00.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-6930248374270352645</id><published>2012-09-27T09:15:00.000+10:00</published><updated>2012-09-27T09:15:14.049+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-09-27T09:15:14.049+10:00</app:edited><title>Link: Amazon Review-spoofing scandal</title><content type="html">&lt;p&gt;This is a lesson in how any system can be gamed.&lt;/p&gt;
&lt;p&gt;Amazon reviews have been built up to be an integral part of how we evaluate books for sale on amazon. The ability to see what people are saying about a product has turned the process of book-buying on its head. Instead of briefly skimming the back of the jacket and taking a gamble on whether it's good or not, you can see the general consensus of the community of readers and *hopefully* get a better idea on whether this book is any good.&lt;p&gt;

&lt;p&gt;Unfortunately, like any process, it can be gamed, and this week we've seen how deep this can get.&lt;/p&gt;

&lt;p&gt;A guy called Rutherford set up a review-buying service where authors could  come and purchase good-reviews on amazon. In one case making a new author (John Locke) into an overnight millionaire.&lt;/p&gt;

&lt;p&gt;Here's a link to the full story on the &lt;A href="http://janefriedman.com/2012/08/28/extra-ether-buying-book-reviews-still-admire-john-locke/"&gt;John Locke book review scandal&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The uproar in the authorial world has been tremendous. and amazon are investigating what happened and what they can do about it. It's a tough job, because it's extremely difficult to figure out whether reviews are sincere.&lt;/p&gt;

&lt;p&gt;Hopefully they can find a way because I'd hate to lose the ability to see the true measure of the community's feelings towards a book.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=StOeOGE4EMk:YDqcZ51oB_E:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=StOeOGE4EMk:YDqcZ51oB_E:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=StOeOGE4EMk:YDqcZ51oB_E:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=StOeOGE4EMk:YDqcZ51oB_E:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=StOeOGE4EMk:YDqcZ51oB_E:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=StOeOGE4EMk:YDqcZ51oB_E:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=StOeOGE4EMk:YDqcZ51oB_E:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=StOeOGE4EMk:YDqcZ51oB_E:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=StOeOGE4EMk:YDqcZ51oB_E:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/StOeOGE4EMk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/6930248374270352645/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=6930248374270352645" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/6930248374270352645?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/6930248374270352645?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/StOeOGE4EMk/link-amazon-review-spoofing-scandal.html" title="Link: Amazon Review-spoofing scandal" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>0</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/09/link-amazon-review-spoofing-scandal.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQFSH04fyp7ImA9WhJbEkU.&quot;"><id>tag:blogger.com,1999:blog-1502761093196431512.post-6892036918928437814</id><published>2012-09-21T10:01:00.000+10:00</published><updated>2012-09-22T12:51:59.337+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-09-22T12:51:59.337+10:00</app:edited><title>Link: count vs length vs size in Rails</title><content type="html">&lt;p&gt;Every now and then I have to remind myself of the differences between "count", "length" and "size" in Rails. I've never found a better source for this than the &lt;a href="http://blog.hasmanythrough.com/"&gt;has_many :through&lt;/a&gt; article: &lt;a href="http://blog.hasmanythrough.com/2008/2/27/count-length-size"&gt;count vs length vs size&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's well worth a read, even if you're an old Rails pro.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=D7zNaQtz8oE:MqDbl8vxIJk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=D7zNaQtz8oE:MqDbl8vxIJk:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=D7zNaQtz8oE:MqDbl8vxIJk:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=D7zNaQtz8oE:MqDbl8vxIJk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=D7zNaQtz8oE:MqDbl8vxIJk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=D7zNaQtz8oE:MqDbl8vxIJk:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=D7zNaQtz8oE:MqDbl8vxIJk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?i=D7zNaQtz8oE:MqDbl8vxIJk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RubyGlasses?a=D7zNaQtz8oE:MqDbl8vxIJk:I9og5sOYxJI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RubyGlasses?d=I9og5sOYxJI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RubyGlasses/~4/D7zNaQtz8oE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://rubyglasses.blogspot.com/feeds/6892036918928437814/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1502761093196431512&amp;postID=6892036918928437814" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/6892036918928437814?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1502761093196431512/posts/default/6892036918928437814?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/RubyGlasses/~3/D7zNaQtz8oE/link-count-vs-length-vs-size-in-rails.html" title="Link: count vs length vs size in Rails" /><author><name>Taryn</name><uri>http://www.blogger.com/profile/00647732421144825421</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="32" src="http://4.bp.blogspot.com/-RyFo1SQKEf0/T2NYABUGRpI/AAAAAAAAAEg/x2CPZMJwVus/s220/BlueMtns_croppedForBlogger.png" /></author><thr:total>3</thr:total><feedburner:origLink>http://rubyglasses.blogspot.com/2012/09/link-count-vs-length-vs-size-in-rails.html</feedburner:origLink></entry></feed>
