我正在使用rails进行简单的hello world项目,但似乎它向我发送了bundler错误。我想看看如何删除键入
后出现的bundler错误 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应用程序但是每个新项目似乎都会抛出这个bundle错误。
我检查了类似的问题,但这个问题似乎是错误的唯一类型。
如何摆脱这些捆绑安装错误?
答案 0 :(得分:0)
检查以下步骤,
gem install bundler
and after adding:
gem 'bundler'
在config/boot.rb
的第2行(仅在需要'rubygems'
之后)
如果没有解决,请告诉我。