404 Not Found
The requested URL /user/thankyou.php was not found on this server.
The requested URL /user/thankyou.php was not found on this server.
./monetdb-install.sh --enable-sql --enable-xquery --enable-geom --prefix=/usr/local
Successfully installed MonetDB in /usr/local/bin
You can start using MonetDB/SQL by starting
/usr/local/bin/merovingian
> swig MapiLib.ruby.i
> ruby extconf.rb
>
> make
> make install (you should typically have superuser rights for this one)
MapiLib.ruby_wrap.c:122:17: error: tcl.h:
与えられた「競技課題」を読んで、下記の作業を行う。
A.ハードウェアパフォーマンスの最適化のためのBIOS設定等
B.LANケーブルの製作
C.Linux(Debian)によるサーバ構築作業およびネットワーク構築作業
D.MS-Windows 2003 Serverによるサーバ構築作業
E.ネットワーク機器の設定(Linuxサーバもルータとして使用する可能性あり)
rsync --iconv=UTF-8-MAC,UTF-8 -u -a --progress ~/Documents/{work,private} debian:Documents --backup-dir=~/tmp --delete --exclude ".DS_Store" --exclude ".com.apple.timemachine.supported" --exclude "SyncToy_*.dat"
rsync --iconv=UTF8-MAC,UTF8 -u -a --progress loon3:Documents/{work,private} ~/Documents --delete --exclude ".DS_Store" --exclude ".com.apple.timemachine.supported" --exclude "SyncToy_*.dat"
環境はetch上のvzctl(3.0.11-13).これがやってみたらえらい簡単で拍子ぬけした次第.というわけで今その他の作業をしているのだが忘れるまえにメモ
etchにminimalからイメージをつくる
$ sudo vzctl create 1002 --ostemplate debian-4.0-i386-minimal --hostname araki2
Creating VPS private area: /var/lib/vz/private/1002
Performing postcreate actions
VPS private area was created
IPアドレスを設定.bridgeを手で用意したりトンネル設定する必要もない.
$ sudo vzctl set 1002 --ipadd 210.157.x.y --nameserver 210.157.x.z --save
/homeをmountする.
vzctl start 1002時に/homeがmountされるように,/etc/vz/conf/1002.mountを
#!/bin/sh
mount --bind /home /var/lib/vz/root/1002/home
uid,gidをvipwとvigwしてhostにあわせた.
/etc/vz/conf/1002.umountも用意してみたんだが,どうもいらんようであります.
donrailsがうごいてるdonrails.araki.netではruby1.8.5で動いているので問題ないのだが,ノートの上のsidではrubyが1.8.7にあがったようで,rails2.0.2+ruby1.8.7でtestを通らなくなった.
まずひとつ目はtruncate(/var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/text_helper.rb)を見てみる.
def truncate(text, length = 30, truncate_string = "...")
if text.nil? then return end
l = length - truncate_string.chars.length
(text.chars.length > length ? text.chars[0...l] + truncate_string : text).to_s
end
どうやらtext.chars.lengthというのを中で使っていて,ruby1.8.7ではtext.chars.lengthがつかえない.これはので,text.chars.to_a.lengthとすれば回避できた.1.8.7で,Enumerable::Enumerator を返すようになったのが問題なのかな.
irb(main):001:0> "hoge".chars.length
NoMethodError: undefined method `length' for #<enumerable::enumerator:0xb7be8c70>
from (irb):1
irb(main):002:0> "hoge".chars.to_a.length
=> 4
irb(main):003:0> "hoge".length
=> 4
というかんじ.はて.etchではどうかとおもったが,
irb(main):001:0> "hoge".chars.length
NoMethodError: undefined method `chars' for "hoge":String
from (irb):1
irb(main):002:0> "hoge".chars.to_a.length
NoMethodError: undefined method `chars' for "hoge":String
from (irb):2
from :0
irb(main):003:0> "hoge".length
=> 4
irb(main):004:0> RUBY_VERSION
=> "1.8.5"
あれれ.しかしどっちにしろ"hoge".lengthですむのになんでString.charsなってんだろ.国際化対応のせいなのかなあ..よーわからん.世にはこんなパッチを出している人もいるようで. http://www.ruby-mine.de/assets/2007/12/31/ruby-19-on-rails-fixes.diff
手元ではrails2.1.0 + ruby1.8.7でやる時期がきたのかもしれない.