2009年3月20日金曜日

Ruby1.9.1p0のインストール

1.8と同居のために--prefixを使用

#Mac OS Xにはwgetがないので
curl -o ruby-1.9.1-p0.tar.gz -L ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz
tar zxf ruby-1.9.1-p0.tar.gz
cd ruby-1.9.1-p0
./configure --prefix=/usr/local/ruby1.9.1
make -j3
sudo make install
毎回フルパス指定はめんどいので...
vim ~/.bash_profile
alias ruby191="/usr/local/ruby1.9.1/bin/ruby"
alias gem191="/usr/local/ruby1.9.1/bin/gem"
alias irb191="/usr/local/ruby1.9.1/bin/irb"
:wq
source ~/.bash_profile

ruby191 -v # ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0]

makeの時に-jN(Nは数字)のオプションを入れると並列処理でコンパイルが速くなります

make testでfailedが1つありました。エラーも1つありました(><)

※責任は負いかねます。自己責任でどうぞ

やりたかったRuby1.9がこれでMacBookでも遊べるようになる!Merbいれてみよ〜 DataMapperも1.9compatibleだっけ?

merbインストール失敗

Dopin:ruby-1.9.1-p0 Dopin$ sudo /usr/local/ruby1.9.1/bin/gem install merb --no-ri --no-rdoc
Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
ERROR:  Error installing merb:
 ERROR: Failed to build gem native extension.

/usr/local/ruby1.9.1/bin/ruby extconf.rb install merb --no-ri --no-rdoc
creating Makefile

make
gcc -I. -I/usr/local/ruby1.9.1/include/ruby-1.9.1/i386-darwin9.6.0 -I/usr/local/ruby1.9.1/include/ruby-1.9.1/ruby/backward -I/usr/local/ruby1.9.1/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -O2 -g -Wall -Wno-parentheses -pipe -fno-common -Wall  -o parser.o -c parser.c
parser.rl:2:16: error: re.h: No such file or directory
In file included from parser.rl:3:
/usr/local/ruby1.9.1/include/ruby-1.9.1/ruby/backward/st.h:2:2: warning: #warning use "ruby/st.h" instead of bare "st.h"
parser.rl: In function ‘cParser_initialize’:
parser.rl:499: error: ‘struct RHash’ has no member named ‘tbl’
parser.rl:511: error: ‘struct RHash’ has no member named ‘tbl’
parser.rl:518: error: ‘struct RHash’ has no member named ‘tbl’
make: *** [parser.o] Error 1


Gem files will remain installed in /usr/local/ruby1.9.1/lib/ruby/gems/1.9.1/gems/json-1.1.3 for inspection.
Results logged to /usr/local/ruby1.9.1/lib/ruby/gems/1.9.1/gems/json-1.1.3/ext/json/ext/parser/gem_make.out

Help me!(T_T)

0 件のコメント: