Is it possible to get Ruby syntax highlighting in PHPStorm?

PhpRubyPhpstorm

Php Problem Overview


I found this but honestly not sure how to install it or whether it applies. Thanks!

Php Solutions


Solution 1 - Php

Ruby plug-in that you have linked is designed for IntelliJ IDEA Ultimate only, it will not work with PhpStorm. See this answer for more details.

However, it's possible to get the basic syntax highlighting for Ruby files in PhpStorm using the TextMate bundles support plug-in. It's already included with PhpStorm 6.0.1 and you don't need to install it, just make sure it's enabled in Settings | Plugins.

  1. Git clone Ruby.tmbundle into some directory.

  2. Add this directory in Settings | TextMate Bundles:

Ruby bundle

For some reason PhpStorm TextMate Bundles support will not recognize *.rb files as supported by this bundle. To fix this problem open Ruby.tmbundle\Syntaxes\Ruby.plist file in some text editor, find <key>fileTypes</key> section, add <string>rb</string> under <array>

(the above should be fixed in the latest Ruby bundle version, so the editing the bundle is no longer needed, but if you are adding some other language bundle, it's something you may need to adjust)

Restart PhpStorm, verify that *.rb is now associated correctly:

association

Now you get Ruby syntax highlighting in PhpStorm:

Ruby syntax


If you need full support for both Ruby and PHP (plus much more) in a single IDE, consider using IntelliJ IDEA Ultimate.

Solution 2 - Php

CrazyCoder's git repo doesn't work in windows systems, as a large number of the filenames are invalid in Windows.

I have, however, found the official repo for ruby for textmate:

https://github.com/textmate/ruby.tmbundle

Solution 3 - Php

I actually copied over my PhpStorm theme to RubyMine with no issue, so it should go both ways.

I went as far as to create a TextMate keymap for PhpStorm as well, you can take a look here: http://tentaclecms.com/blog/2013/08/textmate-keymap-for-phpstorm/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionjcrollView Question on Stackoverflow
Solution 1 - PhpCrazyCoderView Answer on Stackoverflow
Solution 2 - PhpPopulusView Answer on Stackoverflow
Solution 3 - PhpAdam PattersonView Answer on Stackoverflow