さくらインターネットにerubyを入れるメモ

configre.rb

> ./configure.rb --prefix=/home/hohi/local --enable-shared --with-charset=UTF-8

configure.rbの修正

$XLDFLAGSのところでエラーが出るので、その近辺をコメントアウト。

#$XLDFLAGS = CONFIG["XLDFLAGS"]
#$XLDFLAGS.gsub!(/-L\./, "")
#if /mswin32/ !~ RUBY_PLATFORM
#  $XLDFLAGS += " -L$(libdir)"
#elsif RUBY_VERSION >= "1.8"
#  $XLDFLAGS += " #{CONFIG['LIBPATHFLAG'] % '$(libdir)'}"
#end

Makefileの修正

LDFLAGS = -L.  -rdynamic -lpthread
mandir = $(DESTDIR)/home/xxxx/local/man

libruby*を /home/xxxx/local/lib にコピー

> cp /usr/local/lib/libruby18* ~/local/lib

make, make install

> make
> make install

cgiとして稼動させる

> cp erby ~/www/cgi-bin/eruby.cgi

.htaccess

AddType application/x-httpd-eruby .erb
Action  application/x-httpd-eruby /cgi-bin/eruby.cgi

Adsense広告