0

我已经尝试了几个小时让 Ruby on Rails 在我的 Windows 7 计算机上运行。我已经安装了 Ruby、Rails 和 mySQL。我正在学习 Lynda.com 的教程,但每次我尝试创建一个新项目时,都会遇到一大堆错误……下面是我尝试创建一个新项目的结果。任何帮助将不胜感激。

     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>
4

2 回答 2

3

试试 Rails 安装程序。我的导轨没有问题。轻松一键安装。www.railsinstaller.org

于 2013-02-25T22:44:00.243 回答
0

这可能不是一个这样的答案,我不希望它给人一种刻薄的印象或任何东西,但您可以通过查看VirtualBox(免费)并安装Ubuntu实例或其他 *nix 操作来帮自己一个忙系统。无论您是为了好玩还是为了盈利,如果您使用 Windows 以外的其他工具与 Ruby 和 Rails 一起工作,您将花费更少的时间来尝试找出错误的原因,并花费更多的时间进行编码。它只是工作得更好。

3 年前,我从头开始使用 Rails,这可能是我成为更好的开发人员所采取的最佳步骤之一。

于 2013-02-25T22:19:38.533 回答