Install Ruby 1.9.2 (from source) and Rails 3.0.1 on Ubuntu 10.10 & Debian6

原文:http://www.giantflyingsaucer.com/blog/?p=1883

本人在Debian6上实验安装成功



Install Ruby 1.9.2 (from source) and Rails 3.0.1 on Ubuntu 10.10

Although I believe using RVM is a better way to install and manage Ruby on Ubuntu (see my article on how to do that), you can however just install Ruby from source code. Today I’ll go over the steps to do that as well as installing Rails 3.0.1 and SQLite.


I will be installing Ruby 1.9.2 on a clean Ubuntu 10.10 system. The first thing is to install all the required libraries:

$ sudo apt-get update
$ sudo apt-get install build-essential zlib1g zlib1g-dev libreadline5 libreadline5-dev libssl-dev

Grab the source code from the Ruby FTP site and adjust the version number as newer builds are released into the stable tree:

$ mkdir ruby-src && cd ruby-src
$ wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p0.tar.gz
$ tar -zxvf ruby-1.9.2-p0.tar.gz && cd ruby-1.9.2-p0
$ ./configure
$ make && sudo make install

Verify that the correct Ruby version is now running:

$ ruby -v

Expected output:

Since RubyGems already comes with Ruby 1.9.2 we can install Rails 3.0.1 (without the documentation) like this:

$ gem update --system
$ sudo gem install rails --no-rdoc --no-ri

Verify the correct Rails version was installed:

$ rails -v

Expected output:

Install SQLite and the SLQite ruby binding (without the documentation):

$ sudo apt-get install sqlite3 libsqlite3-dev
$ sudo gem install sqlite3-ruby --no-rdoc --no-ri

Verify the correct SQLite version was installed:

$ sqlite3 --version

Expected output:

List and verify your local Gems:

$ gem list --local

You are now ready to build Ruby on Rails 3 web apps.



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值