2013-02-25 110 views
0

我一直在嘗試幾個小時才能讓Ruby on Rails在我的Windows 7計算機上工作。我已經安裝了Ruby,Rails和mySQL。我正在關注Lynda.com的教程,但每次嘗試創建新項目時,都會遇到大量錯誤...下面是我嘗試創建新項目的結果。任何幫助將非常感謝。Windows 7上的Ruby on Rails問題

 C:\Users\Zack\Rails>rails new sample 
      create 
      create README.rdoc 
      create Rakefile 
      create config.ru 
      create .gitignore 
      create Gemfile 
      create app 
      create app/assets/images/rails.png 
      create app/assets/javascripts/application.js 
      create app/assets/stylesheets/application.css 
      create app/controllers/application_controller.rb 
      create app/helpers/application_helper.rb 
      create app/views/layouts/application.html.erb 
      create app/mailers/.gitkeep 
      create app/models/.gitkeep 
      create config 
      create config/routes.rb 
      create config/application.rb 
      create config/environment.rb 
      create config/environments 
      create config/environments/development.rb 
      create config/environments/production.rb 
      create config/environments/test.rb 
      create config/initializers 
      create config/initializers/backtrace_silencers.rb 
      create config/initializers/inflections.rb 
      create config/initializers/mime_types.rb 
      create config/initializers/secret_token.rb 
      create config/initializers/session_store.rb 
      create config/initializers/wrap_parameters.rb 
      create config/locales 
      create config/locales/en.yml 
      create config/boot.rb 
      create config/database.yml 
      create db 
      create db/seeds.rb 
      create doc 
      create doc/README_FOR_APP 
      create lib 
      create lib/tasks 
      create lib/tasks/.gitkeep 
      create lib/assets 
      create lib/assets/.gitkeep 
      create log 
      create log/.gitkeep 
      create public 
      create public/404.html 
      create public/422.html 
      create public/500.html 
      create public/favicon.ico 
      create public/index.html 
      create public/robots.txt 
      create script 
      create script/rails 
      create test/fixtures 
      create test/fixtures/.gitkeep 
      create test/functional 
      create test/functional/.gitkeep 
      create test/integration 
      create test/integration/.gitkeep 
      create test/unit 
      create test/unit/.gitkeep 
      create test/performance/browsing_test.rb 
      create test/test_helper.rb 
      create tmp/cache 
      create tmp/cache/assets 
      create vendor/assets/javascripts 
      create vendor/assets/javascripts/.gitkeep 
      create vendor/assets/stylesheets 
      create vendor/assets/stylesheets/.gitkeep 
      create vendor/plugins 
      create vendor/plugins/.gitkeep 
      run bundle install 
      Unfortunately, a fatal error has occurred. Please see the Bundler 
      troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! 

C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/config_file.rb:305:in `read': Is a directory - C:/ProgramData/gemrc (Errno::EISDIR) 
     from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/config_file.rb:305:in `load_file' 
     from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/config_file.rb:200:in `initialize' 
     from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems.rb:319:in `new' 
     from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems.rb:319:in `configuration' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler rubygems_integration.rb:34:in`configuration' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundlerrubygems_integration.rb:53:in'sources=' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/source rubygems.rb:249:in `ensure in remote_specs' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/source/rubygems.rb:249:in `remote_specs' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/source/rubygems.rb:162:in `fetch_specs' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/source/rubygems.rb:66:in `specs' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/definition.rb:192:in`block (2 levels) in index' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/definition.rb:189:in`each' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/definition.rb:189:in`block in index' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/index.rb:9:in `build' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/definition.rb:185:in`index' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/definition.rb:179:in`resolve' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/definition.rb:114:in`specs' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/definition.rb:109:in`resolve_remotely!' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/installer.rb:83:in `run' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/installer.rb:14:in `install' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/cli.rb:247:in `install' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/vendor/thor/task.rb:2 
7:in `run' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/vendor/thor/invocatio 
n.rb:120:in `invoke_task' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/vendor/thor.rb:344:in 
`dispatch' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/vendor/thor/base.rb:4 
34:in `start' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/bin/bundle:20:in `block in <main> 
' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/lib/bundler/friendly_errors.rb:4: 
in `with_friendly_errors' 
     from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.0/bin/bundle:20:in `<main>' 

C:\Users\Zack\Rails> 
+1

快速地,思考你使用最新版本的Ruby。嘗試使用1.9版本。 2.0版本最近發佈(可能是一週前)。但是對於1.9版本你有很多幫助。乾杯。 – 2013-02-25 22:02:41

+1

Ruby2.0昨天發佈。在Ruby2.0上也有[運行捆綁程序的問題](https://groups.google.com/d/msg/rubyinstaller/mg5ailNICvM/cHctJk4ZNJIJ)。 – Azolo 2013-02-25 23:14:27

回答

0

這可能不是一個答案,這樣,我不希望它給人的印象表露無疑什麼的,但您能尋找到VirtualBox(free)和安裝的Ubuntu的實例,或者做自己一個忙另一個* nix操作系統。無論您是爲了娛樂還是爲了獲取利益,如果您使用Windows以外的其他工具來處理Ruby和Rails,那麼您將花費更少的時間來弄清楚爲什麼會出錯和更多的時間編碼。它只是更好地工作。

3年前我從頭開始學習Rails,這可能是我成爲一名更好的開發人員的最佳步驟之一。

+0

你甚至可以使用Vagrant(http://www.vagrantup.com/)輕鬆創建/管理你的開發環境。我同意瑞恩。在窗戶上的軌道可以是一個痛苦。 – 2013-02-25 22:21:58

+1

我會加入並同意,Windows上的Rails並沒有像在Linux和OS X上那樣出色。 – 2013-02-25 22:23:09

+0

聽起來就像是在使用Windows時一樣。多謝你們!我很感激。 :-) – Zack 2013-02-25 22:58:13

3

嘗試導軌安裝程序。我的導軌沒有問題。輕鬆一鍵安裝。 www.railsinstaller.org

+0

謝謝!我將嘗試虛擬盒子解決方案,但也可以嘗試一下。 – Zack 2013-02-25 22:58:45