MoinMoin - UnicodeDecodeError

2006. 6. 19. 14:06

모인모인 사용시 UnicodeDecodeError가 발생하는 경우 페이지가 제대로 안열리는 경우가 생길수 있다.

이때 몇몇 파일에서 except 처리를 해주면 잘 나타나게 되는 경우도 있으니 아래 파일들을 변경해보자.

~/site-packages/MoinMoin/logfile/editlog.py

<code>
try:
hostname = socket.gethostbyaddr(host)[0]
- except socket.error:
+ hostname = unicode(hostname, config.charset)
+ except (socket.error, UnicodeError), err:
hostname = host

remap_chars = {u'\t': u' ', u'\r': u' ', u'\n': u' ',}
</code>

~/site-packages/MoinMoin/logfile/logfile.py 48 line 근처.

<code>

# Decode lines after offset in file is calculated
try:
self.lines = [unicode(line, config.charset) for line in self.lines]
except UnicodeError:
self.lines = [unicode(line, "iso-8859-1") for line in self.lines]

</code>

,

WindowsXP + RadRails + MySQL scaffold error fix tip.

2006. 4. 25. 06:48

In case of using the RadRails IDE on WindowsXP with mysql. If yougot an error message like this 'uninnitialize constant Mysql' whencommand with 'ruby script/generate scaffold Xxxx'.

I don't know exactly why occured this type of error.

To fix it, you must do the following:

1. Goto your mysql home\bin directory : C:\mysql\bin

2. There is only one DLL file. File name is libmySQL.dll.

3. Copy libmySQL.dll file to C:\Windows directory.

All done. Happy Rails ~~

,

subversion: Subversion FAQ

2005. 10. 27. 13:45

CVS to SVN 변환중 여러가지 문제점에 봉착했다...
관련 내용을 정리하기에 앞서서 SVN 저장소를 생성하는데 한동안 고민하던 문제가 역시나 subversion 사이트에는 FAQ 로 올라와 있길레 반가운 맘에 샤삭.

음... 마구잡이 될때까지 해보는 것도 그만해야하나보다... 이런 해결법에 너무나 익숙해져 있어서 큰일이란 생각마져 드는 순간이다 ㅠ.ㅠ 이런.

[참고글]
Subversion 에서 멀티 프로젝트 저장소 구성관련 참고글 http://subversion.tigris.org/faq.html#multi-proj

하나의 저장소에 여러 서브 프로젝트를 생성하는 법

$ svnadmin create /repo/svn
$ svn mkdir file:///repo/svn/projA
$ svn mkdir file:///repo/svn/projB
$ svn mkdir file:///repo/svn/projC

저장소 자체를 프로젝트 별로 분리하는 법

$ mkdir /repo/svn
$ svnadmin create /repo/svn/projA
$ svnadmin create /repo/svn/projB
$ svnadmin create /repo/svn/projC

,