RubyMine does not detect the gems to be used as code completion

Hi,

I have several requires at the top of my ruby program, but Rubymine does not detect them to be used a code completion. It marks the require with an error saying that the file does not exists, and of course does not complete the code while I am typing.

The gems are attached in the Gem Manager without problems.

Any ideas?

Thanks,

GA

0
7 comments

If you expand Libraries node in project view, do you see libraries with names "[gem] <gemname> ..."?

0

Also

1. For which gem RM doesn't understand require?
2. If you see your gem under Libraries in Project View do you also see your file from require call under <gem_name>/lib?
3. Please attach your idea.log as described at http://www.jetbrains.net/devnet/docs/DOC-1153

0
Avatar
Permanently deleted user

I think this screenshot will answer your questions:

RubyMineScreenSnapz004.jpg

The Gem is ruby-pg (to access postgresql). The Gem is included in the library and it works. I am accessing the database without problems. The gem just works fine when I run it within RubyMine or from the command line. The problem is that the code completion does not work for some reason.

The log is attached as well.

Thanks,



Attachment(s):
idea.log
0
Avatar
Permanently deleted user

I have tested with other gems and it looks like this issue is happening only with the ruby-pg gem. Any ideas on how to solve it?

Thanks,

GA

0

Hello Guillermo,

Unfortunately I haven't managed to install ruby-pg on my mac. But as far as I understand ruby-pg is C extension and doesn't contain ruby code. RubyMine's type inference depends on ruby sources and it doesn't understand compiles c extension. Thus RubyMine cannot find pg.rb in load path.

0
Avatar
Permanently deleted user

Hello Guillermo,

We have an issue http://www.jetbrains.net/jira/browse/RUBY-4344. This will allow to enable codeinsight features like completion/resolve etc with libraries which  doesn't source code available.
Please vote, comment and track modification of it.

Regards,
Oleg

0
Avatar
Permanently deleted user

Thank you Oleg.

I look forward for the new release.

0

Please sign in to leave a comment.