2016-02-05 213 views
0

我正在開發一個導軌項目。隨着指令 「束EXEC軌道的」 不過,我可以啓動一個本地服務器, 「捆綁EXEC軌C」 拋出了以下錯誤:導軌服務器工作但「導軌控制檯」不工作

/Users/wh026399/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError) 
    from /Users/wh026399/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
    from /Users/wh026399/healthelife_web/vendor/bundle/gems/spring-1.6.2/lib/spring/commands.rb:33:in `<module:Spring>' 
    from /Users/wh026399/healthelife_web/vendor/bundle/gems/spring-1.6.2/lib/spring/commands.rb:4:in `<top (required)>' 
    from /Users/wh026399/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
    from /Users/wh026399/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
    from /Users/wh026399/healthelife_web/vendor/bundle/gems/spring-1.6.2/lib/spring/application.rb:77:in `preload' 
    from /Users/wh026399/healthelife_web/vendor/bundle/gems/spring-1.6.2/lib/spring/application.rb:143:in `serve' 
    from /Users/wh026399/healthelife_web/vendor/bundle/gems/spring-1.6.2/lib/spring/application.rb:131:in `block in run' 
    from /Users/wh026399/healthelife_web/vendor/bundle/gems/spring-1.6.2/lib/spring/application.rb:125:in `loop' 
    from /Users/wh026399/healthelife_web/vendor/bundle/gems/spring-1.6.2/lib/spring/application.rb:125:in `run' 
    from /Users/wh026399/healthelife_web/vendor/bundle/gems/spring-1.6.2/lib/spring/application/boot.rb:18:in `<top (required)>' 
    from /Users/wh026399/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
    from /Users/wh026399/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
    from -e:1:in `<main>' 
  • 的Ruby版本:2.2.2
  • Rails的版本: 4.2.5
  • 寶石版本:2.5.2
  • 捆紮機版本:1.11.2

[更新]:事​​實證明,在Gemfile中註釋掉 「春天」 將解決這個問題。

+0

後也-v 4.2.5,我沒有安裝Ruby 2.2.0,它爲什麼顯示的路徑呢? – wei

+0

忘了提及,我有一個設置BUNDLE_PATH的.bundle/config文件:vendor/bundle,所以gems安裝在我的項目目錄下的vendor/bundle下,而不是系統範圍內。 – wei

回答

0

你試過gem update --system?您可能需要更新版本的rubygems。

+0

是的,我試過了,它顛覆了寶石版本到2.5.2,但仍然看到錯誤。 – wei

+0

@ user1783403 do'[sudo] gem install bundler' 然後'bundle install' – Jefferson

+0

不起作用:( – wei

0

如果您使用rvm設置默認的ruby版本使用以下,所以它會採取正確的ruby版本。你可能需要捆綁運行安裝/創業板安裝導軌設置默認

rvm --default 2.2.2 
+0

下的nginx文件夾2.2.2是我當前的默認值,並且之後我確實重新運行了bundle install,仍然沒有運氣:( – wei