ruby のインストール

ubuntu には ruby1.8,ruby1.9 が同居、ActionResource系なども2つずつ入っていて・・・
えいやとばかりにこれを削除し、


$ apt-get remove たくさん
ruby となの付くものをすべて削除しました。
ふー。すっきり。

  • さて改めて、ruby 1.9.3 と rails 3 をインストール。


# cd /usr/local/src
# wget http://.../ruby-1.9.3-p125.tar.gz
# tar zxvf ruby-1.9.3-p125.tar.gz
# cd ruby-1.9.3-p125
# ./configure --prefix=/usr/local/ruby
# make
# make install
もし既存のものが残っていても --prefix=/usr/local/ruby としとけば大丈夫。
/etc/bash.bashrc に以下を追加。

export PATH=/usr/local/buby/bin:$PATH
これで環境が整いました。
昨日smbで取ってきていた、ディレクトリに移動し

$ rails s
=> Booting WEBrick
=> Rails 3.2.2 application starting in production on http://0.0.0.0:80
=> Call with -d to detach
=> Ctrl-C to shutdown server
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from at /xxxxx/config/environment.rb:5)
[2012-04-13 10:25:41] INFO WEBrick 1.3.1
[2012-04-13 10:25:41] INFO ruby 1.9.3 (2012-02-16) [x86_64-linux]
[2012-04-13 10:25:41] INFO WEBrick::HTTPServer#start: pid=23694 port=80
やっときた。