Cannot find 'xxxx' using type inference

Hi there

I'm seeing this error on most ActiveRecord objects in my Rails project.  I assume it's because I need to run 'Analyze dependencies' or 'Inspect Code' from the Analyze menu?   However, each time I try that RubyMine complains about a lack of memory.  I've tried putting -Xmx to 768 on the following screen but it still fails:

Picture 1.png

Is this a known issue?

I'm using RubyMine #535 on a Mac

1 comment
Comment actions Permalink

Hi lylo,

I'm seeing this error on most ActiveRecord objects in my Rails project.  I assume it's because I need to run 'Analyze dependencies' or 'Inspect Code' from the Analyze menu?

Rails uses a lot of dynamic "magic". We continuously improve our Rails support but some cases are still unsupported. Please provide us some examples from your project.

I need to run 'Analyze dependencies' or 'Inspect Code' from the Analyze menu?


You shouldn't run these for enabling/improving autocompletion/resolve support. These actions allow you to inspect all files from project, collect problems by each inspection and show results in one table. E.g you can search all warnings about duplicate constant definition from your project, etc.

However, each time I try that RubyMine complains about a lack of memory.  I've tried putting -Xmx to 768 on the following screen but it still fails:


Picture 1.png


Is this a known issue?


I'm using RubyMine #535 on a Mac

Maximum Java Heap size (-Xmx option) in range 192-350 MB should be enough for RubyMine. Please take a CPU snapshot for us:


* Run RubyMine and you should notice 2 new buttons in the toolbar, one for taking CPU snapshot, another one for memory snapshot. Press the CPU button and then perform the action which takes a lot of CPU resources on your machine. When finished press this button again to stop recording
* Save the snapshot and upload it toftp://ftp.intellij.net/.uploads/. Then tell us the file name and we'll investigate the issue.





 


Also open Info.plist (located in /Applications/RubyMine-XXX.app/Contents), find Root -> Java -> VMOptions in Property editor or find string in text editor:

<key>VMOptions</key> <string>-Xms16m -Xmx192m -XX:MaxPermSize=120m -Xbootclasspath/a:../lib/boot.jar -ea -agentlib:yjpagent=disablej2ee</string>


 

Append *-XX:+HeapDumpOnOutOfMemoryError* option before </string> :

<key>VMOptions</key> <string>-Xms16m -Xmx192m -XX:MaxPermSize=120m -Xbootclasspath/a:../lib/boot.jar -ea -agentlib:yjpagent=disablej2ee -XX:+HeapDumpOnOutOfMemoryError</string>


 

These changes will be applied after you restart RubyMine. Now if RubyMine crashes with OutOfMemory error it will create memory snapshot in ~/Snapshots folder.



0

Please sign in to leave a comment.