RubyMine 4 go to declaration/Class not working for gems.

After installing RubyMine 4 today, I noticed that I cannot go to delcleration if the code is implemented in a gem. Go to Class is not working either for classes in gems.



I tried a few things to get this to work:

  1. Checked that the gems were showing up under installed gems in the sdk and gems section
  2. toggled ignore global path from off to on and back
  3. ran bundle install in RubyMine
  4. ran bundle update in RubyMine
  5. Restarted Computer
  6. invalidate caches and restart application
  7. deleted the .idea folder



RubyMine 4 RM 113.18
OSX 10.6.8 Snow Leopard
RVM with ruby-1.8.7-p334 and using a gemset
rubygems 1.8.16

RUBYGEMS VERSION: 1.8.16
RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
INSTALLATION DIRECTORY: /Users/ssims/.rvm/gems/ruby-1.8.7-p334@automation
RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
EXECUTABLE DIRECTORY: /Users/ssims/.rvm/gems/ruby-1.8.7-p334@automation/bin
RUBYGEMS PLATFORMS:
  ruby
  universal-darwin-10
GEM PATHS:
   /Users/ssims/.rvm/gems/ruby-1.8.7-p334@automation
   /Users/ssims/.rvm/gems/ruby-1.8.7-p334@global
GEM CONFIGURATION:
   :update_sources => true
   :verbose => true
   :benchmark => false
   :backtrace => false
   :bulk_threshold => 1000
   :sources => ["http://gems.github.com", "http://gems.rubyforge.org/", "http://gems.wvrgroup.internal"]
REMOTE SOURCES:
   http://gems.github.com
   http://gems.rubyforge.org/
   http://gems.wvrgroup.internal
----------------------
IDE: JetBrains RubyMine 4.0, build #RM-113.18
OS: Mac OS X 10.6.8[i386]
Java: 1.6.0_29-b11-402-10M3527
RubyMine SDK Environment:
Sdk: Ruby SDK 1.8.7-p334 [automation]
Sdk Version: ver.1.8.7 p334
Ruby Interpreter: /Users/ssims/.rvm/rubies/ruby-1.8.7-p334/bin/ruby
RVM Sdk: yes, gemset:automation
RVM Home: /Users/ssims/.rvm
Sdk Language Level: 1.8
Sdk Load Path:
     ~/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8
     ~/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/i686-darwin10.6.0
     ~/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby
     ~/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/vendor_ruby/1.8
     ~/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/vendor_ruby/1.8/i686-darwin10.6.0
     ~/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/vendor_ruby
     ~/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8
     ~/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/i686-darwin10.6.0
     /Applications/RubyMine.app/rubystubs18
Sdk Gem paths:
     ~/.rvm/gems/ruby-1.8.7-p334@automation/bundler/gems
     ~/.rvm/gems/ruby-1.8.7-p334@automation/gems
     ~/.rvm/gems/ruby-1.8.7-p334@global/gems

5 comments
Comment actions Permalink

Please provide output of Tools | Show Gem Environment

0
Comment actions Permalink

I think I have exactly same problem. "go to declaration" just dont work with gems
Please tell me how I can provide more usefull information





RUBYGEMS VERSION: 1.8.15
RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [x86_64-linux]
INSTALLATION DIRECTORY: /home/anton/.rvm/gems/ruby-1.9.3-p125
RUBY EXECUTABLE: /home/anton/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
EXECUTABLE DIRECTORY: /home/anton/.rvm/gems/ruby-1.9.3-p125/bin
RUBYGEMS PLATFORMS:
  ruby
  x86_64-linux
GEM PATHS:
   /home/anton/.rvm/gems/ruby-1.9.3-p125
   /home/anton/.rvm/gems/ruby-1.9.3-p125@global
GEM CONFIGURATION:
   :update_sources => true
   :verbose => true
   :benchmark => false
   :backtrace => false
   :bulk_threshold => 1000
REMOTE SOURCES:
   http://rubygems.org/
----------------------
IDE: JetBrains RubyMine 4.0.1, build #RM-113.20
OS: Linux 2.6.37.6-0.11-desktop[amd64]
Java: 1.6.0_29-b11
RubyMine SDK Environment:
Sdk: RVM: ruby-1.9.3-p125
Sdk Version: ver.1.9.3p125 ( revision 34643) p125
Ruby Interpreter: /home/anton/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
RVM Sdk: yes, gemset:[default]
RVM Home: /home/anton/.rvm
Sdk Language Level: 1.9
Sdk Load Path:
     ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1
     ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/x86_64-linux
     ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby
     ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/vendor_ruby/1.9.1
     ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/vendor_ruby/1.9.1/x86_64-linux
     ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/vendor_ruby
     ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1
     ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-linux
     ~/bin/RubyMine-4.0/rubystubs19
Sdk Gem paths:
     ~/.rvm/gems/ruby-1.9.3-p125/bundler/gems
     ~/.rvm/gems/ruby-1.9.3-p125/gems
     ~/.rvm/gems/ruby-1.9.3-p125@global/gems
Gems used for 'untitled':

0
Comment actions Permalink

What kind of the application (Rails 2.x, Rails 3.x, pure ruby) are you working on? Is Gemfile located in the root of the project?

0
Comment actions Permalink

I had problem with pure ruby application. And I did not have Gemfile in my project. I think that was the problem. After I have added Gemfile  - "go to declaration" started to work.
Thanks for your help  Dennis!

0
Comment actions Permalink

You can also vote for related issue. When fixed RubyMine would understand simple require calls for pure ruby projects

@Scott, as was found out in RUBY-10515, Gemfile somehow can change it's file type to plain text. Please check that in Preferences | File types. If it's in plain text, remove Gemfile from that list and add it to ruby.

0

Please sign in to leave a comment.