Ruby1.9.2 On Rails3.0.0

Ruby1.9.2 On Rails3.0.0

sudo aptitude install bison
sudo aptitude install libmysqlclient-dev
sudo aptitude install libxml2-dev libxslt-dev

1. Install ruby 1.9.2 and rails3 - In rvm

You should install the git or ruby & & gem

1) Install rvm with Git

> Bash <<(curl

2) Install rvm with gem

> Sudo gem install rvm

> Rvm-install

3) Add this line to the end of. Bashrc:
[[-S "$ HOME / .rvm / scripts / rvm"]] & & source "$ HOME / .rvm / scripts / rvm"

The above will make the environment correct for all new terminal windows. In order to make the environment correct for the current terminal, execute this:
source "$ HOME / .rvm / scripts / rvm"

4) Install ruby 1.9.2

> Rvm install 1.9.2
> Rvm 1.9.2
> Ruby-v

5) Install rails3 and dependences

> Gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n
> Gem install rails

6) Install rspec 2.0.0beta

> Gem install rspec - prerelease
> Gem install rspec-rails - prerelease


Hopefully everything worked:

> Ruby-v

ruby 1.9.2p0

> Rails - version

Rails 3.0.0

Switching back to your system Ruby

> Rvm system

Back to your Rails3.0 environment

> Rvm 1.9.2

Use your RVM environment as your Default

> Rvm 1.9.2 - default

2. Create a new app

> Rails new AC_rails3-d mysql

> Cd AC_rails3

> Bundle install

> Rails server

3. Rspec

To configure your app to use rspec-rails, add a declaration to your Gemfile.
If you are using Bundler's grouping feature in your Gemfile, be sure to include
rspec-rails in the: development group as well as the: test group so that you
can access its generators and rake tasks.

# (RAILS_PATH) / Gemfile

group: development,: test do
gem "rspec-rails", "> = 2.0.0.beta.19"
gem "webrat"

Be sure to run the following command in each of your Rails apps if you're

> Script / rails generate rspec: install

You should set config, let it autoload lib.

config / application.rb

config.autoload_paths + =% W (# (config.root) / lib)

4. RESTful_authentication For Rails3

分类:Ruby 时间:2010-08-31 人气:222
blog comments powered by Disqus


  • In Ruby on Rails Rake Tutorial (turn) 2010-10-09

    Original: Ruby on Rails Rake Tutorial (aka. How rake turned Me into an Alcoholic) Introduction: As a rails developer, you may be familiar with the rake for your test, or use rake db: migrate to run your migrations, but you really know Rake behind the

  • Ruby on rails tutorial in the classical Rake 2011-05-27

    Ruby on rails tutorial in the classical Rake Recently in combination with the rake svn to write a Daily build report. Our platforms are used most of the background job rake to achieve, to sum up, with the rake to write some of the background job has

  • 学习Ruby你需要了解的相关知识(rvm, gem, bundle, rake, rails等) 2014-02-21

    这篇文章主要介绍了学习Ruby你需要了解的相关知识(rvm, gem, bundle, rake, rails等),需要的朋友可以参考下 Ruby 这个就不用多说了 RVM 用于帮你安装Ruby环境,帮你管理多个Ruby环境,帮你管理你开发的每个Ruby应用使用机器上哪个Ruby环境.Ruby环境不仅仅是Ruby本身,还包括依赖的第三方Ruby插件.都由RVM管理. Rails 这个也不用多说,著名开发框架.详细看

  • Ubuntu 14.04 Ruby,ROR环境搭建 2014-08-02

    在看国外一个物联网平台thingsquare,因为它是用Ruby写的,所以就装个Ruby研究下.下面是搭建步骤. 步骤0 - 安装系统需要的包 # For Mac # 先安装 [Xcode]( 开发工具,它将帮你安装好 Unix 环境需要的开发包 # 然后安装 [Homebrew]( ruby -e "$(curl -fsSL

  • Eclipse plug-ins to use Ruby Development Tools 2009-09-09

    Eclipse plug-ins to use Ruby Development Tools Document options Send as an e-mail this page Tomcat Application Development Download IBM open-source J2EE application server, WAS CE new version V1.1 Level: Intermediate Neal Ford ( @

  • ubuntu 10.10 installed under rvm ruby ​​1.9.2 rails3 2011-04-25

    In fact, many papers see, for example, pretty good. I recorded some of the situations I have about it. 1 RVM Official website would have been very easy to install $ bash < <( curl

  • "Ruby".say_hello -熊节为第二版所作的推荐序 2014-07-11

    本文系熊节为<Programming Ruby>第二版所作的推荐序. 根据我的观察,习惯于Java或者C#的程序员在初初接触Ruby时,最能打动他们的往往就是像本文标题这样的一句代码:原本熟悉的字符串或者整数突然摇身一变,有了很多新的行为,甚至让整个Ruby语言都似乎变了个样.尽管"改变标准库的行为"并不总是值得推荐的做法,但如果使用得当,你能够在Ruby的基础上创造出一种贴近项目需求.易写易读的方言--也有人把这些方言叫做"领域专用语言"(DSL,Do

  • Ruby Version Manager (RVM) 2015-02-24

    centos 下安装rvm 这个rvm和rvm-1.17-2.el6.x86_64.rpm 包不是一样的. [root@backup ~]# curl -sSL | bash -s stable Downloading Creating group 'rvm' Installing RVM to /usr/local/rvm/ Installa

  • Ruby User's Guide>> Simple examples 2009-03-10

    Let us write a factorial function of the calculation, n the mathematical definition of factorial is: n! = 1 (when n == 0) = N * (n-1)! (Otherwise) In Ruby, this may read as follows: def fact(n) if n == 0 1 else n * fact(n-1) end end You may end the r

  • The Ruby Programming Language Introduction 2009-05-19

    Click here to download chm part1 Click here to download pdf Click here to download chm part2 Tip: chm version 【Description】 Details of the book Ruby 1.8 and 1.9 versions of the various aspects. Ruby in a brief summary, the book details the following:

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C), All Rights Reserved. 版权所有 黔ICP备15002463号-1

processed in 0.129 (s). 12 q(s)