My terminal gem environment does not match with my Rubymine one. In terminal it gives:
- EXECUTABLE DIRECTORY: /Users/george/.gem/ruby/1.9.3/bin
- SPEC CACHE DIRECTORY: /Users/george/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /Users/george/.gem/ruby/1.9.3
- /Users/george/.rubies/ruby-1.9.3-p392/lib/ruby/gems/1.9.1
whereas in RubyMine it gives:
EXECUTABLE DIRECTORY: /Users/george/.rubies/ruby-1.9.3-p392/bin
SPEC CACHE DIRECTORY: /Users/george/.gem/specs
RUBYGEMS PLATFORMS:
ruby
x86_64-darwin-12
GEM PATHS:
/Users/george/.rubies/ruby-1.9.3-p392/lib/ruby/gems/1.9.1
/Users/george/.gem/ruby/1.9.1
There seems to be a confusion about gem location and I dont know how to fix it.
I am using chruby to control ruby versions installed with ruby-build The application is Rails 3.2.17
The full output in terminal and Rubymine are below:
Terminal:
RubyGems Environment:
- RUBYGEMS VERSION: 2.2.2
- RUBY VERSION: 1.9.3 (2013-02-22 patchlevel 392) [x86_64-darwin12.5.0]
- INSTALLATION DIRECTORY: /Users/george/.gem/ruby/1.9.3
- RUBY EXECUTABLE: /Users/george/.rubies/ruby-1.9.3-p392/bin/ruby
- EXECUTABLE DIRECTORY: /Users/george/.gem/ruby/1.9.3/bin
- SPEC CACHE DIRECTORY: /Users/george/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /Users/george/.gem/ruby/1.9.3
- /Users/george/.rubies/ruby-1.9.3-p392/lib/ruby/gems/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/george/.gem/ruby/1.9.3/bin
- /Users/george/.rubies/ruby-1.9.3-p392/lib/ruby/gems/1.9.1/bin
- /Users/george/.rubies/ruby-1.9.3-p392/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/bin
- /Users/george/bin
- /opt/X11/bin
RubyMine:
RUBYGEMS VERSION: 2.2.2
RUBY VERSION: 1.9.3 (2013-02-22 patchlevel 392) [x86_64-darwin12.5.0]
INSTALLATION DIRECTORY: /Users/george/.rubies/ruby-1.9.3-p392/lib/ruby/gems/1.9.1
RUBY EXECUTABLE: /Users/george/.rubies/ruby-1.9.3-p392/bin/ruby
EXECUTABLE DIRECTORY: /Users/george/.rubies/ruby-1.9.3-p392/bin
SPEC CACHE DIRECTORY: /Users/george/.gem/specs
RUBYGEMS PLATFORMS:
ruby
x86_64-darwin-12
GEM PATHS:
/Users/george/.rubies/ruby-1.9.3-p392/lib/ruby/gems/1.9.1
/Users/george/.gem/ruby/1.9.1
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
https://rubygems.org/
SHELL PATH:
/Users/george/.rubies/ruby-1.9.3-p392/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/Users/george/bin
/opt/X11/bin
/usr/local/bin
----------------------
IDE: RubyMine 6.0.3, build #RM-133.632
OS: Mac OS X 10.9.2[x86_64]
Java: 1.6.0_65-b14-462-11M4609
RubyMine SDK Environment:
Sdk: ruby-1.9.3-p392
Sdk Version: ver.1.9.3p392 ( revision 39386) p392
Ruby Interpreter: /Users/george/.rubies/ruby-1.9.3-p392/bin/ruby
RVM Sdk: no
RVM Home: /usr/local/rvm
Sdk Language Level: 1.9
Sdk Load Path:
~/.rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1
~/.rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/x86_64-darwin12.5.0
~/.rubies/ruby-1.9.3-p392/lib/ruby/site_ruby
~/.rubies/ruby-1.9.3-p392/lib/ruby/vendor_ruby/1.9.1
~/.rubies/ruby-1.9.3-p392/lib/ruby/vendor_ruby/1.9.1/x86_64-darwin12.5.0
~/.rubies/ruby-1.9.3-p392/lib/ruby/vendor_ruby
~/.rubies/ruby-1.9.3-p392/lib/ruby/1.9.1
~/.rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-darwin12.5.0
/Applications/RubyMine.app/rubystubs193
Sdk Gem paths:
~/.rubies/ruby-1.9.3-p392/lib/ruby/gems/1.9.1/gems
~/.gem/ruby/1.9.1/gems
~/.rubies/ruby-1.9.3-p392/lib/ruby/gems/1.9.1/bundler/gems
~/.gem/ruby/1.9.1/bundler/gems
There are several ways to specify gem versions: Use a specific version: gem "name-of-gem", "1.0" . You can find specific versions on Rubygems.org (provided that's the source you”re using) by searching for your gem and looking at the “Versions” listed. Use a version operator: gem "name-of-gem", ">1.0" .
Seems like RubyMine uses a wrong ruby version. To fix this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With