Windows 7上的Ruby on Rails问题
我一直在尝试几个小时才能让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>
这可能不是一个答案,这样,我不希望它给人的印象表露无疑什么的,但您能寻找到VirtualBox(free)和安装的Ubuntu的实例,或者做自己一个忙另一个* nix操作系统。无论您是为了娱乐还是为了获取利益,如果您使用Windows以外的其他工具来处理Ruby和Rails,那么您将花费更少的时间来弄清楚为什么会出错和更多的时间编码。它只是更好地工作。
3年前我从头开始学习Rails,这可能是我成为一名更好的开发人员的最佳步骤之一。
你甚至可以使用Vagrant(http://www.vagrantup.com/)轻松创建/管理你的开发环境。我同意瑞恩。在窗户上的轨道可以是一个痛苦。 – 2013-02-25 22:21:58
我会加入并同意,Windows上的Rails并没有像在Linux和OS X上那样出色。 – 2013-02-25 22:23:09
听起来就像是在使用Windows时一样。多谢你们!我很感激。 :-) – Zack 2013-02-25 22:58:13
尝试导轨安装程序。我的导轨没有问题。轻松一键安装。 www.railsinstaller.org
谢谢!我将尝试虚拟盒子解决方案,但也可以尝试一下。 – Zack 2013-02-25 22:58:45
快速地,思考你使用最新版本的Ruby。尝试使用1.9版本。 2.0版本最近发布(可能是一周前)。但是对于1.9版本你有很多帮助。干杯。 – 2013-02-25 22:02:41
Ruby2.0昨天发布。在Ruby2.0上也有[运行捆绑程序的问题](https://groups.google.com/d/msg/rubyinstaller/mg5ailNICvM/cHctJk4ZNJIJ)。 – Azolo 2013-02-25 23:14:27