Search code examples
ruby-on-railsrubymine

Rubymine: Ctrl + Click not working


Recently I have updated my Rails and Ruby(1.9.3 to 2.1) version, using a newer version of RailsInstaller After that, in RubyMine, when I use ctrl + click to jump from code to code, sometimes it's not working.

CASE1

I have included some constants in initializers/resources_constants.rb, So I can use them like constants = RESOURCES_CONSTANT::SOME_CONSTANT.

It used to work fine. When ctrl + click, I can jump directly into the resources_constants.rb. But now, I can not switch to it.

The code itself is still running very well, and I can still use the constants defined in that file.

CASE2

require 'nokogiri' works fine, I can jump to it.

CASE3

video.get_hits. It's a instance method defined in Video.rb model. I cannot jump to it, but the code still works fine.


Solution

  • This is kinda the Jetbrains "nuclear option", but it's worked for me every time this type of thing happens (usually after ruby version updates).

    1. Completely close all running instances of RubyMine
    2. In the root directory of the project in question, delete the hidden .idea directory
    3. Reopen your project in RubyMine as normal