0

我正在用 rails 做简单的 hello world 项目,但似乎它向我抛出了捆绑器错误。我想看看如何删除我键入后出现的捆绑程序错误

   rails new helloproject

控制台中的错误是:

 /var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/source.rb:271:in `<class:Path>':   uninitialized constant Bundler::GemInstaller (NameError)
   /var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/source.rb:270:in `<module:Source>'
   /var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/source.rb:10:in `<module:Bundler>'
   /var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/source.rb:9:in `<top (required)>'
   /var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/dsl.rb:21:in `initialize'
   /var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/dsl.rb:6:in `new'
   /var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/dsl.rb:6:in `evaluate'
   /var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/definition.rb:18:in `build'
   /usr/lib/ruby/vendor_ruby/bundler.rb:136:in `definition'
   /usr/lib/ruby/vendor_ruby/bundler/cli.rb:222:in `install'
   /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/task.rb:22:in `run'
   /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
   /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:246:in `dispatch'
   /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/base.rb:389:in `start'
   /var/lib/gems/1.9.1/gems/bundler-1.2.3/bin/bundle:14:in `block in <main>'
   /var/lib/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
   /var/lib/gems/1.9.1/gems/bundler-1.2.3/bin/bundle:14:in `<main>'
   There was an error in your Gemfile, and Bundler cannot continue.

我想知道如何才能克服此错误并正确捆绑应用程序?

我确实设法运行服务器并运行 hello world 应用程序,但每个新项目似乎都会抛出这个捆绑器错误。

我检查了类似的问题,但这似乎是错误的独特类型。

如何摆脱这些捆绑器安装错误?

4

1 回答 1

0

检查以下步骤,

gem install bundler
and after adding:

gem 'bundler'

在第 2 行中config/boot.rb(就在 require 之后'rubygems'

如果没有解决,请告诉我。

于 2013-01-31T14:58:58.840 回答