2014-01-10 87 views
1

在我的新OSX Mavericks安裝中,我想給Rubymine一個嘗試,但無法讓調試器正常工作(儘管我設法使用IntelliJ和紅寶石在Windows 7上工作插入)。Rubymine 6.0.2,無法調試

這是我做了什麼(Xcode和命令行工具已安裝):

homebrew install ruby 
gem update --system 

然後我安裝的RubyMine,打開我的一些項目。在啓動調試器,RubyMine的嘗試安裝依賴:

Failed to Install Gems. Following gems were not installed: /Applications/RubyMine.app/rb/gems/ruby-debug-ide-0.4.22.gem: Error installing ruby-debug-ide-0.4.22.gem: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby mkrf_conf.rb Installing base gem You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. /Library/Ruby/Site/2.0.0/rubygems/installer.rb:620:in verify_gem_home' /Library/Ruby/Site/2.0.0/rubygems/installer.rb:740:in pre_install_checks' /Library/Ruby/Site/2.0.0/rubygems/installer.rb:213:in install' /Library/Ruby/Site/2.0.0/rubygems/request_set.rb:136:in block in install' /Library/Ruby/Site/2.0.0/rubygems/request_set.rb:120:in each' /Library/Ruby/Site/2.0.0/rubygems/request_set.rb:120:in install' /Library/Ruby/Site/2.0.0/rubygems/dependency_installer.rb:389:in install' mkrf_conf.rb:34:in rescue in ' mkrf_conf.rb:27:in ` ' rake failed, exit code 1 Gem files will remain installed in /Volumes/OSX DATA/Users/freakazoid/.gem/ruby/2.0.0/gems/ruby-debug-ide-0.4.22 for inspection. Results logged to /Volumes/OSX DATA/Users/freakazoid/.gem/ruby/2.0.0/extensions/universal-darwin-13/2.0.0/ruby-debug-ide-0.4.22/gem_make.out /Applications/RubyMine.app/rb/gems/debase-0.0.9.gem: Error installing debase-0.0.9.gem: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: invalid option -D (-h will show valid options) (RuntimeError) extconf failed, exit code 1 Gem files will remain installed in /Volumes/OSX DATA/Users/freakazoid/.gem/ruby/2.0.0/gems/debase-0.0.9 for inspection. Results logged to /Volumes/OSX DATA/Users/freakazoid/.gem/ruby/2.0.0/extensions/universal-darwin-13/2.0.0/debase-0.0.9/gem_make.out

我可以毫無問題我OSX終端

上做

gem install debugger 

任何幫助在那裏?

+1

運行'哪個ruby'和後期輸出。你還使用任何像RVM來管理紅寶石安裝? – Beartech

+0

請參閱答案 –

回答

0

感謝Beartech,您指出我的方向是正確的: Rubymine在「/Library/..../ruby」尋找紅寶石,當然自制紅寶石已安裝到另一個位置。我不得不編輯我的rubymine設置,並將ruby sdk指向自制軟件的紅寶石。然後,我必須重新啓動rubymine才能成功使用新的sdk位置。 (我以前沒有重新啓動系統rubymine ...)

8

您需要獲取源文件,因爲它們不包括在內。

gem install debugger-ruby_core_source 

然後再試一次。

另外,由於我發現有時在Rubymine中沒有正確設置,請在菜單欄中選擇「Rubymine」 - >「preferences」 - >「Ruby SDK and Gems」並確保它指向您期待的Ruby版本。

+0

更改Ruby版本時遇到RubyMine錯誤。當我改變時,我注意到當我切換到2.2時語言級別爲1.8,這阻止了調試使用正確的工具。希望這可以讓那些正在苦苦掙扎的人們看到。 – Jack