With the helpful information in @zrl3dx's answer I did the following:
Going to some external library in RubyMine to see where it's looking for source files. In my case it was in
~/.rvm/gems/ruby-2.0.0-p247/gems
Then I copied the railties directory to the rails directory
rmdir rails-3.2.13.rc2
cp -a railties-3.2.13.rc2 rails-3.2.13.rc2
Then RubyMine automatically detected the source code and I can happily Ctrl+Click once again :)