2015-02-05 122 views
1

我使用RubyTest在崇高的文本3,使用subl命令打開從我的終端崇高,並運行到以下錯誤的錯誤:在崇高的文本3運行RubyTest拋出

[MY_HOME_DIRECTORY]/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup 

我唯一的變化在我的RubyTest用戶設置中做出的設置是"check_for_rbenv" = true。你會注意到RubyTest正在拾取rbenv的錯誤。除了這個錯誤之外,RubyTest吐出了它試圖運行的命令,/usr/local/bin/rbenv exec ruby -Itest test/unit/company_test.rb。直接從目錄中的終端運行該命令完美無瑕。

當我改變我的RubyTest用戶設置"check_for_bundler": true,我得到以下錯誤:

rbenv: bundle: command not found 

再次,從終端工程運行命令/usr/local/bin/rbenv exec bundle exec ruby -Itest test/unit/company_test.rb

任何想法都非常感謝。

+0

我不認爲它使用與您的控制檯相同版本的紅寶石..你嘗試在.rbenv或Gemfile中設置紅寶石版本? – Hesham 2015-02-06 16:58:50

+0

嘿,那裏。感謝您的想法。它使用的是ruby 2.1.2('.rbenv/versions/2.1.2 /'),它與該目錄中的.ruby-version文件中指定的ruby相同。我很確定它所嘗試的ruby版本是正確的。 – dessy 2015-02-06 20:13:26

+0

好..這可能值得嘗試 - 滾動到第一個答案:http://stackoverflow.com/questions/23669651/sublime-text-3-rbenv-testunit-rubytest-and-spring-correct-configuation-to-得到(我知道春天不是你的情況下的問題) – Hesham 2015-02-06 20:22:24

回答

2

看起來問題在於rbenv-gemset。 Bundler被安裝在一個gemset中,而Sublime沒有選擇它。只要我刪除rbenv-gemset並運行gem install bundler,一切都按預期工作。