Has anybody figured out to make ruby language level actually work reliably

I've been having problems getting idea to use ruby language level 2.x for over year. In some projects it works, in others it does not. In all my projects I am using a ruby jdk with language level 2.x. But in some of the projects idea just not care. The docs show setting the ruby language level in the settings langauges/frameworks, but ruby does not appear there.

I have (if I recall) been able to create a project from scratch and get the language level to take, but never when importing a directory into a project.

Is there some magic incarnation that can make an existing project use the specified language level?

4 comments
Comment actions Permalink

memelet wrote:

but ruby does not appear there.


Hello! Could you specify whether no ruby sdk appear in File | Project Structure | Platform Settings | SDKs? In addition, what IDEA and Ruby plugin version are you running?

0
Comment actions Permalink

The ruby in project-settings/sdks is from rbenv:
- path: /home/bkaplan/.rbenv/versions/2.1.1/bin/ruby
- language level: 2.1 (dimmed)

Idea version: 14.1.2

ruby plugin version: 7.1.0.20150416

0
Comment actions Permalink

Could you update IDEA to 14.1.4, plugin version in that case would be 7.1.0.20150617. If the problem persists, please specify where ruby doesn't appear (probably a screenshot would be useful)

0
Comment actions Permalink

Upgraded to latest 14.1.x and latest Ruby plugin. Still no Ruby in Languages and Frameworks.

Screenshot from 2015-07-20 09:28:31.png

Ruby does have the correct language level though:

Screenshot from 2015-07-20 09:30:50.png
Screenshot from 2015-07-20 09:31:46.png

This one project, but all my projects look like this. However, some will give errors
for, eg 2.x hash syntax, and others will not. I cannot figure out why.

0

Please sign in to leave a comment.