IntelliJ Plugin - Syntax Highlighting Not Working

Hello,

I have a Rails project running in Ruby 2.1.2 that I am struggling with getting syntax highlighting to work. When I "Open" my rails project it says "jRuby on Rails, jRuby frameworks are detected in project". Why is it saying jRuby?

I click "Configure" int the baloon and leave the defaults checkmarked. I then get errors saying there are missing gems and this:

"Error:Bundler::RubyVersionMismatch: Your Ruby version is 1.9.3, but your Gemfile specified 2.1.2"

There are a few different places in the UI where I see ruby versions mentioned, im just not sure exactly which one will fix my issue. I just want to set my project up in IntelliJ to use ruby 2.1.2 and Rails.

7 comments
Comment actions Permalink

I would add that when I try to add a Rails debugger configuration it tells me "No rails found in sdk", which is another issue.

0
Comment actions Permalink

Could you in Settings -> Languages and Frameworks -> Ruby SDK and Gems specify preferred Ruby version and click "Apply"?

0
Comment actions Permalink

That option is not there. This is the IntelliJ Ruby plugin I am using.

0
Comment actions Permalink

Settings -> File Types and the same operations from my previous post

0
Comment actions Permalink

Ultimately I need code-completion, syntax highlighting, and remote debugging to work. I have created a new project numerous times but after trying to edit the project settings I always end up with either broken syntax highlighting, or "No rails found in SDK". I have various RVM versions of ruby on my Mac, and also a jRuby from somewhere that doesn't work with Rails 2.x. Is there something I need to do in my environment?

0
Comment actions Permalink

If you have opened an existant rails app in Idea then it created java module with JRuby facet for it.
To fix this I'd suggest to close the project, delete .idea, and create a Ruby module from existing sources.

Hope this helps, Oleg.

0

Please sign in to leave a comment.