Ruby on Rails 环境搭建 [Windows 7]

耗时4小时终于把第一个demo给运行起来了。按照Ruby on Rails 的官方教程无论如何都无法安装成功,最后终于发现了Rails Installer这个好东东,可以去[url]http://railsinstaller.org/[/url]下载最新的。然后就是安装。

rails new demo --skip-bundle //可以避免bundle install去验证是否有最新的更新,节约bundle install 的时间
cd demo
bundle install --local //使用本地的
rails server

我在bundle install 遇到下面的错误。

Could not find gem 'turn (>= 0) x86-mingw32' in any of the gem sources listed in
your Gemfile.


这个时候只需要安装turn,然后看到提示表示安装成功。如果提示连接不上,可能需要通过VPN的方式了

bundle install turn

C:\demo>bundle install turn
Fetching source index for http://rubygems.org/
Installing rake (0.9.2.2)
Installing multi_json (1.0.4)
Installing activesupport (3.1.1)
Installing builder (3.0.0)
Installing i18n (0.6.0)
Installing activemodel (3.1.1)
Installing erubis (2.7.0)
Installing rack (1.3.6)
Installing rack-cache (1.1)
Installing rack-mount (0.8.3)
Installing rack-test (0.6.1)
Installing hike (1.2.1)
Installing tilt (1.3.3)
Installing sprockets (2.0.3)
Installing actionpack (3.1.1)
Installing mime-types (1.17.2)
Installing polyglot (0.3.3)
Installing treetop (1.4.10)
Installing mail (2.3.0)
Installing actionmailer (3.1.1)
Installing arel (2.2.1)
Installing tzinfo (0.3.31)
Installing activerecord (3.1.1)
Installing activeresource (3.1.1)
Installing ansi (1.4.2)
Using bundler (1.0.21)
Installing coffee-script-source (1.2.0)
Installing execjs (1.3.0)
Installing coffee-script (2.2.0)
Installing rack-ssl (1.3.2)
Installing json (1.6.5) with native extensions
Installing rdoc (3.12)
Installing thor (0.14.6)
Installing railties (3.1.1)
Installing coffee-rails (3.1.1)
Installing jquery-rails (1.0.19)
Installing rails (3.1.1)
Installing sass (3.1.15)
Installing sass-rails (3.1.5)
Installing sqlite3 (1.3.5)
Installing turn (0.9.2)
Installing uglifier (1.2.3)
Your bundle is complete! It was installed into ./turn
The path argument to `bundle install` is deprecated. It will be removed in versi
on 1.1. Please use `bundle install --path turn` instead.

C:\demo>bundle install --local
Using rake (0.9.2.2)
Using multi_json (1.0.4)
Using activesupport (3.1.1)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.1)
Using erubis (2.7.0)
Using rack (1.3.6)
Using rack-cache (1.1)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.3)
Using actionpack (3.1.1)
Using mime-types (1.17.2)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.1)
Using arel (2.2.1)
Using tzinfo (0.3.31)
Using activerecord (3.1.1)
Using activeresource (3.1.1)
Using ansi (1.4.2)
Using bundler (1.0.21)
Using coffee-script-source (1.2.0)
Using execjs (1.3.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.6.5)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.1.1)
Using coffee-rails (3.1.1)
Using jquery-rails (1.0.19)
Using rails (3.1.1)
Using sass (3.1.15)
Using sass-rails (3.1.5)
Using sqlite3 (1.3.5)
Using turn (0.9.2)
Using uglifier (1.2.3)
Your bundle is complete! It was installed into ./turn

C:\demo>rails server
=> Booting WEBrick
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-02-16 13:39:38] INFO WEBrick 1.3.1
[2012-02-16 13:39:38] INFO ruby 1.9.2 (2011-07-09) [i386-mingw32]
[2012-02-16 13:39:38] INFO WEBrick::HTTPServer#start: pid=6364 port=3000



[img]http://dl.iteye.com/upload/attachment/0063/2908/0e58266c-649c-3ed2-9297-5c748ea5ead7.jpg[/img]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值