rails-3.1.0をcygwinでやるメモ

sqlite

sqlite-develをsetup.exeでいれとく

javascript engine

なんとなくspidermonkeyにする。
http://ftp.mozilla.org/pub/mozilla.org/js/
から
js-1.7.0.tar.gz
をダウンロードする。

$ cd /usr/local/src
$ wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
$ tar xzf js-1.7.0.tar.gz
$ cd js/src
$ make -f Makefile.ref OS_ARCH=Linux LD=gcc
$ cp cp Linux_All_DBG.OBJ/js.exe /usr/local/bin/

railsを使うシェルに環境変数をセットする

export EXECJS_RUNTIME=SpiderMonkey
Ruby version	1.9.3 (i386-cygwin)
RubyGems version	1.8.23
Rack version	1.3
Rails version	3.1.0
JavaScript Runtime	SpiderMonkey
Active Record version	3.1.0
Action Pack version	3.1.0
Active Resource version	3.1.0
Action Mailer version	3.1.0
Active Support version	3.1.0
Middleware	ActionDispatch::Static
Rack::Lock
#<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x80ef9ba8>
Rack::Runtime
Rack::MethodOverride
Rails::Rack::Logger
ActionDispatch::ShowExceptions
ActionDispatch::RemoteIp
Rack::Sendfile
ActionDispatch::Reloader
ActionDispatch::Callbacks
ActiveRecord::ConnectionAdapters::ConnectionManagement
ActiveRecord::QueryCache
ActionDispatch::Cookies
ActionDispatch::Session::CookieStore
ActionDispatch::Flash
ActionDispatch::ParamsParser
ActionDispatch::Head
Rack::ConditionalGet
Rack::ETag
ActionDispatch::BestStandardsSupport
Application root	/cygdrive/c/work/_rails/demo
Environment	development
Database adapter	sqlite3
Database schema version	0