<?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;DUMFQXs-eyp7ImA9WhBVEks.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524</id><updated>2013-04-17T23:43:30.553-07:00</updated><category term="ruby" /><category term="apache" /><category term="powerpoint" /><category term="flash" /><category term="xml" /><category term="postgres" /><category term="javascript" /><category term="mysql" /><category term="java" /><category term="shell scripting" /><category term="ec2" /><category term="php" /><category term="apple" /><category term="ejabberd" /><category term="gis" /><category term="ruby1.9" /><category term="textmate" /><category term="cdn" /><category term="flex" /><category term="iphone" /><category term="xcode" /><category term="elb" /><category term="git" /><category term="python" /><category term="no-interruptions" /><category term="browser" /><category term="rails" /><category term="Eclipse" /><category term="video" /><category term="ubuntu" /><category term="aws" /><category term="karmic" /><category term="submodule" /><category term="svn" /><category term="backup" /><title>de-co-de</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://de-co-de.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>128</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/blogspot/zQLV" /><feedburner:info uri="blogspot/zqlv" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><entry gd:etag="W/&quot;A08ESXc5fip7ImA9Wx9TFk4.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-8623932546042694810</id><published>2010-11-24T15:02:00.001-08:00</published><updated>2010-11-24T15:03:28.926-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-24T15:03:28.926-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ejabberd" /><title>Ejabberd restore</title><content type="html">You may get the following error when you use ejabberdctl to restore an ejabberd database.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Problem 'error {case_clause,{aborted,eacces}}' occurred executing the command.
Stacktrace: [{ejabberd_admin,restore_mnesia,1},
             {ejabberd_ctl,call_command,3},
             {ejabberd_ctl,try_call_command,3},
             {ejabberd_ctl,process2,3},
             {ejabberd_ctl,process,1},
             {rpc,'-handle_call/3-fun-0-',5}]
&lt;/pre&gt;&lt;br /&gt;
The fix is to make the backup file and all the directories to it readable to everybody.&lt;br /&gt;
&lt;br /&gt;
I hope this helps :)&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/SIkSeokJ9aE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/8623932546042694810/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=8623932546042694810" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/8623932546042694810?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/8623932546042694810?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/SIkSeokJ9aE/ejabberd-restore.html" title="Ejabberd restore" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2010/11/ejabberd-restore.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cBR349eyp7ImA9WxFUFE8.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-885441851085767239</id><published>2010-06-24T17:17:00.000-07:00</published><updated>2010-06-24T17:17:36.063-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-24T17:17:36.063-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="elb" /><category scheme="http://www.blogger.com/atom/ns#" term="aws" /><title>AWS Load Balancer glitches</title><content type="html">There is one situation in which an Amazon Web Services Elastic Load Balancer can generate errors in the browser. In my experience this happens when you add instances in different availability zones AND you use SSL in addition to regular http.&amp;nbsp;The ELB keeps track of the instances being added to the queue as it should. In addition to the instances the ELB also keeps track of their availability zones.&lt;br /&gt;
&lt;br /&gt;
Start with an ELB with one instance and add a second instance in a second availability zone. &amp;nbsp;In the AWS Console you will see two instances and two availability zones.&lt;br /&gt;
&lt;br /&gt;
Let's remove now one of the instances from the ELB. In this case in the AWS Console you will see that there is just one instance available but there are two availability zones. If you have a tool to monitor your site you will start getting access errors on the SSL URL.&lt;br /&gt;
&lt;br /&gt;
The fix is simply to remove the bad availability zone from the ELB.&lt;br /&gt;
&lt;br /&gt;
I hope this helps,&lt;br /&gt;
&lt;br /&gt;
Marius&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/VIiKaA7kVhM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/885441851085767239/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=885441851085767239" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/885441851085767239?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/885441851085767239?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/VIiKaA7kVhM/aws-load-balancer-glitches.html" title="AWS Load Balancer glitches" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2010/06/aws-load-balancer-glitches.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUNRX0_eip7ImA9WxFSE0Q.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-3870881963357499748</id><published>2010-04-15T22:27:00.000-07:00</published><updated>2010-04-15T22:38:14.342-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-04-15T22:38:14.342-07:00</app:edited><title>RightHere</title><content type="html">Here is my first iPad experiment: one small PhoneGap application that allows one to write and execute html+javascript code right on the iPad. A long way to self hosted development :)&lt;br /&gt;
&lt;br /&gt;
The github project is here: &lt;a href="http://github.com/decodeideas/RightHere"&gt;http://github.com/decodeideas/RightHere&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
An example is here. The top left textarea contains the code, it is executed when you hit Run.&lt;br /&gt;
&lt;br /&gt;
The code in this example:&lt;br /&gt;
&lt;code&gt;&amp;lt;input type="button" id="hello" value="Hello World"&amp;gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;lt;script&amp;gt;x$("hello").click(function(){&lt;br /&gt;
alert("hello world")})&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_9nigunub4gg/S8f1DVWVOlI/AAAAAAAAFTM/CQfTAr0jHoc/s1600/IMG_0001.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/_9nigunub4gg/S8f1DVWVOlI/AAAAAAAAFTM/CQfTAr0jHoc/s640/IMG_0001.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/kcLbyojtzIU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/3870881963357499748/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=3870881963357499748" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/3870881963357499748?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/3870881963357499748?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/kcLbyojtzIU/righthere.html" title="RightHere" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_9nigunub4gg/S8f1DVWVOlI/AAAAAAAAFTM/CQfTAr0jHoc/s72-c/IMG_0001.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2010/04/righthere.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIBQX8_cSp7ImA9WxBaFU4.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-5482181163694717316</id><published>2010-03-25T10:02:00.000-07:00</published><updated>2010-03-25T10:02:30.149-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-25T10:02:30.149-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ec2" /><title>EC2 key not found, yet another possible reason</title><content type="html">You may get the following error on EC2 when trying to start a new instance.&lt;br /&gt;
&lt;code&gt;Client.InvalidKeyPair.NotFound: The key pair 'some-name' does not exist&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
This may be due to multiple reasons such as you did not generate the key (I use the AWS console nowadays for this) or you have a typo somewhere. One other possible failure is that you picked the wrong availability zone. There is no key sharing between the 3 Amazon zones US West, US East and EU West.&lt;br /&gt;
&lt;br /&gt;
Hope this helps,&lt;br /&gt;
&lt;br /&gt;
Marius&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/EjWft-H73rc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/5482181163694717316/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=5482181163694717316" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/5482181163694717316?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/5482181163694717316?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/EjWft-H73rc/ec2-key-not-found-yet-another-possible.html" title="EC2 key not found, yet another possible reason" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>4</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2010/03/ec2-key-not-found-yet-another-possible.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYFQn45cCp7ImA9WxBaE0w.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-5188263286534031197</id><published>2010-03-22T20:15:00.000-07:00</published><updated>2010-03-22T20:15:13.028-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-22T20:15:13.028-07:00</app:edited><title>RubyMine cannot find rubygems</title><content type="html">Sometimes &lt;a href="http://www.jetbrains.com/ruby/"&gt;RubyMine&lt;/a&gt; seems to be totally lost and cannot find critical gems including rubygems. Using tools like &lt;a href="http://rvm.beginrescueend.com/"&gt;rvm&lt;/a&gt; generally complicate things.&lt;br /&gt;
&lt;br /&gt;
The issue is that the command line environment is different from the application one, specially on OS X. One of the easy fix is to run RubyMine from the command line, for example&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
/Applications/RubyMine/Contents/MacOS/rubymine&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
This tip is from the jetbrain support team on their &lt;a href="http://www.jetbrains.net/devnet/message/5248605"&gt;discussion group&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/aei2Faok4eE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/5188263286534031197/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=5188263286534031197" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/5188263286534031197?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/5188263286534031197?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/aei2Faok4eE/rubymine-cannot-find-rubygems.html" title="RubyMine cannot find rubygems" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2010/03/rubymine-cannot-find-rubygems.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EGQnw5eip7ImA9WxBaEk8.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-8458856750251433710</id><published>2010-03-21T18:33:00.000-07:00</published><updated>2010-03-21T18:33:43.222-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-21T18:33:43.222-07:00</app:edited><title>Grails can't convert ID</title><content type="html">If you are getting the following error it may be because you are sending a value that cannot be converted to a long.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
Provided id of the wrong type for class com.aaa.Bbbb. Expected: class java.lang.Long, got class java.lang.String&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
For example this may be caused by the user selecting an option from a html &amp;lt;select&amp;gt; with a missing value attribute.&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/Xk0n8vMEgZM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/8458856750251433710/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=8458856750251433710" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/8458856750251433710?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/8458856750251433710?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/Xk0n8vMEgZM/grails-cant-convert-id.html" title="Grails can't convert ID" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2010/03/grails-cant-convert-id.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYEQX06cSp7ImA9WxBQEEw.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-4824962090068841606</id><published>2010-01-08T21:14:00.000-08:00</published><updated>2010-01-08T21:15:00.319-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-08T21:15:00.319-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><category scheme="http://www.blogger.com/atom/ns#" term="aws" /><title>Enable slow log on amazon rds</title><content type="html">&lt;code&gt;&lt;br /&gt;
rds-create-db-parameter-group primary --description primary --engine MySql5.1&lt;br /&gt;
rds-modify-db-parameter-group primary --parameters "name=slow_query_log, value=true, method=immediate"&lt;br /&gt;
rds-modify-db-instance YOUR_INSTANCE --db-parameter-group-name primary&lt;br /&gt;
&lt;/code&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/sGJ1AjafSGo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/4824962090068841606/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=4824962090068841606" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/4824962090068841606?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/4824962090068841606?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/sGJ1AjafSGo/enable-slow-log-on-amazon-rds.html" title="Enable slow log on amazon rds" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2010/01/enable-slow-log-on-amazon-rds.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4MR3k5eyp7ImA9WxNbGEk.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-8672968027696766521</id><published>2009-11-21T14:53:00.000-08:00</published><updated>2009-11-21T14:53:06.723-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-21T14:53:06.723-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rails" /><category scheme="http://www.blogger.com/atom/ns#" term="cdn" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby1.9" /><category scheme="http://www.blogger.com/atom/ns#" term="aws" /><title>Deploying rails assets to the Amazon CDN</title><content type="html">Rails uses a ?timestamp in the URL for cache busting. Together with an expired header in the far future this allows you to get the maximum benefits out of browser caching.&lt;br /&gt;
&lt;br /&gt;
Unfortunately this scheme does not seem to work on the Amazon CDN. I just contributed some changes to the Asset Packager that allow you to better use assets on the CDN&lt;br /&gt;
&lt;br /&gt;
http://github.com/decodeideas/asset_packager&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/kiSuDM2TPC8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/8672968027696766521/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=8672968027696766521" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/8672968027696766521?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/8672968027696766521?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/kiSuDM2TPC8/deploying-rails-assets-to-amazon-cdn.html" title="Deploying rails assets to the Amazon CDN" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/11/deploying-rails-assets-to-amazon-cdn.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UBQ3c-eip7ImA9WxNUFkw.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-3912759274970860067</id><published>2009-11-07T09:34:00.000-08:00</published><updated>2009-11-07T09:34:12.952-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-07T09:34:12.952-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="karmic" /><category scheme="http://www.blogger.com/atom/ns#" term="ec2" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby1.9" /><title>ec2_upload_bundle and ruby 1.9: can't convert Fixnum into String</title><content type="html">The following applies to the following scenari&lt;br /&gt;
&lt;br /&gt;
- ubuntu karmic, ec2 ami&lt;br /&gt;
- ruby 1.9.2 installed as /usr/bin/ruby&lt;br /&gt;
- the latest ec2 tools&lt;br /&gt;
&lt;br /&gt;
When you use ec2_upload_bundle to re-bundle an AMI that you modified you will get the error&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
ERROR: can't convert Fixnum into String&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The trick to debug this is to pass --debug to the ec2 commands. The fix is on &lt;br /&gt;
line 19 of /usr/lib/ec2-ami-tools/lib/ec2/amitools/util.rb &lt;br /&gt;
you need to change ?A to ?A.ord to get this line:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
(0..19).inject("") {|ident, n| ident+(?A.ord + Kernel.rand(26)).chr}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Before doing the change you can reproduce the problem with&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
ruby1.9 -r /usr/lib/ec2-ami-tools/lib/ec2/amitools/util -e 'puts&lt;br /&gt;
gen_ident'&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
After applying the patch you should get a short sequence of random&lt;br /&gt;
letters.&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/t5oHiUnHXNI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/3912759274970860067/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=3912759274970860067" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/3912759274970860067?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/3912759274970860067?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/t5oHiUnHXNI/ec2uploadbundle-and-ruby-19-cant.html" title="ec2_upload_bundle and ruby 1.9: can't convert Fixnum into String" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/11/ec2uploadbundle-and-ruby-19-cant.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YBRXw7fSp7ImA9WxNUFkw.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-9040325801397818357</id><published>2009-11-06T12:33:00.000-08:00</published><updated>2009-11-07T09:32:34.205-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-07T09:32:34.205-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="rails" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby1.9" /><title>Plugin not found with ruby 1.9, rails 2.3.4</title><content type="html">When using rails 2.3.4 with ruby 1.9.1 you cannot install plugins from git. You will get an error like the following:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
script/plugin install git://github.com/giraffesoft/resource_controller.git&lt;br /&gt;
Plugin not found: ["git://github.com/giraffesoft/resource_controller.git"]&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The simplest workaround is to use ruby 1.8 to run the above. On Snow Leopard you have it very likely as /usr/bin/ruby, so you can do&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
/usr/bin/ruby script/plugin install git://github.com/giraffesoft/resource_controller.git&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu you probably have it as ruby1.8.&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/SbaGkUUmnwI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/9040325801397818357/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=9040325801397818357" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/9040325801397818357?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/9040325801397818357?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/SbaGkUUmnwI/plugin-not-found-with-ruby-19-rails-234.html" title="Plugin not found with ruby 1.9, rails 2.3.4" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/11/plugin-not-found-with-ruby-19-rails-234.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EBRHkyfip7ImA9WxNWGUo.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-1427795243335550256</id><published>2009-10-19T10:00:00.000-07:00</published><updated>2009-10-19T10:00:55.796-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-19T10:00:55.796-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="video" /><category scheme="http://www.blogger.com/atom/ns#" term="powerpoint" /><title>Using mov files in Powerpoint</title><content type="html">I found out that .mov files play unreliably when imported into Powerpoint. I tried transforming into avi and wmv files using a plethora of tools. The most reliable workflow I found so far is:&lt;br /&gt;
&lt;br /&gt;
1. in Final Cut (Express) generate the mov files in H.264, one bit rate that worked acceptably for me is 1500kbps &lt;br /&gt;
2. move to the vista system&lt;br /&gt;
3. open Windows Movie Maker&lt;br /&gt;
4. import the mov file, add to the history line&lt;br /&gt;
5. select Publish to the local system&lt;br /&gt;
6. select Custom format&lt;br /&gt;
7. select Windows Media Video, DVD 3000kbps&lt;br /&gt;
8. write the file, for some annoying reason you cannot use the same name as the mov file even though the file will have the extension wmv&lt;br /&gt;
&lt;br /&gt;
Import the wmv file in power point&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/hVRwqE4O6TI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/1427795243335550256/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=1427795243335550256" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/1427795243335550256?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/1427795243335550256?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/hVRwqE4O6TI/using-mov-files-in-powerpoint.html" title="Using mov files in Powerpoint" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/10/using-mov-files-in-powerpoint.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UMQn88cCp7ImA9WxNREEw.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-1063478188103623780</id><published>2009-09-03T14:59:00.000-07:00</published><updated>2009-09-03T15:01:23.178-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-03T15:01:23.178-07:00</app:edited><title>Ruby gems on Snow Leopard</title><content type="html">After upgrading to Snow Leopard I am getting all kind of weird errors in my ruby gems, for example:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;dlopen(/Library/Ruby/Gems/1.8/gems/nokogiri-1.3.3/lib/nokogiri/nokogiri.bundle, 9): no suitable image found.  Did find:&lt;br /&gt; /Library/Ruby/Gems/1.8/gems/nokogiri-1.3.3/lib/nokogiri/nokogiri.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/1.8/gems/nokogiri-1.3.3/lib/nokogiri/nokogiri.bundle&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I just deleted all the files under /Library/Ruby/Gems/1.8/gems and I am reinstalling the gems.&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/E89jkPZjEpw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/1063478188103623780/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=1063478188103623780" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/1063478188103623780?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/1063478188103623780?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/E89jkPZjEpw/ruby-gems-on-snow-leopard.html" title="Ruby gems on Snow Leopard" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/09/ruby-gems-on-snow-leopard.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUFR306cSp7ImA9WxNSF0o.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-1976570884563386156</id><published>2009-08-31T21:05:00.000-07:00</published><updated>2009-08-31T21:10:16.319-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-31T21:10:16.319-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="aws" /><title>SQS connection between Ruby and Python</title><content type="html">If you try to use &lt;a href="http://aws.amazon.com/sqs/"&gt;Amazon SQS&lt;/a&gt; to connect &lt;a href="http://rightaws.rubyforge.org/"&gt;Right_aws&lt;/a&gt; with &lt;a href="http://boto.googlecode.com"&gt;Boto&lt;/a&gt; you have to keep in mind that Boto expects the body of the message to be encoded in base64. To make life even more interesting the Boto frameawork will crash in the XML parser for some content of the body.&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/bZzoIMVF2mw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/1976570884563386156/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=1976570884563386156" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/1976570884563386156?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/1976570884563386156?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/bZzoIMVF2mw/sqs-connection-between-ruby-and-python.html" title="SQS connection between Ruby and Python" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/08/sqs-connection-between-ruby-and-python.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YNRHw8fip7ImA9WxNUFkw.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-1466968941390924940</id><published>2009-08-04T13:31:00.000-07:00</published><updated>2009-11-07T09:33:15.276-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-07T09:33:15.276-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="ec2" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby1.9" /><category scheme="http://www.blogger.com/atom/ns#" term="aws" /><title>Right scale gem on ruby 1.9</title><content type="html">If you try to use the right_aws gem on ruby 1.9 you will encounter a couple of errors including&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
no such file to load -- md5&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
and&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
right_aws-1.10.0/lib/s3/right_s3_interface.rb:1133: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'&lt;br /&gt;
when 'LastModified' : @result[:last_modified] = @text&lt;br /&gt;
^&lt;br /&gt;
right_aws-1.10.0/lib/s3/right_s3_interface.rb:1134: syntax error, unexpected keyword_when, expecting keyword_end&lt;br /&gt;
when 'ETag'         : @result[:e_tag]         = @text&lt;br /&gt;
^&lt;br /&gt;
right_aws-1.10.0/lib/s3/right_s3_interface.rb:1134: syntax error, unexpected ':', expecting keyword_end&lt;br /&gt;
when 'ETag'         : @result[:e_tag]         = @text&lt;br /&gt;
^&lt;br /&gt;
right_aws-1.10.0/lib/s3/right_s3_interface.rb:1175: syntax error, unexpected keyword_end, expecting $end&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
In this case you can use the following patch to port the gem to ruby 1.9. The patch may stop working as Right Scale updates their code, the changes are relatively small and you should be able to re-port the patch to the new code.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #88ff88;width:400px;height:800px;overflow-x: auto; border:2px solid black;"&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
diff -crB right_aws-1.10.0-orig/lib/awsbase/right_awsbase.rb right_aws-1.10.0/lib/awsbase/right_awsbase.rb&lt;br /&gt;
*** right_aws-1.10.0-orig/lib/awsbase/right_awsbase.rb 2009-08-04 13:40:56.000000000 -0700&lt;br /&gt;
--- right_aws-1.10.0/lib/awsbase/right_awsbase.rb 2009-08-04 13:23:53.000000000 -0700&lt;br /&gt;
***************&lt;br /&gt;
*** 23,29 ****&lt;br /&gt;
&lt;br /&gt;
# Test&lt;br /&gt;
module RightAws&lt;br /&gt;
!   require 'md5'&lt;br /&gt;
require 'pp'&lt;br /&gt;
&lt;br /&gt;
class AwsUtils #:nodoc:&lt;br /&gt;
--- 23,29 ----&lt;br /&gt;
&lt;br /&gt;
# Test&lt;br /&gt;
module RightAws&lt;br /&gt;
!   require 'digest/md5'&lt;br /&gt;
require 'pp'&lt;br /&gt;
&lt;br /&gt;
class AwsUtils #:nodoc:&lt;br /&gt;
diff -crB right_aws-1.10.0-orig/lib/s3/right_s3.rb right_aws-1.10.0/lib/s3/right_s3.rb&lt;br /&gt;
*** right_aws-1.10.0-orig/lib/s3/right_s3.rb 2009-08-04 13:40:56.000000000 -0700&lt;br /&gt;
--- right_aws-1.10.0/lib/s3/right_s3.rb 2009-08-04 13:26:37.000000000 -0700&lt;br /&gt;
***************&lt;br /&gt;
*** 761,769 ****&lt;br /&gt;
@name  = name&lt;br /&gt;
@perms = perms.to_a&lt;br /&gt;
case action&lt;br /&gt;
!           when :apply:             apply&lt;br /&gt;
!           when :refresh:           refresh&lt;br /&gt;
!           when :apply_and_refresh: apply; refresh&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- 761,769 ----&lt;br /&gt;
@name  = name&lt;br /&gt;
@perms = perms.to_a&lt;br /&gt;
case action&lt;br /&gt;
!           when :apply then             apply&lt;br /&gt;
!           when :refresh then           refresh&lt;br /&gt;
!           when :apply_and_refresh then apply; refresh&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
diff -crB right_aws-1.10.0-orig/lib/s3/right_s3_interface.rb right_aws-1.10.0/lib/s3/right_s3_interface.rb&lt;br /&gt;
*** right_aws-1.10.0-orig/lib/s3/right_s3_interface.rb 2009-08-04 13:40:56.000000000 -0700&lt;br /&gt;
--- right_aws-1.10.0/lib/s3/right_s3_interface.rb 2009-08-04 13:25:39.000000000 -0700&lt;br /&gt;
***************&lt;br /&gt;
*** 1130,1137 ****&lt;br /&gt;
end&lt;br /&gt;
def tagend(name)&lt;br /&gt;
case name&lt;br /&gt;
!         when 'LastModified' : @result[:last_modified] = @text&lt;br /&gt;
!         when 'ETag'         : @result[:e_tag]         = @text&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
--- 1130,1137 ----&lt;br /&gt;
end&lt;br /&gt;
def tagend(name)&lt;br /&gt;
case name&lt;br /&gt;
!         when 'LastModified' then @result[:last_modified] = @text&lt;br /&gt;
!         when 'ETag'         then @result[:e_tag]         = @text&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/1K0xLFFVa2I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/1466968941390924940/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=1466968941390924940" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/1466968941390924940?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/1466968941390924940?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/1K0xLFFVa2I/right-scale-gem-on-ruby-19.html" title="Right scale gem on ruby 1.9" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/08/right-scale-gem-on-ruby-19.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQDRHc4eSp7ImA9WxJVFU0.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-3917806645529261141</id><published>2009-07-01T20:39:00.000-07:00</published><updated>2009-07-01T20:46:15.931-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-01T20:46:15.931-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="postgres" /><category scheme="http://www.blogger.com/atom/ns#" term="apple" /><title>Postgres after mac migration</title><content type="html">After you migrate your files to a new mac all the postgres data will be present but the postgres user won't exist. The postgres server won't start in this case. To create the user you need to figure out the postgres userid. You can run ls -l /usr/local/psql (substitute your postgres installation directory). The data subfolder needs to belong to the postgres user and you will see just a numeric userid. You will also see the postgres groupid. The example below assumes that both IDs are 103, make sure to substitute the IDs for your setup.&lt;br /&gt;&lt;br /&gt;To create the user and group do the following as root:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;dscl . -create /Users/postgres UserID 103&lt;br /&gt;dscl . -create /Groups/postgres PrimaryGroupID 103&lt;br /&gt;dscl / -append /Groups/postgres GroupMembership postgres&lt;br /&gt;&lt;/code&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/k0iRVZTzHJc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/3917806645529261141/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=3917806645529261141" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/3917806645529261141?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/3917806645529261141?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/k0iRVZTzHJc/postgres-after-mac-migration.html" title="Postgres after mac migration" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/07/postgres-after-mac-migration.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAHRX89eip7ImA9WxJXGEk.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-2369309537754068486</id><published>2009-06-12T15:38:00.001-07:00</published><updated>2009-06-12T15:45:34.162-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-12T15:45:34.162-07:00</app:edited><title>The packet8 scam</title><content type="html">I was seldom using my packet8 account and I had a low usage account paying $14/month. They sent an email that they will automatically upgrade my account to double that price since they do not offer low usage anymore. This doesn't make sense for me since I really never use my account. I started canceling my account which you cannot do over their automated system. You have to call them and they transfer you to a voicemail. They call you back after 1 day and if you are unlucky to miss the call you have to call back, identify yourself, get transferred, identify yourself again and then listen to somebody doing their best effort to keep your account.&lt;br /&gt;&lt;br /&gt;This is all pretty standard albeit a bit shadu. What is not standard is that in the time it took to do all this the new month started. My account got canceled on the 2nd of the month but I was charged $30 on the 3rd of the month. I called somebody there and I was informed that I am liable for that month even though it is not my fault their lengthy process let me to this situation.&lt;br /&gt;&lt;br /&gt;Are you a happy packet8 customer or an unhappy former packet 8 customer? Leave a comment.&lt;br /&gt;&lt;br /&gt;Marius&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/xhrF0ky0x1A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/2369309537754068486/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=2369309537754068486" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/2369309537754068486?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/2369309537754068486?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/xhrF0ky0x1A/packet8-scam.html" title="The packet8 scam" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/06/packet8-scam.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAGSXg7fip7ImA9WxJQGUU.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-500158507615583891</id><published>2009-06-02T17:07:00.000-07:00</published><updated>2009-06-02T17:08:48.606-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-02T17:08:48.606-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="rails" /><category scheme="http://www.blogger.com/atom/ns#" term="textmate" /><title>Ruby on Rails.tmbundle for ruby1.9</title><content type="html">I forked Dr. Nic's TextMate bundle for Ruby On Rails and I started fixing issues related to ruby1.9&lt;br /&gt;&lt;br /&gt;&lt;a href="http://github.com/decodeideas/ruby-on-rails-tmbundle/tree/master"&gt;http://github.com/decodeideas/ruby-on-rails-tmbundle/tree/master&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let me know of any issue.&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/PJcY6VVtmK4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/500158507615583891/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=500158507615583891" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/500158507615583891?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/500158507615583891?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/PJcY6VVtmK4/ruby-on-railstmbundle-for-ruby19.html" title="Ruby on Rails.tmbundle for ruby1.9" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/06/ruby-on-railstmbundle-for-ruby19.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUDQH44eCp7ImA9WxJQGEs.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-5467659271510808079</id><published>2009-06-01T07:50:00.000-07:00</published><updated>2009-06-01T07:57:51.030-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-01T07:57:51.030-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="rails" /><title>Benefits of local .gitignore</title><content type="html">When you avoid tracking files in a git repository you can out the file names (or a regex matching them) in .gitignore files. Some weeks ago I realized you can sprinkle .gitignore file through out your directory structure. Generally it makes sense to keep information modularized so I started using .gitignore files in my subfolders. &lt;br /&gt;&lt;br /&gt;Today I found out the benefits of local .gitignore files. I started a new project with a git repository encompassing multiple modules: rails app, backend processing, deployment scripts. Later on I could not figure out how to use Capistrano to deploy a rails out from a folder and I split the big repository in smaller repositories, one per project. &lt;br /&gt;&lt;br /&gt;Since the subfolders have their own .gitignore files they were automatically picked up by each git subproject. Nice :)&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/sNA8BAG0GwU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/5467659271510808079/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=5467659271510808079" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/5467659271510808079?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/5467659271510808079?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/sNA8BAG0GwU/benefits-of-local-gitignore.html" title="Benefits of local .gitignore" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/06/benefits-of-local-gitignore.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQGR3o6fyp7ImA9WxJQGE0.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-1267380304106827005</id><published>2009-05-31T15:06:00.001-07:00</published><updated>2009-05-31T15:18:46.417-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-31T15:18:46.417-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="xml" /><category scheme="http://www.blogger.com/atom/ns#" term="apple" /><title>Upgrading libxml on OS X from sources: DON'T!</title><content type="html">I upgraded the libxml/libxslt libraries on my MBP. After &lt;b&gt;./configure &amp;&amp; make &amp;&amp; sudo make install&lt;/b&gt; the new libraries ended up in &lt;b&gt;/usr/local&lt;/b&gt; which is fine. I renamed the existing libraries from /usr/lib and that was the end of it. I had to reboot from an external firewire backup to restore the files and get my system back.&lt;br /&gt;&lt;br /&gt;The series of unfortunate events that leads to a broken OS are:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; the libxml build process generates only i386 files&lt;br /&gt;&lt;li&gt; it is not obvious how to generate universal binary, or at least x86_64 with the libtool used in the libxml source&lt;br /&gt;&lt;li&gt; the sudo exe depends on a library that in turn depends on the x86_64 libxml&lt;br /&gt;&lt;li&gt; without libxml from the distribution there is no more sudo so you cannot rename the shared libraries back&lt;br /&gt;&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/NblqIVzxYIU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/1267380304106827005/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=1267380304106827005" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/1267380304106827005?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/1267380304106827005?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/NblqIVzxYIU/upgrading-libxml-on-os-x-from-sources.html" title="Upgrading libxml on OS X from sources: DON'T!" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/05/upgrading-libxml-on-os-x-from-sources.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQCRHc5fip7ImA9WxJQF0k.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-7581638236296602804</id><published>2009-05-30T21:29:00.000-07:00</published><updated>2009-05-30T21:32:45.926-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-30T21:32:45.926-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><title>Rake1.9 gotcha</title><content type="html">Note that if you installed ruby 1.9 in parallel with ruby 1.8 then you got a rake1.9 that you should use with the upgraded projects. Unfortunately rake1.9 does not call gem1.9, it falls back to gem when you run commands like  &lt;b&gt;rake1.9 gems:install RAILS_ENV=test&lt;/b&gt;. If you want to install gems for the 1.9 environment you need to use &lt;b&gt;gem1.9&lt;/b&gt; explicitly, for example&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo gem1.9 install thoughtbot-factory_girl&lt;br /&gt;&lt;/code&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/orxWCpo9FRg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/7581638236296602804/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=7581638236296602804" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/7581638236296602804?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/7581638236296602804?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/orxWCpo9FRg/rake19-gotcha.html" title="Rake1.9 gotcha" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/05/rake19-gotcha.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8FQHk_eyp7ImA9WxJQGUU.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-4172018991670328737</id><published>2009-05-30T19:33:00.000-07:00</published><updated>2009-06-02T17:10:11.743-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-02T17:10:11.743-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="apple" /><title>Mysql ruby1.9 extensions on OS X / Ubuntu 9.0.4</title><content type="html">If you get the errors below when installing the mysql gem for ruby 1.9 then just go to the link below and follow the instructions to compile the ruby extension manually. Remember to use ruby1.9 if you installed it in parallel with 1.8.6&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tmtm.org/en/mysql/ruby/"&gt;http://www.tmtm.org/en/mysql/ruby/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The instructions worked for me both on OS X 10.5.6 and Ubuntu 9.0.4. Here are the errors I was getting with &lt;b&gt;gem install mysql&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;mysql.c:6:21: error: version.h: No such file or directory&lt;br /&gt;mysql.c: In function ‘make_field_obj’:&lt;br /&gt;mysql.c:185: warning: unused variable ‘hash’&lt;br /&gt;mysql.c: In function ‘escape_string’:&lt;br /&gt;&lt;/code&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/JMkUYCsK7u8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/4172018991670328737/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=4172018991670328737" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/4172018991670328737?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/4172018991670328737?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/JMkUYCsK7u8/mysql-ruby19-extensions-on-os-x.html" title="Mysql ruby1.9 extensions on OS X / Ubuntu 9.0.4" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/05/mysql-ruby19-extensions-on-os-x.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMHRHs5fSp7ImA9WxJQFkQ.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-7445063186539041272</id><published>2009-05-30T08:27:00.000-07:00</published><updated>2009-05-30T08:30:35.525-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-30T08:30:35.525-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Git on ubuntu 9.04 server</title><content type="html">If you try to install git on ubuntu 9.04 server, without Tcl/TK, you will get an error similar to the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;GITGUI_VERSION = 0.12.0.23.ga91be&lt;br /&gt;    * new locations or Tcl/Tk interpreter&lt;br /&gt;    GEN git-gui&lt;br /&gt;    INDEX lib/&lt;br /&gt;    * tclsh failed; using unoptimized loading&lt;br /&gt;    MSGFMT    po/de.msg make[1]: *** [po/de.msg] Error 127&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;One fix is to not build the GITGUI extensions. A complete list of commands follows, replace 1.6.3.1 with the current stable version of git.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;http://kernel.org/pub/software/scm/git/git-1.6.3.1.tar.bz2&lt;br /&gt;tar xjf git-1.6.3.1.tar.bz2&lt;br /&gt;cd git-1.6.3.1&lt;br /&gt;./configure --without-tcltk&lt;br /&gt;make &lt;br /&gt;sudo make install&lt;br /&gt;&lt;/code&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/P9aogR8S5L0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/7445063186539041272/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=7445063186539041272" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/7445063186539041272?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/7445063186539041272?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/P9aogR8S5L0/git-on-ubuntu-904-server.html" title="Git on ubuntu 9.04 server" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/05/git-on-ubuntu-904-server.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04GQnsyfCp7ImA9WxJRGE4.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-6751278528958329249</id><published>2009-05-20T10:10:00.000-07:00</published><updated>2009-05-20T10:18:43.594-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-20T10:18:43.594-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="python" /><title>Python __new__ not called</title><content type="html">I was trying to build a quick and dirty singleton in python 2.5. I defined a __new__ method for my class and returned the one and only instance in there of the desired subject.  To my surprise __new__ was not called, at all. After some more digging it turns out that your class needs to inherit from object. See the example below.&lt;br /&gt;&lt;br /&gt;&lt;pre class="textmate-source"&gt;&lt;span class="source source_python"&gt;&lt;span class="meta meta_class meta_class_old-style meta_class_old-style_python"&gt;&lt;span class="storage storage_type storage_type_class storage_type_class_python"&gt;class&lt;/span&gt; &lt;span class="entity entity_name entity_name_type entity_name_type_class entity_name_type_class_python"&gt;NoNew&lt;/span&gt;&lt;span class="punctuation punctuation_section punctuation_section_class punctuation_section_class_begin punctuation_section_class_begin_python"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="meta meta_function meta_function_python"&gt;    &lt;span class="storage storage_type storage_type_function storage_type_function_python"&gt;def&lt;/span&gt; &lt;span class="entity entity_name entity_name_function entity_name_function_python"&gt;&lt;span class="support support_function support_function_magic support_function_magic_python"&gt;__new__&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_python"&gt;(&lt;/span&gt;&lt;span class="meta meta_function meta_function_parameters meta_function_parameters_python"&gt;&lt;span class="variable variable_parameter variable_parameter_function variable_parameter_function_python"&gt;cls&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_end punctuation_definition_parameters_end_python"&gt;)&lt;/span&gt;&lt;span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_begin punctuation_section_function_begin_python"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="keyword keyword_other keyword_other_python"&gt;print&lt;/span&gt; &lt;span class="string string_quoted string_quoted_double string_quoted_double_single-line string_quoted_double_single-line_python"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python"&gt;"&lt;/span&gt;New Called for NoNew&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="meta meta_class meta_class_python"&gt;&lt;span class="storage storage_type storage_type_class storage_type_class_python"&gt;class&lt;/span&gt; &lt;span class="entity entity_name entity_name_type entity_name_type_class entity_name_type_class_python"&gt;YesNew&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_inheritance punctuation_definition_inheritance_begin punctuation_definition_inheritance_begin_python"&gt;(&lt;/span&gt;&lt;span class="meta meta_class meta_class_inheritance meta_class_inheritance_python"&gt;&lt;span class="entity entity_other entity_other_inherited-class entity_other_inherited-class_python"&gt;&lt;span class="support support_type support_type_python"&gt;object&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_inheritance punctuation_definition_inheritance_end punctuation_definition_inheritance_end_python"&gt;)&lt;/span&gt;&lt;span class="punctuation punctuation_section punctuation_section_class punctuation_section_class_begin punctuation_section_class_begin_python"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="meta meta_function meta_function_python"&gt;    &lt;span class="storage storage_type storage_type_function storage_type_function_python"&gt;def&lt;/span&gt; &lt;span class="entity entity_name entity_name_function entity_name_function_python"&gt;&lt;span class="support support_function support_function_magic support_function_magic_python"&gt;__new__&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_python"&gt;(&lt;/span&gt;&lt;span class="meta meta_function meta_function_parameters meta_function_parameters_python"&gt;&lt;span class="variable variable_parameter variable_parameter_function variable_parameter_function_python"&gt;cls&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_end punctuation_definition_parameters_end_python"&gt;)&lt;/span&gt;&lt;span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_begin punctuation_section_function_begin_python"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="keyword keyword_other keyword_other_python"&gt;print&lt;/span&gt; &lt;span class="string string_quoted string_quoted_double string_quoted_double_single-line string_quoted_double_single-line_python"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_python"&gt;"&lt;/span&gt;New Called for YesNew&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_python"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="meta meta_function-call meta_function-call_python"&gt;NoNew&lt;span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python"&gt;(&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="meta meta_function-call meta_function-call_python"&gt;YesNew&lt;span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_begin punctuation_definition_arguments_begin_python"&gt;(&lt;/span&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_arguments punctuation_definition_arguments_end punctuation_definition_arguments_end_python"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Executing the above generates&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ python test.py&lt;br /&gt;New Called for YesNew&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;As you can see there is no line with NoNew and you need to inherit from object to be able to override __new__.&lt;br /&gt;&lt;br /&gt;Another interesting fact is that printing an object will output something that looks like a physical address and that can be used to ensure that your objects are a singleton. Writing unit test cases for this is harder and I decide it is not worth the time.&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/IishTVcT5xE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/6751278528958329249/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=6751278528958329249" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/6751278528958329249?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/6751278528958329249?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/IishTVcT5xE/python-new-not-called.html" title="Python __new__ not called" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/05/python-new-not-called.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IAQn44fyp7ImA9WxJREEk.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-9009294059171587715</id><published>2009-05-11T06:43:00.000-07:00</published><updated>2009-05-11T06:45:43.037-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-11T06:45:43.037-07:00</app:edited><title>CocoaHeads Sacramento/Roseville/Davis</title><content type="html">I am trying to start a CocoaHeads group in the CA Central Valley around Sacramento. Inaugural meeting this Thursday May 14th at 6:30pm. We are meeting at Common Grounds in Davis, CA. See you there if interested :)&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/cnq6NnDAlRo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/9009294059171587715/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=9009294059171587715" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/9009294059171587715?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/9009294059171587715?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/cnq6NnDAlRo/cocoaheads-sacramentorosevilledavis.html" title="CocoaHeads Sacramento/Roseville/Davis" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/05/cocoaheads-sacramentorosevilledavis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMNQ3Y6fip7ImA9WxJSFUk.&quot;"><id>tag:blogger.com,1999:blog-4024834538075370524.post-8108282372070645653</id><published>2009-05-05T09:18:00.000-07:00</published><updated>2009-05-05T09:21:32.816-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-05T09:21:32.816-07:00</app:edited><title>Shipped my iPhone app</title><content type="html">Checkout my iPhone app, see the links under &lt;a href="http://windsesh.com"&gt;http://windsesh.com&lt;/a&gt;. Some of the code is open sourced at &lt;a href="http://github.com/decodeideas/iphonelite3-lib/tree/master"&gt;github&lt;/a&gt;.&lt;img src="http://feeds.feedburner.com/~r/blogspot/zQLV/~4/CCiNwRKomMQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://de-co-de.blogspot.com/feeds/8108282372070645653/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4024834538075370524&amp;postID=8108282372070645653" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/8108282372070645653?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4024834538075370524/posts/default/8108282372070645653?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/zQLV/~3/CCiNwRKomMQ/shipped-my-iphone-app.html" title="Shipped my iPhone app" /><author><name>decodeideas</name><uri>http://www.blogger.com/profile/10719518403609200342</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_9nigunub4gg/SWZkO4I_ffI/AAAAAAAAECA/WSOdybiIs5M/S220/Photo+24.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://de-co-de.blogspot.com/2009/05/shipped-my-iphone-app.html</feedburner:origLink></entry></feed>
