1
我在Ubuntu系統上並使用rbenv安裝了ruby-2.1.3。我製作了2.1.3全局文件,可以從我的系統終端訪問。RubyMine使用不正確/不同的Ruby版本 - Ubuntu
系統終端:
[email protected]:~$ ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux]
然而,當我在我的RubyMine嵌入式終端運行相同的命令,它要求我通過資質庫安裝Ruby。
[email protected]:~/RubymineProjects/Loccasions$ ruby -v
The program 'ruby' can be found in the following packages:
* ruby
* ruby1.8
Try: sudo apt-get install <selected package>
「gem environment」和「gem -v」也是一樣的。
系統終端:
[email protected]:~$ gem -v
2.4.2
[email protected]:~$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.2
- RUBY VERSION: 2.1.3 (2014-09-19 patchlevel 242) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/lambda/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0
- RUBY EXECUTABLE: /home/lambda/.rbenv/versions/2.1.3/bin/ruby
- EXECUTABLE DIRECTORY: /home/lambda/.rbenv/versions/2.1.3/bin
- SPEC CACHE DIRECTORY: /home/lambda/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /home/lambda/.rbenv/versions/2.1.3/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/lambda/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0
- /home/lambda/.gem/ruby/2.1.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/lambda/.rbenv/versions/2.1.3/bin
- /home/lambda/.rbenv/libexec
- /home/lambda/.rbenv/plugins/ruby-build/bin
- /home/lambda/.rbenv/shims
- /home/lambda/.rbenv/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
RubyMine的終端:
[email protected]:~/RubymineProjects/Loccasions$ gem -v
The program 'gem' can be found in the following packages:
* ruby
* rubygems
Try: sudo apt-get install <selected package>
[email protected]:~/RubymineProjects/Loccasions$ gem environment
The program 'gem' can be found in the following packages:
* ruby
* rubygems
Try: sudo apt-get install <selected package>
我經歷了這一切,我知道在RubyMine的,涉及到SDK的設置,進行篩分,並指示他們存儲在rbenv中的ruby-2.1.3。我對這個話題做了很多研究,但我的嘗試是徒勞的。我希望能幫助您診斷此錯誤。