1:Update package repository.

 sudo apt-get update

2:Install git and Curl.

    Git:是一个简单,快速,高效的版本控制系统。(对于安装ruby on rails 环境没有关系,只是为了在以后的开发过程中进行版本控制的时候使用。)

Curl:是一个根据web协议获取文件的简单命令行工具。

 sudo apt-get install git
sudo apt-get install curl

3:Install RVM and Dependencies. 

 curl -L get.rvm.io | bash -s stable

 load the RVM

 source ~/.rvm/scripts/rvm

    Then install additional dependencies specified by the RVM

 sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

4:Installing Javascript Runtime  参考:https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

 sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

5:Install Ruby

 rvm install 2.0.0

Then select the Ruby version you want to use

 rvm use 2.0.0 --default

在此处出现如下问题:

 steven@ubuntu:/usr$ rvm use 2.0.0 --default
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.

然后执行如下命令:

 /bin/bash --login

解决此问题。

  You can check the version of ruby

 ruby -v 

输出结果

 ruby 2.0.0p247 (2013-06-27 revision 41674) [i686-linux]

6:Install Rails

 gem install rails

7:test

 

 steven@ubuntu:/usr/RubyProject$ rails new demo
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
........
 steven@ubuntu:/usr/RubyProject/demo$ rails server
=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2013-10-28 21:45:41] INFO WEBrick 1.3.1
[2013-10-28 21:45:41] INFO ruby 2.0.0 (2013-06-27) [i686-linux]
[2013-10-28 21:45:41] INFO WEBrick::HTTPServer#start: pid=23094 port=3000 Started GET "/" for 127.0.0.1 at 2013-10-28 21:46:26 -0700
Processing by Rails::WelcomeController#index as HTML
Rendered /home/steven/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/templates/rails/welcome/index.html.erb (2.7ms)
Completed 200 OK in 41ms (Views: 20.2ms | Ac


最新文章

  1. javascript基本对象
  2. 转载:《TypeScript 中文入门教程》 14、输入.d.ts文件
  3. NEC学习 ---- 模块 -简易文字链接列表
  4. [转载]ExtJs4 笔记(9) Ext.Panel 面板控件、 Ext.window.Window 窗口控件、 Ext.container.Viewport 布局控件
  5. TYVJ P1004 滑雪 Label:记忆化搜索
  6. JAVA NIO系列(三) Buffer 解读
  7. ASP.NET26个性能优化方法
  8. HDU 1863 畅通工程(最小生成树,prim)
  9. C#操作Json(转)
  10. 什么是Activity、生命周期
  11. 【转】Install libimobiledevice on Mac OSX
  12. 如何在java注解中加入原生html标签内容
  13. ABP官方文档翻译 4.3 校验数据传输对象
  14. Hadoop下WordCount程序
  15. Android 音视频开发(六): MediaCodec API 详解
  16. 学习笔记DL005:线性相关、生成子空间,范数,特殊类型矩阵、向量
  17. 获取ScrollView ListView的当前位置的百分比
  18. BZOJ1117 [POI2009]救火站Gas 贪心
  19. Python基础整理
  20. Linux内核及分析 第一周 计算机是如何工作的?

热门文章

  1. CodeForces 781D Axel and Marston in Bitland DP
  2. Python中str、list、numpy分片操作
  3. Centos7 使用 Supervisor 守护进程 Celery
  4. loj2537 「PKUWC 2018」Minimax
  5. log4j2用asyncRoot配置异步日志是如何使用disruptor
  6. Spider_Man_6 の Scrapy(未完待续)
  7. C# 调试之 Debug.WriteLine()、Trace.WriteLine()
  8. SDRAM学习(二)之初始化
  9. 【Part1】用JS写一个Blog(node + vue + mongoDB)
  10. selenium webdriver——控制浏览器