<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7841127</id><updated>2011-12-10T04:26:29.134+09:00</updated><category term='linux'/><category term='ruby'/><category term='office'/><title type='text'>:thoughts =&gt; nil</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>51</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7841127.post-86797280606585481</id><published>2009-01-02T21:54:00.008+09:00</published><updated>2009-01-02T21:59:05.373+09:00</updated><title type='text'>Display part initial and Full list when mouse over</title><content type='html'>&lt;div&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_GgQisq2pxEM/SV4O03cenKI/AAAAAAAAC7k/8SceWJKiv-A/s1600-h/Picture+2.png"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 301px; height: 316px;" src="http://2.bp.blogspot.com/_GgQisq2pxEM/SV4O03cenKI/AAAAAAAAC7k/8SceWJKiv-A/s320/Picture+2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5286679313978924194" /&gt;&lt;/a&gt;
&lt;/div&gt;
If you mouse over the image:
&lt;div&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_GgQisq2pxEM/SV4O6hz39iI/AAAAAAAAC7s/gneN0gYHXWU/s1600-h/Picture+3.png"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 245px; height: 320px;" src="http://2.bp.blogspot.com/_GgQisq2pxEM/SV4O6hz39iI/AAAAAAAAC7s/gneN0gYHXWU/s320/Picture+3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5286679411250689570" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-86797280606585481?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/86797280606585481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=86797280606585481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/86797280606585481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/86797280606585481'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2009/01/display-part-initial-and-full-list-when.html' title='Display part initial and Full list when mouse over'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_GgQisq2pxEM/SV4O03cenKI/AAAAAAAAC7k/8SceWJKiv-A/s72-c/Picture+2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-8152728126801599998</id><published>2008-09-10T15:53:00.001+09:00</published><updated>2008-09-10T15:53:26.711+09:00</updated><title type='text'>To make port install org.macports.mysql5.plist in
your /Library/LaunchDaemons</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;To make port install org.macports.mysql5.plist in your /Library/LaunchDaemons&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo port install mysql5 +server
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Instead of&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo port install mysql5
&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-8152728126801599998?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/8152728126801599998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=8152728126801599998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8152728126801599998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8152728126801599998'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2008/09/to-make-port-install.html' title='To make port install org.macports.mysql5.plist in&#xA;your /Library/LaunchDaemons'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-4628579031430770496</id><published>2008-08-13T16:18:00.003+09:00</published><updated>2008-08-22T13:36:34.760+09:00</updated><title type='text'>Install PostgreSQL 8.3.3 on Joyent OpenSolaris</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;pre&gt;&lt;code&gt;[gmg6p9aa:~/postgresql-8.3.3] root# ./configure --with-libraries=/opt/csw/lib:/opt/csw/libexec --with-includes=/opt/csw/include
    checking build system type... i386-pc-solaris2.11
    ......
    checking for syslog.h... yes
    checking for optreset... no
    checking for strtoll... yes
    checking for strtoull... yes
    checking for atexit... yes
    checking for &lt;em&gt;LARGEFILE&lt;/em&gt;SOURCE value needed for large files... no
    checking for fseeko... (cached) yes
    checking test program... failed
    configure: error:
    Could not execute a simple test program.  This may be a problem
    related to locating shared libraries.  Check the file 'config.log'
    for the exact reason.&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;http://www.pgcluster.org/svn/pgcluster-1.5/doc/FAQ_Solaris&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[gmg6p9aa:~/postgresql-8.3.3] root# export LDFLAGS="-R/opt/csw/lib/:/usr/lib/"
[gmg6p9aa:~/postgresql-8.3.3] root#./configure --with-libraries=/opt/csw/lib/:/usr/lib/ --with-includes=/opt/csw/include/:/usr/include/
checking build system type... i386-pc-solaris2.11
......
checking for onsgmls... no
checking for nsgmls... no
checking for openjade... no
checking for jade... no
checking for DocBook V4.2... no
checking for DocBook stylesheets... no
checking for collateindex.pl... no
checking for sgmlspl... no
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: creating src/interfaces/ecpg/include/ecpg_config.h
config.status: src/interfaces/ecpg/include/ecpg_config.h is unchanged
config.status: linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking ./src/backend/port/dynloader/solaris.c to src/backend/port/dynloader.c
config.status: linking ./src/backend/port/sysv_sema.c to src/backend/port/pg_sema.c
config.status: linking ./src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking ./src/backend/port/dynloader/solaris.h to src/include/dynloader.h
config.status: linking ./src/include/port/solaris.h to src/include/pg_config_os.h
config.status: linking ./src/makefiles/Makefile.solaris to src/Makefile.port


make 
make install

[gmg6p9aa:~/postgresql-8.3.3] root# mkdir /usr/local/pgsql/data (as root)
[gmg6p9aa:~/postgresql-8.3.3] root# sudo chown postgres:postgres /usr/local/pgsql/data/
[gmg6p9aa:~/postgresql-8.3.3] root# sudo su postgres -c "/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data"
[gmg6p9aa:~/postgresql-8.3.3] root# sudo su postgres -c "/usr/local/pgsql/bin/postgres -p 9999 -D /usr/local/pgsql/data"

&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-4628579031430770496?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/4628579031430770496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=4628579031430770496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/4628579031430770496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/4628579031430770496'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2008/08/install-postgresql-833-on-joyent.html' title='Install PostgreSQL 8.3.3 on Joyent OpenSolaris'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-256736560998805262</id><published>2008-07-17T19:39:00.001+09:00</published><updated>2008-07-17T19:39:00.599+09:00</updated><title type='text'>git-svn: Can't locate SVN/Core.pm</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;To import subversion repository to git, I get the following problem&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git-svn clone http://dev.com/code/example/trunk example
Can't locate SVN/Core.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl /opt/local/lib/perl5/5.8.8/darwin-2level /opt/local/lib/perl5/5.8.8 /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level /opt/local/lib/perl5/site_perl/5.8.8 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.8 /opt/local/lib/perl5/vendor_perl .) at /usr/local/bin/git-svn line 29.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Installing of the perl subversion binding solved this problem.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Felix:~/Developments sunfmin$ sudo port install p5-svn-simple
---&amp;gt;  Fetching subversion-perlbindings
---&amp;gt;  Attempting to fetch subversion-1.4.6.tar.bz2 from http://subversion.tigris.org//downloads/
---&amp;gt;  Verifying checksum(s) for subversion-perlbindings
---&amp;gt;  Extracting subversion-perlbindings
---&amp;gt;  Configuring subversion-perlbindings
---&amp;gt;  Building subversion-perlbindings with target swig-pl
---&amp;gt;  Staging subversion-perlbindings into destroot
---&amp;gt;  Installing subversion-perlbindings 1.4.6_0
---&amp;gt;  Activating subversion-perlbindings 1.4.6_0
---&amp;gt;  Cleaning subversion-perlbindings
---&amp;gt;  Fetching p5-svn-simple
---&amp;gt;  Attempting to fetch SVN-Simple-0.27.tar.gz from http://cpan.perl.org/authors/id/C/CL/CLKAO/
---&amp;gt;  Verifying checksum(s) for p5-svn-simple
---&amp;gt;  Extracting p5-svn-simple
---&amp;gt;  Configuring p5-svn-simple
---&amp;gt;  Building p5-svn-simple with target all
---&amp;gt;  Staging p5-svn-simple into destroot
---&amp;gt;  Installing p5-svn-simple 0.27_0
---&amp;gt;  Activating p5-svn-simple 0.27_0
---&amp;gt;  Cleaning p5-svn-simple
Felix:~/Developments sunfmin$
&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-256736560998805262?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/256736560998805262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=256736560998805262' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/256736560998805262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/256736560998805262'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2008/07/git-svn-can-locate-svncorepm.html' title='git-svn: Can&amp;#39;t locate SVN/Core.pm'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-367509232622544602</id><published>2008-07-04T21:12:00.001+09:00</published><updated>2008-07-04T21:12:37.560+09:00</updated><title type='text'>Install ruby-pg (PostgreSQL ruby driver) On Leopard</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;It is not so easy to install ruby-pg in Leopard&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Felix:~ sunfmin$ sudo gem install ruby-pg
Building native extensions.  This could take a while...
ERROR:  Error installing pg:
    ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install pg

        ===========   WARNING   ===========

        You are building this extension on OS X without setting the 
        ARCHFLAGS environment variable, and PostgreSQL does not appear 
        to have been built as a universal binary. If you are seeing this 
        message, that means that the build will probably fail.

        Try setting the environment variable ARCHFLAGS 
        to '-arch i386' before building.

        For example:
        (in bash) $ export ARCHFLAGS='-arch i386'
        (in tcsh) % setenv ARCHFLAGS '-arch i386'

        Then try building again.

        ===================================
        checking for main() in -lpq... yes
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for PQconnectionUsedPassword()... no
checking for PQisthreadsafe()... no
checking for PQprepare()... no
checking for PQexecParams()... no
checking for PQescapeString()... no
checking for PQescapeStringConn()... no
checking for lo_create()... no
checking for pg_encoding_to_char()... no
checking for PQsetClientEncoding()... no
creating Makefile

make
gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -DHAVE_LIBPQ_FE_H -DHAVE_LIBPQ_LIBPQ_FS_H -I/opt/local/include/postgresql82  -fno-common -arch ppc -arch i386 -Os -pipe -fno-common  -c compat.c
In file included from compat.c:16:
compat.h:38:2: error: #error PostgreSQL client version too old, requires 7.3 or later.
In file included from compat.c:16:
compat.h:121: error: redefinition of typedef 'PQnoticeReceiver'
/opt/local/include/postgresql82/libpq-fe.h:136: error: previous declaration of 'PQnoticeReceiver' was here
compat.h:125: error: redeclaration of enumerator 'PQERRORS_TERSE'
/opt/local/include/postgresql82/libpq-fe.h:97: error: previous definition of 'PQERRORS_TERSE' was here
compat.h:126: error: redeclaration of enumerator 'PQERRORS_DEFAULT'
/opt/local/include/postgresql82/libpq-fe.h:98: error: previous definition of 'PQERRORS_DEFAULT' was here
compat.h:128: error: redeclaration of enumerator 'PQERRORS_VERBOSE'
/opt/local/include/postgresql82/libpq-fe.h:100: error: previous definition of 'PQERRORS_VERBOSE' was here
compat.h:128: error: conflicting types for 'PGVerbosity'
/opt/local/include/postgresql82/libpq-fe.h:100: error: previous declaration of 'PGVerbosity' was here
compat.h:132: error: redeclaration of enumerator 'PQTRANS_IDLE'
/opt/local/include/postgresql82/libpq-fe.h:88: error: previous definition of 'PQTRANS_IDLE' was here
compat.h:133: error: redeclaration of enumerator 'PQTRANS_ACTIVE'
/opt/local/include/postgresql82/libpq-fe.h:89: error: previous definition of 'PQTRANS_ACTIVE' was here
compat.h:134: error: redeclaration of enumerator 'PQTRANS_INTRANS'
/opt/local/include/postgresql82/libpq-fe.h:90: error: previous definition of 'PQTRANS_INTRANS' was here
compat.h:135: error: redeclaration of enumerator 'PQTRANS_INERROR'
/opt/local/include/postgresql82/libpq-fe.h:91: error: previous definition of 'PQTRANS_INERROR' was here
compat.h:137: error: redeclaration of enumerator 'PQTRANS_UNKNOWN'
/opt/local/include/postgresql82/libpq-fe.h:93: error: previous definition of 'PQTRANS_UNKNOWN' was here
compat.h:137: error: conflicting types for 'PGTransactionStatusType'
/opt/local/include/postgresql82/libpq-fe.h:93: error: previous declaration of 'PGTransactionStatusType' was here
compat.h:142: error: conflicting types for 'PQtransactionStatus'
/opt/local/include/postgresql82/libpq-fe.h:258: error: previous declaration of 'PQtransactionStatus' was here
compat.h:143: error: conflicting types for 'PQparameterStatus'
/opt/local/include/postgresql82/libpq-fe.h:260: error: previous declaration of 'PQparameterStatus' was here
compat.h:157: error: conflicting types for 'PQsetErrorVerbosity'
/opt/local/include/postgresql82/libpq-fe.h:277: error: previous declaration of 'PQsetErrorVerbosity' was here
compat.h:169:2: error: #error unsupported postgresql version, requires 7.3 or later.
compat.c: In function 'PQsetClientEncoding':
compat.c:21: error: syntax error before '{' token
compat.c:282: error: storage class specified for parameter 'query'
compat.c:282: error: parameter 'query' is initialized
compat.c:286: error: syntax error before 'if'
compat.c:341: error: parameter 'target' is initialized
compat.c:341: error: 'to' undeclared (first use in this function)
compat.c:341: error: (Each undeclared identifier is reported only once
compat.c:341: error: for each function it appears in.)
compat.c:342: error: parameter 'remaining' is initialized
compat.c:342: error: 'length' undeclared (first use in this function)
compat.c:344: error: syntax error before 'while'
compat.c:396: error: syntax error before 'len'
compat.c:470: error: redefinition of parameter 'i'
compat.c:390: error: previous definition of 'i' was here
compat.c:473: error: syntax error before 'if'
In file included from compat.c:16:
compat.h:38:2: error: #error PostgreSQL client version too old, requires 7.3 or later.
In file included from compat.c:16:
compat.h:121: error: redefinition of typedef 'PQnoticeReceiver'
/opt/local/include/postgresql82/libpq-fe.h:136: error: previous declaration of 'PQnoticeReceiver' was here
compat.h:125: error: redeclaration of enumerator 'PQERRORS_TERSE'
/opt/local/include/postgresql82/libpq-fe.h:97: error: previous definition of 'PQERRORS_TERSE' was here
compat.h:126: error: redeclaration of enumerator 'PQERRORS_DEFAULT'
/opt/local/include/postgresql82/libpq-fe.h:98: error: previous definition of 'PQERRORS_DEFAULT' was here
compat.h:128: error: redeclaration of enumerator 'PQERRORS_VERBOSE'
/opt/local/include/postgresql82/libpq-fe.h:100: error: previous definition of 'PQERRORS_VERBOSE' was here
compat.h:128: error: conflicting types for 'PGVerbosity'
/opt/local/include/postgresql82/libpq-fe.h:100: error: previous declaration of 'PGVerbosity' was here
compat.h:132: error: redeclaration of enumerator 'PQTRANS_IDLE'
/opt/local/include/postgresql82/libpq-fe.h:88: error: previous definition of 'PQTRANS_IDLE' was here
compat.h:133: error: redeclaration of enumerator 'PQTRANS_ACTIVE'
/opt/local/include/postgresql82/libpq-fe.h:89: error: previous definition of 'PQTRANS_ACTIVE' was here
compat.h:134: error: redeclaration of enumerator 'PQTRANS_INTRANS'
/opt/local/include/postgresql82/libpq-fe.h:90: error: previous definition of 'PQTRANS_INTRANS' was here
compat.h:135: error: redeclaration of enumerator 'PQTRANS_INERROR'
/opt/local/include/postgresql82/libpq-fe.h:91: error: previous definition of 'PQTRANS_INERROR' was here
compat.h:137: error: redeclaration of enumerator 'PQTRANS_UNKNOWN'
/opt/local/include/postgresql82/libpq-fe.h:93: error: previous definition of 'PQTRANS_UNKNOWN' was here
compat.h:137: error: conflicting types for 'PGTransactionStatusType'
/opt/local/include/postgresql82/libpq-fe.h:93: error: previous declaration of 'PGTransactionStatusType' was here
compat.h:142: error: conflicting types for 'PQtransactionStatus'
/opt/local/include/postgresql82/libpq-fe.h:258: error: previous declaration of 'PQtransactionStatus' was here
compat.h:143: error: conflicting types for 'PQparameterStatus'
/opt/local/include/postgresql82/libpq-fe.h:260: error: previous declaration of 'PQparameterStatus' was here
compat.h:157: error: conflicting types for 'PQsetErrorVerbosity'
/opt/local/include/postgresql82/libpq-fe.h:277: error: previous declaration of 'PQsetErrorVerbosity' was here
compat.h:169:2: error: #error unsupported postgresql version, requires 7.3 or later.
compat.c: In function 'PQsetClientEncoding':
compat.c:21: error: syntax error before '{' token
compat.c:282: error: storage class specified for parameter 'query'
compat.c:282: error: parameter 'query' is initialized
compat.c:286: error: syntax error before 'if'
compat.c:341: error: parameter 'target' is initialized
compat.c:341: error: 'to' undeclared (first use in this function)
compat.c:341: error: (Each undeclared identifier is reported only once
compat.c:341: error: for each function it appears in.)
compat.c:342: error: parameter 'remaining' is initialized
compat.c:342: error: 'length' undeclared (first use in this function)
compat.c:344: error: syntax error before 'while'
compat.c:396: error: syntax error before 'len'
compat.c:470: error: redefinition of parameter 'i'
compat.c:390: error: previous definition of 'i' was here
compat.c:473: error: syntax error before 'if'
lipo: can't open input file: /var/tmp//ccxi5qM7.out (No such file or directory)
make: *** [compat.o] Error 1


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/pg-0.7.9.2008.03.18 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/pg-0.7.9.2008.03.18/ext/gem_make.out
Felix:~ sunfmin$ 



Felix:~ sunfmin$ sudo env ARCHFLAGS="-arch i386" gem install --remote ruby-pg
Building native extensions.  This could take a while...
Successfully installed ruby-pg-0.7.9.2008.01.28
1 gem installed
Installing ri documentation for ruby-pg-0.7.9.2008.01.28...
Installing RDoc documentation for ruby-pg-0.7.9.2008.01.28...
Felix:~ sunfmin$
&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-367509232622544602?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/367509232622544602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=367509232622544602' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/367509232622544602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/367509232622544602'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2008/07/install-ruby-pg-postgresql-ruby-driver.html' title='Install ruby-pg (PostgreSQL ruby driver) On Leopard'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-4346028744260073419</id><published>2008-06-20T18:09:00.002+09:00</published><updated>2008-06-20T18:32:03.457+09:00</updated><title type='text'>Tell postfix not to send email to local</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;We want to config the server can only send emails, can NOT receive emails from local or remote.
Because our domain is pointed to this server, But our email server is on Google Enterprise.
So before If we want to send email from the server, It first looks up locally, and send to local directly, So emails never get reach to Google.&lt;/p&gt;

&lt;p&gt;I tried:
    http://www.postfix.org/faq.html#null_client
But I seems not work.&lt;/p&gt;

&lt;p&gt;After check out the postfix log:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Jun 20 08:45:15 example.com postfix/pickup[21505]: [ID 197553 mail.info] 9EE3D43D17: uid=0 from=&amp;lt;root&amp;gt;
Jun 20 08:45:15 example.com postfix/cleanup[21511]: [ID 197553 mail.info] 9EE3D43D17: message-id=&amp;lt;20080620084515.9EE3D43D17@example.com&amp;gt;
Jun 20 08:45:15 example.com postfix/qmgr[21506]: [ID 197553 mail.info] 9EE3D43D17: from=&amp;lt;root@example.com&amp;gt;, size=294, nrcpt=1 (queue active)
Jun 20 08:45:15 example.com postfix/error[21509]: [ID 197553 mail.info] 9EE3D43D17: to=&amp;lt;theplant@example.com&amp;gt;, relay=none, delay=0, status=bounced (User unknown in virtual alias table)
Jun 20 08:45:15 example.com postfix/cleanup[21511]: [ID 197553 mail.info] 9FC7E43D19: message-id=&amp;lt;20080620084515.9FC7E43D19@example.com&amp;gt;
Jun 20 08:45:15 example.com postfix/qmgr[21506]: [ID 197553 mail.info] 9FC7E43D19: from=&amp;lt;&amp;gt;, size=1973, nrcpt=1 (queue active)
Jun 20 08:45:15 example.com postfix/error[21509]: [ID 197553 mail.info] 9FC7E43D19: to=&amp;lt;root@example.com&amp;gt;, relay=none, delay=0, status=bounced (User unknown in virtual alias table)
Jun 20 08:45:15 example.com postfix/qmgr[21506]: [ID 197553 mail.info] 9FC7E43D19: removed
Jun 20 08:45:15 example.com postfix/qmgr[21506]: [ID 197553 mail.info] 9EE3D43D17: removed
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Even you set&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; local_transport = error:local delivery is disabled
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But when you have alias&lt;em&gt;maps, alias&lt;/em&gt;database, virtual&lt;em&gt;alias&lt;/em&gt;maps.
Postfix will still try to find the alias name in local. So it fails when it can not find it.&lt;/p&gt;

&lt;p&gt;main.cf&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;myorigin = example.com
#relayhost = example.com
inet_interfaces = 127.0.0.1
#local_transport = error:local delivery is disabled
## -- Maps
#alias_maps = dbm:/opt/csw/etc/postfix/aliases
#alias_database = dbm:/opt/csw/etc/postfix/aliases
canonical_maps = dbm:/opt/csw/etc/postfix/canonical
recipient_canonical_maps = dbm:/opt/csw/etc/postfix/recipient_canonical
sender_canonical_maps = dbm:/opt/csw/etc/postfix/sender_canonical
#virtual_alias_maps = dbm:/opt/csw/etc/postfix/virtual
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;master.cf&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;discard   unix  -       -       n       -       -       discard
#local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
&lt;/code&gt;&lt;/pre&gt;

And Another thing, make sure your hostname is NOT your domain.
because It will check hostname first and mx record? I guess.

    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-4346028744260073419?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/4346028744260073419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=4346028744260073419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/4346028744260073419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/4346028744260073419'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2008/06/tell-postfix-not-to-send-email-to-local.html' title='Tell postfix not to send email to local'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-1475421823295898358</id><published>2008-03-03T15:31:00.001+09:00</published><updated>2008-03-03T15:31:43.151+09:00</updated><title type='text'>Install SSL for apache</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;h4&gt;Setup Certificate&lt;/h4&gt;

&lt;pre&gt;&lt;code&gt;# from: http://www.vanemery.com/Linux/Apache/apache-SSL.html
[root]# openssl genrsa -des3 -out my-ca.key 2048
[root]# openssl req -new -x509 -days 3650 -key my-ca.key -out my-ca.crt

# deleted -des3 to not using pass phrase
[root]# openssl genrsa -out mars-server.key 1024
[root]# openssl req -new -key mars-server.key -out mars-server.csr
[root]# openssl x509 -req -in mars-server.csr -out mars-server.crt -sha1 -CA my-ca.crt -CAkey my-ca.key -CAcreateserial -days 3650
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Setup Apache&lt;/h4&gt;

&lt;pre&gt;&lt;code&gt;# For no ssl
-bash-3.00$ more /opt/csw/apache2/etc/virtualhosts/yourserver.conf
&amp;lt;VirtualHost 8.17.170.154:80&amp;gt;
  ServerName youserver.com
  ServerAlias *.youserver.com
  DocumentRoot /home/youserver.com/app/current/public

  &amp;lt;Directory "/home/youserver.com/app/current/public/"&amp;gt;
  Options FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all
  &amp;lt;/Directory&amp;gt;

  &amp;lt;Proxy balancer://yourserver-mongrels&amp;gt;
    BalancerMember http://127.0.0.1:8000
    BalancerMember http://127.0.0.1:8001
    BalancerMember http://127.0.0.1:8002
    BalancerMember http://127.0.0.1:8003
  &amp;lt;/Proxy&amp;gt;

  ProxyPass /images !
  ProxyPass /javascripts !
  ProxyPass /stylesheets !
  ProxyPass / balancer://yourserver-mongrels/
  ProxyPassReverse / balancer://yourserver-mongrels/
  ProxyPreserveHost On
&amp;lt;/VirtualHost&amp;gt;

# For ssl
-bash-3.00$ more /opt/csw/apache2/etc/virtualhosts/yourserver-ssl.conf

&amp;lt;VirtualHost 8.17.170.154:443&amp;gt;
ServerName youserver.com
ServerAlias *.youserver.com
DocumentRoot /home/youserver.com/app/current/public

&amp;lt;Directory "/home/youserver.com/app/current/public/"&amp;gt;
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
&amp;lt;/Directory&amp;gt;

&amp;lt;Proxy balancer://yourserver-mongrels&amp;gt;
  BalancerMember http://127.0.0.1:8000
  BalancerMember http://127.0.0.1:8001
  BalancerMember http://127.0.0.1:8002
  BalancerMember http://127.0.0.1:8003
&amp;lt;/Proxy&amp;gt;

ProxyPass /images !
ProxyPass /javascripts !
ProxyPass /stylesheets !
ProxyPass / balancer://yourserver-mongrels/
ProxyPassReverse / balancer://yourserver-mongrels/
ProxyPreserveHost On

SSLEngine On
SSLCertificateFile /home/youserver.com/ssl/mars-server.crt
SSLCertificateKeyFile /home/youserver.com/ssl/mars-server.key
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-1475421823295898358?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/1475421823295898358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=1475421823295898358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/1475421823295898358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/1475421823295898358'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2008/03/install-ssl-for-apache.html' title='Install SSL for apache'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-2733690546449635094</id><published>2008-03-01T18:08:00.001+09:00</published><updated>2008-03-01T18:08:13.930+09:00</updated><title type='text'>Merb Console</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;Tried Merb Console&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;felix@Felix:~/Developments/kakei$ merb -i
 ~ loading gem 'activerecord' from config/init.rb:27 ...
 ~ loading gem 'merb_activerecord' from config/init.rb:27 ...
 ~ loading gem 'merb_rspec' from config/init.rb:36 ...
 ~ loading gem 'merb_helpers' from config/init.rb:39 ...
 ~ Loaded DEVELOPMENT Environment...
 ~ Connecting to database...
 ~ Compiling routes...
 ~ Using 'share-nothing' cookie sessions (4kb limit per client)
irb(main):035:0*
irb(main):036:0* merb
=&amp;gt; #&amp;lt;Merb::Rack::Console:0xb76f6604&amp;gt;
irb(main):037:0&amp;gt;
irb(main):038:0*
irb(main):039:0* merb.url(:payments)
=&amp;gt; "/payments"
irb(main):040:0&amp;gt; merb.url(:new_payment)
=&amp;gt; "/payments/new"
irb(main):041:0&amp;gt; merb.url(:delete_payment)
=&amp;gt; "/payments//delete"
irb(main):042:0&amp;gt; merb.url(:delete_payment, )
SyntaxError: compile error
(irb):42: syntax error, unexpected ')'
    from (irb):42
    from :0
irb(main):043:0&amp;gt; payment = Payment.find(1)
=&amp;gt; #&amp;lt;Payment id: 1, amount: 23423, paid_for: "34234", created_at: "2008-03-01 17:26:41"&amp;gt;
irb(main):044:0&amp;gt; merb.url(:delete_payment, payment)
=&amp;gt; "/payments/1/delete"
irb(main):045:0&amp;gt; merb.url(:edit_payment, payment)
=&amp;gt; "/payments/1/edit"
irb(main):046:0&amp;gt; merb.url(:as_payment, payment)
RuntimeError: Named route not found: as_payment
    from /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.1/lib/merb-core/dispatch/router.rb:90:in `generate'
    from /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.1/lib/merb-core/rack/adapter/irb.rb:14:in `url'
    from (irb):46
    from :0
irb(main):047:0&amp;gt; merb.url(:payment, payment)
=&amp;gt; "/payments/1"
irb(main):003:0* merb.show_routes
Named Routes
  new_payment: /payments/new
  edit_payment: /payments/:id/edit
  payment: /payments/:id
  delete_payment: /payments/:id/delete
  payments: /payments
  custom_payment: /payments/:action/:id
Anonymous Routes
  /payments/?(\.:format)?
  /payments/index(\.:format)?
  /payments/new
  /payments/?(\.:format)?
  /payments/:id(\.:format)?
  /payments/:id[;/]edit
  /payments/:id[;/]delete
  /payments/:id(\.:format)?
  /payments/:id(\.:format)?
  /:controller(/:action(/:id)?)?(\.:format)?
=&amp;gt; nil
&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-2733690546449635094?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/2733690546449635094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=2733690546449635094' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2733690546449635094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2733690546449635094'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2008/03/merb-console.html' title='Merb Console'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-1748600435018586046</id><published>2008-02-02T12:40:00.001+09:00</published><updated>2008-02-02T12:43:19.669+09:00</updated><title type='text'>Keep all my bash history commands</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;I like the bash history. because many command is difficult to remember when I want to use it next time.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;felix@Felix:~$ cd
felix@Felix:~$ echo "export HISTSIZE=999999999" &amp;gt;&amp;gt; .profile
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and then you can find you command by&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;felix@Felix:~$ history|grep git&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-1748600435018586046?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/1748600435018586046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=1748600435018586046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/1748600435018586046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/1748600435018586046'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2008/02/keep-all-my-bash-history-commands.html' title='Keep all my bash history commands'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-8753065077733298729</id><published>2008-01-06T20:04:00.001+09:00</published><updated>2008-01-06T20:13:26.149+09:00</updated><title type='text'>Use Ruby language power in command line</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;Task: Delete file that didn't added to subversion&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;svn st|grep ?
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then you can get all the files that not added to subversion
but the list is with a ?, so It's not easy to delete it with rm&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;felix@Felix:~/Developments/joblet$ svn st|grep ?
?      aaa
?      bbb
?      ccc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then I want to trim the ?, awk may simple do the task, but for those who don't know awk.
and instead we use Ruby for day to day work.&lt;/p&gt;

&lt;p&gt;Ruby gives you the way to do task on command line.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; felix@Felix:~/Developments/joblet$ svn st|grep ?|ruby -pe '$_ = $_[1..-1].strip + "\n"'
 aaa
 bbb
 ccc

felix@Felix:~/Developments/joblet$ rm `svn st|grep ?|ruby -pe '$_ = $_[1..-1].strip + "\n"'`

&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-8753065077733298729?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/8753065077733298729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=8753065077733298729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8753065077733298729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8753065077733298729'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2008/01/use-ruby-language-power-in-command-line.html' title='Use Ruby language power in command line'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-3380180757896088545</id><published>2007-12-13T13:25:00.001+09:00</published><updated>2007-12-13T13:25:43.073+09:00</updated><title type='text'>Give a ticket number to your subversion commit message when you are
using trac</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;If you give a number when you commit your changes to subversion&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    svn commit -m "Fixed Ticket #456"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;then Trac will connect the changeset to the Ticket, Wonderful feature, isn't it.&lt;/p&gt;

    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-3380180757896088545?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/3380180757896088545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=3380180757896088545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/3380180757896088545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/3380180757896088545'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/12/give-ticket-number-to-your-subversion.html' title='Give a ticket number to your subversion commit message when you are&#xA;using trac'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-5913880269578555480</id><published>2007-12-07T16:34:00.001+09:00</published><updated>2007-12-07T16:34:13.536+09:00</updated><title type='text'>Migrate PostgreSQL 8.1 Data to PostgreSQL 8.2</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;h4&gt;Install PSQL 8.2&lt;/h4&gt;

&lt;pre&gt;&lt;code&gt;Felix:~ sunfmin$ sudo port install postgresql82
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Dump all the PSQL 8.1 Databases to a file&lt;/h4&gt;

&lt;p&gt;Using The new installed PSQL 8.2 's pg_dumpall to dump all the PSQL 8.1 databases&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Felix:~ sunfmin$ /opt/local/lib/postgresql82/bin/pg_dumpall &amp;gt; ~/pg81_all_dump
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Initialize PSQL 8.2 Database instance&lt;/h4&gt;

&lt;pre&gt;&lt;code&gt;Felix:~/Developments sunfmin$ sudo su postgres -c '/opt/local/lib/postgresql82/bin/initdb -D /opt/local/var/db/postgresql82/defaultdb'
Password:
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

creating directory /opt/local/var/db/postgresql82/defaultdb ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 32MB/204800
creating configuration files ... ok
creating template1 database in /opt/local/var/db/postgresql82/defaultdb/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    /opt/local/lib/postgresql82/bin/postgres -D /opt/local/var/db/postgresql82/defaultdb
or
    /opt/local/lib/postgresql82/bin/pg_ctl -D /opt/local/var/db/postgresql82/defaultdb -l logfile start
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Start your database&lt;/h4&gt;

&lt;pre&gt;&lt;code&gt;Felix:~/Developments sunfmin$ sudo su postgres -c "/opt/local/lib/postgresql82/bin/pg_ctl -D /opt/local/var/db/postgresql82/defaultdb -l /opt/local/var/log/postgresql82/postgres.log start"
server starting
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You may encounter some problem like this following&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Felix:~/Developments sunfmin$ sudo su postgres /opt/local/lib/postgresql82/bin/postgres -D /opt/local/var/db/postgresql82/defaultdb
Password:
/opt/local/lib/postgresql82/bin/postgres: /opt/local/lib/postgresql82/bin/postgres: cannot execute binary file

Felix:~/Developments sunfmin$ sudo  /opt/local/lib/postgresql82/bin/postgres -D /opt/local/var/db/postgresql82/defaultdb
"root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise.  See the documentation for
more information on how to properly start the server.


Felix:~/Developments sunfmin$ psql
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Restore all the data&lt;/h4&gt;

&lt;pre&gt;&lt;code&gt;Felix:~ sunfmin$ /opt/local/lib/postgresql82/bin/psql -f pg81_all_dump template1 -U postgres
You are now connected to database "postgres".
SET
SET
SET
CREATE ROLE
ALTER ROLE
CREATE ROLE
ALTER ROLE
CREATE ROLE
ALTER ROLE
CREATE ROLE
ALTER ROLE
CREATE ROLE
ALTER ROLE
CREATE DATABASE
&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-5913880269578555480?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/5913880269578555480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=5913880269578555480' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/5913880269578555480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/5913880269578555480'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/12/migrate-postgresql-81-data-to.html' title='Migrate PostgreSQL 8.1 Data to PostgreSQL 8.2'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-4201023455023966809</id><published>2007-12-07T15:34:00.001+09:00</published><updated>2007-12-07T15:34:15.586+09:00</updated><title type='text'>Failed system call was shmget</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;When I try to setup PostgreSQL 8.2 on Mac OS X 10.4 , I get the following error.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Felix:~ sunfmin$ sudo su postgres -c '/opt/local/lib/postgresql82/bin/initdb -D /opt/local/var/db/postgresql82/defaultdb'
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

creating directory /opt/local/var/db/postgresql82/defaultdb ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers/max_fsm_pages ... 400kB/20000
creating configuration files ... ok
creating template1 database in /opt/local/var/db/postgresql82/defaultdb/base/1 ... FATAL:  could not create shared memory segment: Cannot allocate memory
DETAIL:  Failed system call was shmget(key=1, size=1646592, 03600).
HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space. To reduce the request size (currently 1646592 bytes), reduce PostgreSQL's shared_buffers parameter (currently 50) and/or its max_connections parameter (currently 10).
The PostgreSQL documentation contains more information about shared memory configuration.
child process exited with exit code 1
initdb: removing data directory "/opt/local/var/db/postgresql82/defaultdb"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Following
http://brilliantcorners.org/node/tag/osx&lt;/p&gt;

&lt;p&gt;I changed:
/etc/rc&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sysctl -w kern.sysv.shmmax=4194304 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=1024
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sysctl -w kern.sysv.shmmax=167772160 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=65536
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And Then the problem solved.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Felix:~/Developments sunfmin$ sudo su postgres -c '/opt/local/lib/postgresql82/bin/initdb -D /opt/local/var/db/postgresql82/defaultdb'
Password:
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

creating directory /opt/local/var/db/postgresql82/defaultdb ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 32MB/204800
creating configuration files ... ok
creating template1 database in /opt/local/var/db/postgresql82/defaultdb/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    /opt/local/lib/postgresql82/bin/postgres -D /opt/local/var/db/postgresql82/defaultdb
or
    /opt/local/lib/postgresql82/bin/pg_ctl -D /opt/local/var/db/postgresql82/defaultdb -l logfile start
&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-4201023455023966809?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/4201023455023966809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=4201023455023966809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/4201023455023966809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/4201023455023966809'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/12/failed-system-call-was-shmget.html' title='Failed system call was shmget'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-7861471423474987704</id><published>2007-12-03T16:10:00.001+09:00</published><updated>2007-12-03T16:28:40.700+09:00</updated><title type='text'>Update itself with single command</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;It is cool that like gem and MacPorts could update itself
with just a single command.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo gem update --system
sudo port selfupdate
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and also when you can not find software you want in port, don't forget to do a 
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
sudo port -d sync
&lt;/code&gt;&lt;/pre&gt;
    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-7861471423474987704?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/7861471423474987704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=7861471423474987704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/7861471423474987704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/7861471423474987704'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/12/update-itself-with-single-command.html' title='Update itself with single command'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-7135552888424890600</id><published>2007-12-01T20:50:00.001+09:00</published><updated>2007-12-02T13:58:40.733+09:00</updated><title type='text'>Write your blog in Markdown with Emacs and post it directly to Google
Blogger</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;For those who using Emacs, Markdown and Blogger&lt;/p&gt;

&lt;p&gt;You write your blog entry in Emacs and with Markdown format
Then you issue a &lt;code&gt;M-x blogger-post&lt;/code&gt; command in emacs, It convert
the markdown to html and post it to your Blogger blog.&lt;/p&gt;

&lt;h4&gt;How to Install&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;See &lt;a href='http://buzz.blogger.com/2007/03/emacs-client-for-blogger.html'&gt;An Emacs Client For Blogger&lt;/a&gt; to install g-client (You'd better check it out from repository)&lt;/li&gt;
&lt;li&gt;See &lt;a href='http://jrblevin.freeshell.org/software/markdown-mode/'&gt;Emacs markdown-mode&lt;/a&gt; to install Emacs markdown-mode&lt;/li&gt;
&lt;li&gt;Put the following script to your emacs load path&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;The code&lt;/h4&gt;

&lt;pre&gt;&lt;code&gt;(require 'gblogger)

(defvar markdown-blogger-new-entry-template
  "&amp;lt;entry xmlns='http://www.w3.org/2005/Atom'&amp;gt;
  &amp;lt;generator url=\"%s\"&amp;gt;%s&amp;lt;/generator&amp;gt;
  &amp;lt;author&amp;gt; &amp;lt;name&amp;gt;%s &amp;lt;/name&amp;gt; &amp;lt;/author&amp;gt;
  &amp;lt;title mode=\"escaped\" type=\"text/html\"&amp;gt;%s &amp;lt;/title&amp;gt;
  &amp;lt;content type='xhtml'&amp;gt;
    &amp;lt;div xmlns=\"http://www.w3.org/1999/xhtml\"&amp;gt;
%s
    &amp;lt;/div&amp;gt;
  &amp;lt;/content&amp;gt;
&amp;lt;/entry&amp;gt;"
  "Template for new Blogger entries.")

(defun blogger-post()
  (interactive)

  (markdown)
  (set-buffer (get-buffer "*markdown-output*"))

  (setq post-url "http://www\.blogger\.com/feeds/7841127/posts/default")
  (setq markdown-buffer (current-buffer))
  (setq markdown-content (buffer-string))

  (setq title (read-string "Title: "))

  (setq buffer (get-buffer-create "*markdown-blogger-post*"))

  (declare (special gblogger-auth-handle markdown-blogger-new-entry-template
                    gblogger-generator-name ))

  (g-auth-ensure-token gblogger-auth-handle)




  (set-buffer buffer)
  (erase-buffer)
  (insert (format markdown-blogger-new-entry-template
                  gblogger-generator-name gblogger-generator-name
                  "Felix Sun" title markdown-content))
  (switch-to-buffer buffer)
  (g-app-mode)

  (setq g-app-this-url post-url
        g-app-auth-handle gblogger-auth-handle
        g-app-publish-action 'g-app-post-entry)


  (g-app-publish)
)
&lt;/code&gt;&lt;/pre&gt;

    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-7135552888424890600?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/7135552888424890600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=7135552888424890600' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/7135552888424890600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/7135552888424890600'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/12/write-your-blog-in-markdown-with-emacs.html' title='Write your blog in Markdown with Emacs and post it directly to Google&#xA;Blogger'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-6016582877896687371</id><published>2007-12-01T13:55:00.001+09:00</published><updated>2007-12-01T13:58:24.606+09:00</updated><title type='text'>Posted from emacs</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;
&lt;p&gt;
You can do that also
&lt;/p&gt;

http://emacspeak.blogspot.com/2007/03/emacs-client-for-google-services.html
    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-6016582877896687371?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/6016582877896687371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=6016582877896687371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/6016582877896687371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/6016582877896687371'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/12/posted-from-emacs.html' title='Posted from emacs'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-1946880353333465678</id><published>2007-11-30T00:29:00.000+09:00</published><updated>2007-11-30T00:59:10.052+09:00</updated><title type='text'>Add code formatter to your blog</title><content type='html'>&lt;p&gt;
see: http://code.google.com/p/syntaxhighlighter/
&lt;/p&gt;

&lt;p&gt;
You could format ruby like this.
&lt;/p&gt;

&lt;pre name="code" class="Ruby"&gt;

describe RSpec do
  before(:each) do
    @rspec = RSpec.new
  end

  describe "at release 1.0.8" do
    before(:each) do
      @rspec.version = "1.0.8" 
    end

    it "should not support nested example groups" do
      @rspec.should_not support_nested_example_groups
    end
  end

  describe "at release 1.1.0" do
    before(:each) do
      @rspec.version = "1.1.0" 
    end

    it "should support nested example groups" do
      @rspec.should support_nested_example_groups
    end
  end
end

&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-1946880353333465678?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/1946880353333465678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=1946880353333465678' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/1946880353333465678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/1946880353333465678'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/11/describe-rspec-do-beforeeach-do-rspec.html' title='Add code formatter to your blog'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-5377007374867886742</id><published>2007-11-29T00:55:00.001+09:00</published><updated>2007-12-01T22:08:02.923+09:00</updated><title type='text'>Integrate your website with joblet seamlessly</title><content type='html'>&lt;p&gt;For most of website that integrated joblet like asoboo.
right now just link to http://asoboo.joblet.jp&lt;/p&gt;

&lt;p&gt;But you may not want your user go out of your own domain.
If you want to do so, You need to create a subdomain for you website,
because things like http://asoboo.com/jobs simple not very easy to
work. (all inside url of joblet is begain with / )&lt;/p&gt;

&lt;p&gt;So For Apache, create a virtual host&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ServerName jobs.asoboo.com

&amp;lt;Directory proxy:http://asoboo.joblet.jp&amp;gt;
    Order Allow,Deny
    Allow from all
&amp;lt;/Directory&amp;gt;

ProxyPass / http://asoboo.joblet.jp/
ProxyPassReverse  / http://asoboo.joblet.jp/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And Then you can point your browser to http://jobs.asoboo.com, :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-5377007374867886742?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/5377007374867886742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=5377007374867886742' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/5377007374867886742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/5377007374867886742'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/11/integrate-your-website-with-joblet.html' title='Integrate your website with joblet seamlessly'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-2383114743074906054</id><published>2007-10-27T13:50:00.001+09:00</published><updated>2007-10-27T13:50:13.383+09:00</updated><title type='text'>Different ps command in Solaris</title><content type='html'>What I am interresting is:&lt;p&gt; why /usr/ucb/ps command is having out put differnet than&lt;p&gt; /usr/bin/ps&lt;p&gt; I CAN&amp;#39;T run /usr/bin/ps axuwwww&lt;p&gt; but I can under /usr/ucb/ps&lt;p&gt; Or /usr/ucb/ps -ef does not work, but&lt;p&gt; /usr/bin/ps -ef does work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-2383114743074906054?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/2383114743074906054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=2383114743074906054' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2383114743074906054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2383114743074906054'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/10/different-ps-command-in-solaris.html' title='Different ps command in Solaris'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-8074806245230430551</id><published>2007-10-24T15:02:00.001+09:00</published><updated>2007-10-24T15:02:35.103+09:00</updated><title type='text'>Put 503 page for your rails application</title><content type='html'>Put&lt;p&gt;ErrorDocument 503 /503.html&lt;p&gt;in apache configuration for you rails application, because when you&lt;br&gt;deploy , mongrels may take some time to restart.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-8074806245230430551?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/8074806245230430551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=8074806245230430551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8074806245230430551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8074806245230430551'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/10/put-503-page-for-your-rails-application.html' title='Put 503 page for your rails application'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-8738122558377455643</id><published>2007-10-22T20:27:00.001+09:00</published><updated>2007-10-22T20:27:40.888+09:00</updated><title type='text'>Fwd: warning: already initialized constant OPTIONS</title><content type='html'>Something required can not be loaded in your environment file, or in plugins&lt;p&gt;=&amp;gt; Booting Mongrel (use &amp;#39;script/server webrick&amp;#39; to force WEBrick)&lt;br&gt;=&amp;gt; Rails application starting on &lt;a href="http://0.0.0.0:3000"&gt;http://0.0.0.0:3000&lt;/a&gt;&lt;br&gt;=&amp;gt; Call with -d to detach&lt;br&gt;=&amp;gt; Ctrl-C to shutdown server&lt;br&gt;** Starting Mongrel listening at 0.0.0.0:3000&lt;br&gt;** Starting Rails with development environment...&lt;br&gt;Exiting&lt;br&gt;/usr/lib/ruby/gems/1.8/gems/rails-1.2.4/lib/commands/servers/mongrel.rb:15:&lt;br&gt;warning: already initialized constant OPTIONS&lt;br&gt;/usr/lib/ruby/gems/1.8/gems/rails-1.2.4/lib/commands/servers/mongrel.rb:18:&lt;br&gt;undefined method `options&amp;#39; for []:Array (NoMethodError)&lt;br&gt;        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in&lt;br&gt;`gem_original_require&amp;#39;&lt;br&gt;        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in&lt;br&gt;`require&amp;#39;&lt;br&gt;        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.3/lib/active_support/dependencies.rb:495:in&lt;br&gt;`require&amp;#39;&lt;br&gt;        from /usr/lib/ruby/gems/1.8/gems/activesupport-&lt;br&gt;1.4.3/lib/active_support/dependencies.rb:342:in `new_constants_in&amp;#39;&lt;br&gt;        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.3/lib/active_support/dependencies.rb:495:in&lt;br&gt;`require&amp;#39;&lt;br&gt;        from /usr/lib/ruby/gems/1.8/gems/rails- 1.2.4/lib/commands/server.rb:39&lt;br&gt;        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in&lt;br&gt;`gem_original_require&amp;#39;&lt;br&gt;        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in&lt;br&gt;`require&amp;#39;&lt;br&gt;        from ./script/server:3&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-8738122558377455643?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/8738122558377455643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=8738122558377455643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8738122558377455643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8738122558377455643'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/10/fwd-warning-already-initialized.html' title='Fwd: warning: already initialized constant OPTIONS'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-2000503969883533184</id><published>2007-10-22T20:15:00.001+09:00</published><updated>2007-10-22T20:15:45.313+09:00</updated><title type='text'>Merge a branch r123:569 to trunk subversion</title><content type='html'>svn log --stop-on-copy &lt;a href="http://svnserver/code/some_project/branches/release_12"&gt;http://svnserver/code/some_project/branches/release_12&lt;/a&gt;&lt;br&gt;&lt;br&gt;to find out when the branch created, you know that at 942 revision, you created the branch &lt;br&gt;&lt;br&gt;svn merge &lt;a href="http://svnserver/code/some_project/branches/release_12"&gt;http://svnserver/code/some_project/branches/release_12&lt;/a&gt; -r942:HEAD .&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-2000503969883533184?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/2000503969883533184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=2000503969883533184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2000503969883533184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2000503969883533184'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/10/merge-branch-r123569-to-trunk.html' title='Merge a branch r123:569 to trunk subversion'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-8924691200263631697</id><published>2007-10-21T12:23:00.001+09:00</published><updated>2007-10-21T12:23:54.840+09:00</updated><title type='text'>Run single test passed, but run all tests as a whole will fail that test</title><content type='html'>In my situation&lt;br&gt;&lt;br&gt;I didn&amp;#39;t load required fixture on that failed test when run all tests as a whole&lt;br&gt;when I run that special single test, because you already run all tests before, &lt;br&gt;and in some tests It loaded the fixture that you special test needed, and didn&amp;#39;t clear &lt;br&gt;test database when you only run that special test. So It pass.&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-8924691200263631697?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/8924691200263631697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=8924691200263631697' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8924691200263631697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8924691200263631697'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/10/run-single-test-passed-but-run-all.html' title='Run single test passed, but run all tests as a whole will fail that test'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-7781084520722558786</id><published>2007-10-11T20:11:00.001+09:00</published><updated>2007-10-11T20:11:31.994+09:00</updated><title type='text'>Read Gmane mailing list with Emacs</title><content type='html'>C-u M-x gnus			   # Start gnus and prompt for server&lt;p&gt;news.gmane.org			   # The Gmane nntp server&lt;p&gt;A A			           # List all groups&lt;p&gt;C-s scheme.chicken &amp;lt;RET&amp;gt; &amp;lt;RET&amp;gt; 	   # Find the chicken Scheme list&lt;p&gt;from: &lt;a href="http://dharmatech.onigirihouse.com/emacs-gnus-gmane"&gt;http://dharmatech.onigirihouse.com/emacs-gnus-gmane&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-7781084520722558786?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/7781084520722558786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=7781084520722558786' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/7781084520722558786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/7781084520722558786'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/10/read-gmane-mailing-list-with-emacs.html' title='Read Gmane mailing list with Emacs'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-2024364217535150008</id><published>2007-10-06T01:03:00.001+09:00</published><updated>2007-10-06T01:03:24.606+09:00</updated><title type='text'>Using copy to combine binary file</title><content type='html'>copy /B somefile.zip.aa+somefile.zip.ab somefile.zip&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-2024364217535150008?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/2024364217535150008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=2024364217535150008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2024364217535150008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2024364217535150008'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/10/using-copy-to-combine-binary-file.html' title='Using copy to combine binary file'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-7464101953235443261</id><published>2007-09-28T20:08:00.001+09:00</published><updated>2007-09-28T20:08:30.483+09:00</updated><title type='text'>Outbound Port25 Blocking</title><content type='html'>sudo postconf -e relayhost=mail.qb3.so-net.ne.jp&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-7464101953235443261?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/7464101953235443261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=7464101953235443261' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/7464101953235443261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/7464101953235443261'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/09/outbound-port25-blocking.html' title='Outbound Port25 Blocking'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-2383286406573384797</id><published>2007-09-20T18:29:00.001+09:00</published><updated>2007-09-20T18:29:30.747+09:00</updated><title type='text'>FInd slow actions in a Rails app</title><content type='html'># Show a list of actions sorted by time taken. Useful for finding slow actions.&lt;br&gt;cat log/development.log | awk &amp;#39;/Completed/ { print &amp;quot;[&amp;quot; $3 &amp;quot;] - &amp;quot; $0 }&amp;#39;&lt;br&gt;| sort -nr&lt;p&gt;from: &lt;a href="http://snippets.dzone.com/posts/show/4440"&gt;http://snippets.dzone.com/posts/show/4440&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-2383286406573384797?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/2383286406573384797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=2383286406573384797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2383286406573384797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2383286406573384797'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/09/find-slow-actions-in-rails-app.html' title='FInd slow actions in a Rails app'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-6135776917823876062</id><published>2007-09-13T13:20:00.001+09:00</published><updated>2007-09-13T13:20:30.913+09:00</updated><title type='text'>Don't override to_json like this</title><content type='html'>I don&amp;#39;t know why our project override this method&lt;br&gt;class String&lt;br&gt;  def to_json&lt;br&gt;    &amp;quot;&amp;#39;#{self}&amp;#39;&amp;quot;&lt;br&gt;  end&lt;br&gt;end&lt;p&gt;Because of this , The RJS totally don&amp;#39;t work&lt;br&gt;and You get &amp;quot;unterminated string literal&amp;quot; because of  not escaped javascript.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-6135776917823876062?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/6135776917823876062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=6135776917823876062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/6135776917823876062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/6135776917823876062'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/09/dont-override-tojson-like-this.html' title='Don&apos;t override to_json like this'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-5582202943368901895</id><published>2007-09-12T12:45:00.001+09:00</published><updated>2007-09-12T12:45:14.168+09:00</updated><title type='text'>Show all files in the Finder</title><content type='html'>Show all files in the Finder&lt;p&gt;Open Terminal, type this command, and press Enter:&lt;p&gt;defaults write com.apple.Finder AppleShowAllFiles YES&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-5582202943368901895?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/5582202943368901895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=5582202943368901895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/5582202943368901895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/5582202943368901895'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/09/show-all-files-in-finder.html' title='Show all files in the Finder'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-66132503184977319</id><published>2007-09-09T18:47:00.001+09:00</published><updated>2007-09-09T18:47:12.505+09:00</updated><title type='text'>Ways to run ruby tests</title><content type='html'>1. rake&lt;br&gt;2. rake -T test&lt;br&gt;3. ruby test/unit/product_test.rb&lt;br&gt;4. ruby test/unit/product_test.rb -v&lt;br&gt;5. ruby test/unit/product_test.rb -n /create/ -v&lt;br&gt;6. rake test:units TESTOPTS=&amp;quot;-v -n/create/&amp;quot;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-66132503184977319?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/66132503184977319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=66132503184977319' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/66132503184977319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/66132503184977319'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/09/ways-to-run-ruby-tests.html' title='Ways to run ruby tests'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-1862896191914637875</id><published>2007-09-09T11:38:00.001+09:00</published><updated>2007-09-09T11:38:12.008+09:00</updated><title type='text'>Possibility with scoped_proxy</title><content type='html'>class User &amp;lt; ActiveRecord::Base&lt;br&gt;   scoped_proxy :admins, :find =&amp;gt; { :conditions =&amp;gt; [&amp;#39;role = ?&amp;#39;, &amp;#39;super_user&amp;#39;] }&lt;br&gt;   scoped_proxy :has_login do |login|&lt;br&gt;     { :find =&amp;gt; { :conditions =&amp;gt; [&amp;#39;login = ?&amp;#39;, login] } }&lt;br&gt;   end&lt;br&gt;   scoped_proxy :no_op do&lt;br&gt;     nil&lt;br&gt;   end&lt;br&gt; end&lt;p&gt; # This gives you the first administrator of the system&lt;br&gt; User.admins.find(:first)&lt;br&gt; # This counts the administrators&lt;br&gt; User.admins.count&lt;p&gt; # All users with a given login&lt;br&gt; User.has_login(&amp;#39;foo&amp;#39;).count&lt;br&gt; User.has_login(&amp;#39;foo&amp;#39;).find(:all, :order =&amp;gt; &amp;#39;created_at desc&amp;#39;)&lt;p&gt; # And finally, I give you the no op&lt;br&gt; User.no_op.find(:all) # =&amp;gt; User.find(:all)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-1862896191914637875?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/1862896191914637875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=1862896191914637875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/1862896191914637875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/1862896191914637875'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/09/possibility-with-scopedproxy.html' title='Possibility with scoped_proxy'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-8123814482626539467</id><published>2007-09-06T22:43:00.001+09:00</published><updated>2007-09-06T22:43:58.415+09:00</updated><title type='text'>psql: FATAL: IDENT authentication failed for user</title><content type='html'>Everytime I log in using normal user, I got this message:&lt;p&gt;$ psql -U gateadmin template1&lt;br&gt;psql: FATAL: IDENT authentication failed for user &amp;quot;gateadmin&amp;quot;&lt;p&gt;Why?&lt;p&gt;It looks like you would rather use password authentication than the&lt;br&gt;default IDENT-based auth (it&amp;#39;s default in Debian distro of postgres&lt;br&gt;anyway). IDENT will only let you in when you do *not* use -U, ie,&lt;br&gt;your postgres user name is the same as your Unix user name. Change&lt;br&gt;this in pg_hba.conf, and don&amp;#39;t forget to SIGHUP or restart the&lt;br&gt;postmaster afterwards.&lt;p&gt;regards, tom lane&lt;p&gt;Solution:&lt;p&gt;Just modify pg_hba.conf like this (change to trust)&lt;p&gt;local all trust&lt;br&gt;host all 127.0.0.1 255.255.255.255 trust&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-8123814482626539467?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/8123814482626539467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=8123814482626539467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8123814482626539467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8123814482626539467'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/09/psql-fatal-ident-authentication-failed.html' title='psql: FATAL: IDENT authentication failed for user'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-4089151475192193917</id><published>2007-07-31T10:37:00.001+09:00</published><updated>2007-07-31T10:37:31.906+09:00</updated><title type='text'>Unit test with transaction in rails</title><content type='html'>&amp;nbsp; uses_transaction :test_something_with_transaction&lt;br&gt;&amp;nbsp; def test_something_with_transaction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br&gt;&amp;nbsp; end &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-4089151475192193917?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/4089151475192193917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=4089151475192193917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/4089151475192193917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/4089151475192193917'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/07/unit-test-with-transaction-in-rails.html' title='Unit test with transaction in rails'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-2305749011514340948</id><published>2007-07-24T17:53:00.001+09:00</published><updated>2007-07-24T17:53:07.965+09:00</updated><title type='text'>missing key: categories: Cannot read the portsdb!</title><content type='html'>[asoboo@turbine-02 /usr/local/sites/asoboo.com/current]$ sudo&lt;br&gt;portupgrade -a&lt;br&gt;[Updating the portsdb &amp;lt;format:bdb_btree&amp;gt; in /usr/ports ... - 17433&lt;br&gt;port entries found&lt;br&gt;.........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000....&lt;br&gt;..... done]&lt;br&gt;[missing key: categories] [Updating the portsdb &amp;lt;format:bdb_btree&amp;gt; in&lt;br&gt;/usr/ports ... - 17433 port entries found&lt;br&gt;.........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000....&lt;br&gt;..... done]&lt;br&gt;missing key: categories: Cannot read the portsdb!&lt;br&gt;/usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:567:in `open_db&amp;#39;:&lt;br&gt;database file error (PortsDB::DBError)&lt;br&gt;        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:736:in `port&amp;#39;&lt;br&gt;        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:924:in&lt;br&gt;`all_depends_list&amp;#39;&lt;br&gt;        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:915:in `tsort_build&amp;#39;&lt;br&gt;        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:907:in `each&amp;#39;&lt;br&gt;        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:907:in `tsort_build&amp;#39;&lt;br&gt;        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:929:in `sort_build&amp;#39;&lt;br&gt;        from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:933:in `sort_build!&amp;#39;&lt;br&gt;        from /usr/local/sbin/portupgrade:694:in `main&amp;#39;&lt;br&gt;        from /usr/local/lib/ruby/1.8/optparse.rb:755:in `initialize&amp;#39;&lt;br&gt;        from /usr/local/sbin/portupgrade:210:in `new&amp;#39;&lt;br&gt;        from /usr/local/sbin/portupgrade:210:in `main&amp;#39;&lt;br&gt;        from /usr/local/sbin/portupgrade:1981&lt;p&gt;&lt;br&gt;portupgrade moved from /usr/ports/sysutils/portupgrade to&lt;br&gt;/usr/ports/ports-mgmt/portupgrade, one way to fix this is:&lt;p&gt;cd /usr/ports/ports-mgmt/portupgrade&lt;br&gt;make clean all install&lt;p&gt;Or I think portupgrade -f portupgrade might do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-2305749011514340948?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/2305749011514340948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=2305749011514340948' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2305749011514340948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2305749011514340948'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/07/missing-key-categories-cannot-read.html' title='missing key: categories: Cannot read the portsdb!'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-2220778751778817441</id><published>2007-07-23T16:01:00.001+09:00</published><updated>2007-07-23T16:01:37.202+09:00</updated><title type='text'>spawn-fcgi.c.211: child exited with: 127, Unknown error: 127</title><content type='html'># ./script/process/spawner fcgi -e staging -p 7000 -i 5&lt;br&gt;=&amp;gt; Starting FCGI dispatchers&lt;br&gt;Checking if something is already running on 0.0.0.0:7000...NO&lt;br&gt;Starting dispatcher on port: 0.0.0.0:7000&lt;br&gt;exec: /usr/local/sites/somesite/releases/20070723060143/public/dispatch.fcgi:&lt;br&gt;not found&lt;br&gt;spawn-fcgi.c.211: child exited with: 127, Unknown error: 127&lt;p&gt;&lt;br&gt;fixed by changing dispatch.fcgi&lt;p&gt;#!/opt/local/bin/ruby&lt;p&gt;to&lt;p&gt;#!/usr/local/bin/ruby&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-2220778751778817441?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/2220778751778817441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=2220778751778817441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2220778751778817441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2220778751778817441'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/07/spawn-fcgic211-child-exited-with-127.html' title='spawn-fcgi.c.211: child exited with: 127, Unknown error: 127'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-7366840847912392367</id><published>2007-07-23T15:44:00.001+09:00</published><updated>2007-07-23T15:44:41.315+09:00</updated><title type='text'>/tmp/502/nl.uu.phil.SSHAgent.socket (Errno::ENOENT)</title><content type='html'>ssh login when Capistrano deployment failed with that message. Running&lt;br&gt;(on Mac OS):&lt;p&gt;$ ssh-agent bash&lt;br&gt;$ ssh-add&lt;br&gt;and then running cap tasks fixed the problem for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-7366840847912392367?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/7366840847912392367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=7366840847912392367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/7366840847912392367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/7366840847912392367'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/07/tmp502nluuphilsshagentsocket.html' title='/tmp/502/nl.uu.phil.SSHAgent.socket (Errno::ENOENT)'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-5818230511054321047</id><published>2007-07-23T13:39:00.001+09:00</published><updated>2007-07-23T13:39:40.391+09:00</updated><title type='text'>undefined method 'gem' for main:Object</title><content type='html'>gem update --system&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-5818230511054321047?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/5818230511054321047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=5818230511054321047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/5818230511054321047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/5818230511054321047'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/07/undefined-method-gem-for-mainobject.html' title='undefined method &apos;gem&apos; for main:Object'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-2093648581123705562</id><published>2007-07-22T15:44:00.001+09:00</published><updated>2007-07-22T15:44:19.517+09:00</updated><title type='text'>Kill all processes with full command name and args</title><content type='html'>sunfmin@sunfmin-laptop:~$ pgrep -f &amp;quot;ssh -L 8080:google.com:80 sunfmin@localhost&amp;quot;&lt;br&gt;sunfmin@sunfmin-laptop:~$ pkill -f &amp;quot;ssh -L 8080:google.com:80 sunfmin@localhost&amp;quot;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-2093648581123705562?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/2093648581123705562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=2093648581123705562' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2093648581123705562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2093648581123705562'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/07/kill-all-processes-with-full-command.html' title='Kill all processes with full command name and args'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-5296319036769477618</id><published>2007-07-12T19:03:00.001+09:00</published><updated>2007-07-12T19:03:46.588+09:00</updated><title type='text'>link folder to external repository [ svn propedit svn:externals vendor ]</title><content type='html'>&lt;span style="font-family: courier new,monospace;"&gt;export SVN_EDITOR=&amp;quot;mate -w&amp;quot;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;svn propedit svn:externals vendor &lt;/span&gt;&lt;br&gt;&lt;br&gt;and input like the following to the popped editor&lt;br&gt;&lt;br&gt;&lt;span style="font-family: courier new,monospace;"&gt;rails &lt;a href="http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-3"&gt;http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-3 &lt;/a&gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;radiant &lt;a href="http://dev.radiantcms.org/svn/radiant/tags/rel_0-6-2/radiant/"&gt;http://dev.radiantcms.org/svn/radiant/tags/rel_0-6-2/radiant/ &lt;/a&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;this would make the folder like this.&lt;br&gt;&lt;span style="font-family: courier new,monospace;"&gt;vendor&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt; &amp;nbsp;&amp;nbsp;|--rails&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;&amp;nbsp;&amp;nbsp;|--radiant&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-5296319036769477618?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/5296319036769477618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=5296319036769477618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/5296319036769477618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/5296319036769477618'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/07/link-folder-to-external-repository-svn.html' title='link folder to external repository [ svn propedit svn:externals vendor ]'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-3308338321572763219</id><published>2007-07-12T10:55:00.001+09:00</published><updated>2007-07-12T10:55:50.121+09:00</updated><title type='text'>The ownership of a file may only be altered by a super-user</title><content type='html'>chown -R www:www sandbox/&lt;br&gt;chown: sandbox//conf/authz: Operation not permitted&lt;br&gt;chown: sandbox//conf/passwd: Operation not permitted&lt;br&gt;chown: sandbox//conf/svnserve.conf: Operation not permitted&lt;br&gt;chown: sandbox//conf: Operation not permitted &lt;br&gt;chown: sandbox//dav/activities.dir: Operation not permitted&lt;br&gt;chown: sandbox//dav/activities.pag: Operation not permitted&lt;br&gt;&lt;br&gt;-&amp;gt;&lt;br&gt;&lt;br&gt;sudo chown -R www:www sandbox/&lt;br&gt;&lt;br&gt;The ownership of a file may only be altered by a super-user for obvious &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; security reasons.&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-3308338321572763219?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/3308338321572763219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=3308338321572763219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/3308338321572763219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/3308338321572763219'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/07/ownership-of-file-may-only-be-altered.html' title='The ownership of a file may only be altered by a super-user'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-3631135077810739549</id><published>2007-07-09T23:53:00.001+09:00</published><updated>2007-07-09T23:53:38.677+09:00</updated><title type='text'>Let BitTorrent works on Ubuntu with Azureus Client.</title><content type='html'>&lt;span class="gmail_quote"&gt;&lt;/span&gt;1. Set Local ASDL Router to allow NAT&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Access &lt;a href="http://192.168.0.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"&gt;192.168.0.1&lt;/a&gt; or something&lt;br&gt;2. Let Ubuntu to allow the port Azureus uses. &lt;br&gt;#iptables -I INPUT -p tcp --dport 57656 -j ACCEPT&lt;br&gt;#iptables -I INPUT -p udp --dport 57656 -j ACCEPT &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-3631135077810739549?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/3631135077810739549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=3631135077810739549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/3631135077810739549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/3631135077810739549'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/07/let-bittorrent-works-on-ubuntu-with.html' title='Let BitTorrent works on Ubuntu with Azureus Client.'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-6124637930474420604</id><published>2007-07-07T17:40:00.001+09:00</published><updated>2007-07-07T17:40:21.141+09:00</updated><title type='text'>Rails Development On Ubuntu</title><content type='html'>h1. Installation&lt;br&gt;&lt;br&gt;Switch to &lt;span style="font-weight: bold;"&gt;root&lt;/span&gt; user&lt;br&gt;&lt;br&gt;h2. Install Ruby, Rails&lt;br&gt;&lt;br&gt;&lt;span style="font-family: courier new,monospace;"&gt;apt-get install ruby rdoc irb libyaml-ruby libzlib-ruby ri &lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;apt-get install rubygems&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt; gem update --system&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;gem install rails -y&lt;/span&gt;&lt;br&gt;&lt;br&gt;h2. Install Mongrel, MySQL&lt;br&gt;&lt;br&gt;&lt;span style="font-family: courier new,monospace;"&gt; apt-get install mysql-server-5.0&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;apt-get install build-essential&lt;/span&gt; &lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;apt-get install ruby1.8-dev&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt; gem install mongrel&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;gem install mysql&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;h2. Install emacs(snapshot 22.0), ruby-mode, emacs-rails&lt;br&gt;&lt;br&gt; &lt;br&gt;&lt;span style="font-family: courier new,monospace;"&gt;gem install emacs-snapshot&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;cd&amp;nbsp; $HOME/.emacs.d/&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt; &lt;span style="font-family: courier new,monospace;"&gt;svn co &lt;a href="http://svn.ruby-lang.org/repos/ruby/trunk/misc/"&gt;http://svn.ruby-lang.org/repos/ruby/trunk/misc/&lt;/a&gt; ruby&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt; &lt;span style="font-family: courier new,monospace;"&gt;svn co svn://rubyforge.org/var/svn/emacs-rails/trunk rails&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Add this code in $HOME/.emacs&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;span style="font-family: courier new,monospace;"&gt;(setq load-path (cons &amp;quot;~/.emacs.d/ruby&amp;quot; load-path)) &lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;(setq load-path (cons &amp;quot;~/.emacs.d/rails&amp;quot; load-path))&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt; &lt;span style="font-family: courier new,monospace;"&gt;(require &amp;#39;rails)&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;h2. Resources&lt;br&gt;&lt;br&gt;&lt;a href="https://help.ubuntu.com/community/RubyOnRails"&gt;Install Rails On Ubuntu&lt;/a&gt;&lt;br&gt;&lt;a href="http://dima-exe.ru/rails-on-emacs"&gt; Rails On Emacs&lt;/a&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-6124637930474420604?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/6124637930474420604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=6124637930474420604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/6124637930474420604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/6124637930474420604'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/07/rails-development-on-ubuntu.html' title='Rails Development On Ubuntu'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-4404391406549200286</id><published>2007-06-11T11:35:00.001+09:00</published><updated>2007-06-19T17:22:57.749+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><title type='text'>Fix [ruby: no such file to load -- ubygems (LoadError)] in E-TextEditor</title><content type='html'> Go to the cygwin bash prompt.  If you don&amp;#39;t know how to get there, use Start -&amp;gt; Run -&amp;gt; c:\cygwin\cygwin.bat. &lt;br&gt;  &lt;br&gt; Type: &lt;br&gt; echo unset RUBYOPT &amp;gt;&amp;gt; .bashrc &lt;br&gt;  &lt;br&gt; Type: &lt;br&gt; . .bashrc &lt;br&gt;  &lt;br&gt; Type: &lt;br&gt; irb &lt;br&gt;  &lt;br&gt; If you see: &lt;br&gt; irb(main):001:0&amp;gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-4404391406549200286?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/4404391406549200286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=4404391406549200286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/4404391406549200286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/4404391406549200286'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/06/fix-ruby-no-such-file-to-load-ubygems.html' title='Fix [ruby: no such file to load -- ubygems (LoadError)] in E-TextEditor'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-6980723445779143796</id><published>2007-04-27T20:49:00.001+09:00</published><updated>2007-06-19T17:22:57.749+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><title type='text'>Input Japanese with WATIR</title><content type='html'>&lt;pre&gt;One more tip. You better use&lt;br&gt;   $ie.text_field(:name,&amp;#39;txtPcode&amp;#39;).value = &amp;#39;KANJI&amp;#39;&lt;br&gt;instead of &lt;br&gt;   $ie.text_field(:name,&amp;#39;txtPcode&amp;#39;).set(&amp;#39;KANJI&amp;#39;) &lt;br&gt;&lt;br&gt;TextField#set method fails on japanese characters. &lt;br&gt;&lt;/pre&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-6980723445779143796?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/6980723445779143796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=6980723445779143796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/6980723445779143796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/6980723445779143796'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/04/input-japanese-with-watir.html' title='Input Japanese with WATIR'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-3252820084629200934</id><published>2007-04-17T15:17:00.001+09:00</published><updated>2007-04-17T15:17:13.949+09:00</updated><title type='text'>Debug with Eclipse and Tomcat</title><content type='html'>&lt;div&gt;Add the following line to&amp;nbsp;startup.bat&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;set CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005&lt;br&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;Eclipse&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;Add &amp;lt;Remote Java Application&amp;gt;&lt;/div&gt; &lt;div&gt;Host:localhost, Port 5005&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-3252820084629200934?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/3252820084629200934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=3252820084629200934' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/3252820084629200934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/3252820084629200934'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/04/debug-with-eclipse-and-tomcat.html' title='Debug with Eclipse and Tomcat'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-8081244260946329159</id><published>2007-03-23T17:45:00.001+09:00</published><updated>2007-06-19T17:23:21.306+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='office'/><title type='text'>You have Office, You have Tools to Edit Database through ODBC - MSQRY32.EXE</title><content type='html'>&lt;div&gt;C:\Program Files\Microsoft Office\OFFICE11\MSQRY32.EXE&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;メニュー&lt;/div&gt; &lt;div&gt;レコード　−＞　編集の許可&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-8081244260946329159?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/8081244260946329159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=8081244260946329159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8081244260946329159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8081244260946329159'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/03/you-have-office-you-have-tools-to-edit.html' title='You have Office, You have Tools to Edit Database through ODBC - MSQRY32.EXE'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-8593243185723705139</id><published>2007-03-02T14:02:00.001+09:00</published><updated>2007-03-02T14:02:35.172+09:00</updated><title type='text'>Archive My Directory for Mediamax - Less than 10M per file ;-)</title><content type='html'>&lt;p&gt;&lt;font face="courier new,monospace"&gt;winrar_path = &amp;quot;C:/sunfmin/Programs/WinRAR&amp;quot;&lt;br&gt;rar_root_path = &amp;quot;C:/sunfmin/Install/Books&amp;quot;&lt;br&gt;#Mb&lt;br&gt;split_size =&amp;nbsp;8 #Mb&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="courier new,monospace"&gt;#============================================&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="courier new,monospace"&gt;require &amp;#39;find&amp;#39;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="courier new,monospace"&gt;split_size_byte = split_size * 1024 * 1024&lt;br&gt;Find.find(rar_root_path) do |f| &lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="courier new,monospace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if File.file?(f) and File.size(f) &amp;gt; split_size_byte&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dirname = File.dirname(f)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dir.chdir(dirname)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_name = File.basename(f)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="courier new,monospace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rar_file_name = file_name[0, file_name.rindex(&amp;#39;.&amp;#39;)] + &amp;quot;.rar&amp;quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; winrar_exe = winrar_path + &amp;quot;/Rar.exe a -o+ -v#{split_size}m \&amp;quot;#{rar_file_name}\&amp;quot; \&amp;quot;#{file_name}\&amp;quot;&amp;quot; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts &amp;quot;==========================================================&amp;quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IO.popen(winrar_exe) do |out| &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts &amp;quot;OOOOO======&amp;gt;&amp;gt;&amp;gt; #{rar_file_name}&amp;quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts  out.readlines&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;font face="courier new,monospace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br&gt;end&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-8593243185723705139?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/8593243185723705139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=8593243185723705139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8593243185723705139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/8593243185723705139'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/03/archive-my-directory-for-mediamax-less.html' title='Archive My Directory for Mediamax - Less than 10M per file ;-)'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-6896702750117481309</id><published>2007-02-20T18:34:00.001+09:00</published><updated>2007-06-19T17:23:21.306+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='office'/><title type='text'>CSE＋PostgreSQL問題</title><content type='html'>&lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;現象１：&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;&lt;em&gt;DBエラー詳細：&lt;br&gt;FATAL: datamase &amp;quot;&amp;quot;test&amp;quot;&amp;quot; does not exist&lt;/em&gt;&lt;br&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;回答１：&lt;/div&gt; &lt;div&gt;下記のURLで公開されている「日本語Windows版 libpq」入れなおしたところ&lt;br&gt;&lt;a href="http://www.interwiz.koganei.tokyo.jp/software/PostgreSQL/libpq-6.5jp.zip"&gt;http://www.interwiz.koganei.tokyo.jp/software/PostgreSQL/libpq-6.5jp.zip&lt;/a&gt;&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt; &lt;div&gt;現象２：&lt;/div&gt;&lt;/div&gt; &lt;div&gt;&lt;em&gt;fe_sendauth: authentication type 5 not supported&lt;br&gt;&lt;/em&gt;&lt;/div&gt; &lt;div&gt;回答２：&lt;/div&gt; &lt;div&gt; &lt;p&gt;install_dir\data\pg_hba.confを開いて&lt;/p&gt; &lt;p&gt;# IPv4 local connections:&lt;br&gt;host&amp;nbsp;&amp;nbsp;&amp;nbsp; all&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; all&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://127.0.0.1/32"&gt;127.0.0.1/32&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; md5&lt;/p&gt; &lt;p&gt;↓&lt;/p&gt; &lt;p&gt;# IPv4 local connections:&lt;br&gt;host&amp;nbsp;&amp;nbsp;&amp;nbsp; all&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; all&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://127.0.0.1/32"&gt;127.0.0.1/32&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trust&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-6896702750117481309?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/6896702750117481309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=6896702750117481309' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/6896702750117481309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/6896702750117481309'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/02/csepostgresql.html' title='CSE＋PostgreSQL問題'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-2875254801624281775</id><published>2007-02-13T15:15:00.001+09:00</published><updated>2007-06-19T17:23:21.307+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='office'/><title type='text'>移動またはコピーしようとしている数式またはシートには、移動またはコピー先のワークシートに既にある名前'●●●'が含まれています。この名前を使用しますか？……</title><content type='html'>上記のような現象であるとしても、定義された名前が存在してこそ。
&lt;p&gt;元となるブックで定義があるのではないかと推測します。覚えがなくても。
まずは下記は確認されましたか？
＞名前定義の確認は元のブックの全てのシートで使用状況も含めて行ってください。
不都合の起こるほうのブックを調べても解決にはなりません。
　
確認のためにコピー（移動)元のブックで下記のプロシージャを実行してみるのも
良いかもしれません。（アクティブなブックが対象になります)
　
Sub NameListPrint()
    Dim i As Long
    Dim Sh As Worksheet
    Set Sh = Worksheets.Add
    With ActiveWorkbook
        For i = 1 To .Names.Count
            Sh.Cells(i, 1).Value = .Names(i).Name
            Sh.Cells(i, 2).Value = "'" &amp;amp; .Names(i).RefersTo
        Next i
    End With
End Sub
　
名前定義があれば挿入されたシートに定義状況が列記されます。
あとは、下記で一気に名前定義を削除。
（これもアクティブなブックが対象)
　
Sub NamesDelete()
    Dim i As Long
    With ActiveWorkbook
        For i = .Names.Count To 1 Step -1
            .Names(i).Delete
        Next i
    End With
End Sub
　
マクロを使う以外では、
「問題となる名前が名前定義ダイアログボックスでも発見できないときは
挿入＞名前＞定義　で一度名前を（適当でよいので）定義してみて、
それを削除するとエラーが出なくなる」
という情報もあったけど、現象そのものが再現ができないので未確認。

&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-2875254801624281775?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/2875254801624281775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=2875254801624281775' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2875254801624281775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2875254801624281775'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/02/blog-post.html' title='移動またはコピーしようとしている数式またはシートには、移動またはコピー先のワークシートに既にある名前&apos;●●●&apos;が含まれています。この名前を使用しますか？……'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-2853479707496084128</id><published>2007-02-11T22:28:00.001+09:00</published><updated>2007-06-19T17:23:40.726+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Install languages (Chinese, Japanese, Korean) on Fedora 6</title><content type='html'>&lt;p&gt;After you install finished, remeber to restart.
&lt;/p&gt;&lt;p&gt;For Fedora Core 4, 5 and 6, the packages are fonts-Japanese, fonts-Chinese, and fonts-Korean. The command to enable these fonts is&lt;/p&gt; &lt;pre&gt;&lt;span style="font-size:130%;"&gt;yum install fonts-japanese fonts-chinese fonts-korean


&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-2853479707496084128?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/2853479707496084128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=2853479707496084128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2853479707496084128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/2853479707496084128'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/02/install-languages-chinese-japanese.html' title='Install languages (Chinese, Japanese, Korean) on Fedora 6'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7841127.post-730066066293568413</id><published>2007-01-04T20:57:00.001+09:00</published><updated>2007-01-04T20:57:43.870+09:00</updated><title type='text'>Change my ip config between office and home</title><content type='html'>Execute an bat is more convenient than open Internet Protocol(TCP/IP) Properties dialog to change ip config again and again. &lt;br&gt;&lt;ul&gt;&lt;li&gt;SetOfficeIP.bat &lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: courier new,monospace;"&gt;netsh interface ip set address name=&amp;quot;Local Area Connection&amp;quot; source=static addr= &lt;a href="http://172.16.96.158"&gt;172.16.96.158&lt;/a&gt; mask=&lt;a href="http://255.255.255.0"&gt;255.255.255.0&lt;/a&gt;&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;netsh interface ip set address name=&amp;quot;Local Area Connection&amp;quot; gateway= &lt;a href="http://172.16.96.254"&gt;172.16.96.254&lt;/a&gt; gwmetric=0&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;netsh interface ip set dns name=&amp;quot;Local Area Connection&amp;quot; source=static addr= &lt;a href="http://172.16.8.3"&gt;172.16.8.3&lt;/a&gt; register=PRIMARY&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;netsh interface ip add dns name=&amp;quot;Local Area Connection&amp;quot; addr= &lt;a href="http://172.16.8.13"&gt;172.16.8.13&lt;/a&gt; index=2&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;netsh interface ip set wins name=&amp;quot;Local Area Connection&amp;quot; source=static addr=none &lt;/span&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;&lt;ul&gt;&lt;li&gt;SetHomeIP.bat&amp;nbsp; &lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: courier new,monospace;"&gt;netsh interface ip set address name=&amp;quot;Local Area Connection&amp;quot; source=dhcp&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt; &lt;span style="font-family: courier new,monospace;"&gt;netsh interface ip set dns name=&amp;quot;Local Area Connection&amp;quot; source=dhcp register=PRIMARY&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt; netsh interface ip set wins name=&amp;quot;Local Area Connection&amp;quot; source=dhcp&lt;/span&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7841127-730066066293568413?l=sunfmin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sunfmin.blogspot.com/feeds/730066066293568413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7841127&amp;postID=730066066293568413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/730066066293568413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7841127/posts/default/730066066293568413'/><link rel='alternate' type='text/html' href='http://sunfmin.blogspot.com/2007/01/change-my-ip-config-between-office-and.html' title='Change my ip config between office and home'/><author><name>Felix Sun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
