ruby on rails - Why is gem environment different in RubyMine and in terminal -
my terminal gem environment not match rubymine one. in terminal 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 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 confusion gem location , dont know how fix it.
i using chruby control ruby versions installed ruby-build application rails 3.2.17
the full output in terminal , rubymine 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
seems rubymine uses wrong ruby version. fix this:
- in rubymine go preferences -> ruby sdk , gems
- click ruby- in middle window
- then click gem in right window , check gem path in bottom window
- if path not same in terminal
- click + in middle window, choose new local... , add path desired ruby bin directory. should fix issue.
Comments
Post a Comment