Ruby on Rails 环境搭建 [Windows 7]_Ruby_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > Ruby > Ruby on Rails 环境搭建 [Windows 7]

Ruby on Rails 环境搭建 [Windows 7]

 2012/2/17 9:26:33  wen_pp  程序员俱乐部  我要评论(0)
  • 摘要:耗时4小时终于把第一个demo给运行起来了。按照RubyonRails的官方教程无论如何都无法安装成功,最后终于发现了RailsInstaller这个好东东,可以去http://railsinstaller.org/下载最新的。然后就是安装。railsnewdemo--skip-bundle//可以避免bundleinstall去验证是否有最新的更新,节约bundleinstall的时间cddemobundleinstall-
  • 标签:Windows 环境搭建 rails Ruby
耗时4小时终于把第一个demo给运行起来了。按照Ruby on Rails 的官方教程无论如何都无法安装成功,最后终于发现了Rails Installer这个好东东,可以去http://railsinstaller.org/下载最新的。然后就是安装。
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





  • 大小: 50.1 KB
  • 查看图片附件
发表评论
用户名: 匿名