0

我正在尝试运行 rails 服务器。

没想到在检查 Rails 的版本时发现了这个错误:

C:\>rails -v
Rails 3.2.8

请参见上面的命令和下面的命令。一个在“C”盘,另一个是我的项目目录

C:\Mukesh\workspace\Rails\tgif_api>rails version
C:/Users/Administrator/Desktop/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:187:in `stub_source_index170': uninitialized constant Gem::SourceIndex (NameError)
    from C:/Users/Administrator/Desktop/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:353:in `stub_rubygems'
    from C:/Users/Administrator/Desktop/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/rubygems_integration.rb:250:in `replace_entrypoints'
    from C:/Users/Administrator/Desktop/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:14:in `setup'
    from C:/Users/Administrator/Desktop/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:107:in `setup'
    from C:/Users/Administrator/Desktop/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/setup.rb:7:in `<top (required)>'
    from C:/Users/Administrator/Desktop/ruby/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `require'
    from C:/Users/Administrator/Desktop/ruby/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from C:/Users/Administrator/Desktop/ruby/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:144:in `require'
    from C:/Mukesh/workspace/Rails/tgif_api/config/boot.rb:6:in `<top (required)>'
    from C:/Users/Administrator/Desktop/ruby/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
    from C:/Users/Administrator/Desktop/ruby/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
    from script/rails:5:in `<main>'

我已经尝试过系统更新和运行bundle install。在执行时,即使我已经成功安装它bundle install,它也会重复显示。try gem install rake

4

1 回答 1

0

您需要更新 Bundler:gem update bundler

于 2013-11-13T05:01:29.303 回答