After a recent Ubuntu update I didn't see the main menu bar of the RubyMine IDE (
File | Edit | View | ...) anymore.
This could be solved by changing a RubyMine registry entry:
ctrl + alt + n> click on
registry> click on
linux.native.menuand disable the checkbox
After rebooting RubyMine, you'll have gotten the menu bar back.
To disable the mostly useless automatic suggestion popups in RubyMine, go to File / Settings, then to Editor / General / Code Completion and uncheck Auto-display code completion.
You can still open the popup by pressing
CTRL + Space. And you probably want to use Context-dependent word expansion instead, anyway.
One of the many useful features of TextMate is autocompletion of words. If I were in TextMate right now, I could write "au[tab]", and it would complete it to "autocompletion". RubyMine can do this, too. When you write a word (e.g. a variable name), just hit ALT + / repeatedly and it will offer all completions for the letters you typed. This action is called Cyclic Expand Word in RubyMine / IntelliJ IDEA.
This feature keeps you from mistyping variable names, saves you keystrokes and speeds up development. ~10 keystrokes to the price ...
RubyMine has a HTTP Client that can be useful to test web APIs.
Just create a
.http scratch file an write your request in it.
The request can then be executed with the "Run all requests in File" button above the file.
The format for request is like this:
Method Request-URI HTTP-Version Header-field: Header-val...
If you need to test some HTML, e.g. an embed code, you can use RubyMine's "scratch files":
Ctrl + Shift + Alt + Ins)
RubyMine allows bookmarking lines of code. This is super-helpful when working on a complex problem.
I've been using this feature for a few years now, and so should you! :)
Here are the default Linux/Windows keystrokes. See the documentation for other keybindings.
A gray checkmark will be shown in the gutter on the left.
If you press
F11 again on a bookmarked line, the bookmark will be removed.
Sometimes, due to git or other "accidents", important files get deleted or overwritten.
At a state when even Ctrl+Z doesn't work anymore, you maybe can rescue your files with RubyMines "Local History"-Feature!
To do this try the following:
RubyMine comes with a nice way to grep through your project's files: The finder (
ctrl + shift + f). Don't be discouraged about the notice
100+ matches in n+ files if your searched keyword is too general or widely used in your project.
RubyMine comes with a few ways to narrow down the resulting list, don't hesitate to apply those filters to speed up your search. Your keybinding might vary based on your personal settings.
alt + k)
If you already know the file extension of your ...
If your Ruby project includes a gem like Spreewald that comes with some external step definition, RubyMine does not know about them by default and will highlight the step as an undefined reference:
To link these external step definitions to RubyMine, add the corresponding gems to your RubyMine-Settings:
ctrl + alt + s)
V you can select a recently copied string for pasting.
If your Rubymine does not recognize a file type correctly although you have entered the unmistakeable file extension like
material_orders_controller.rb, this may help you:
Sometimes you create a new file and forget to enter the ending like
Rubymine handles such files per default as simple txt files.
You delete this file and create a new one with correct ending:
material_orders_controller.rb. But still Rubymine treats this file as text file, no highlighting is available.
Since the Spell checker german dictionary plugin is not maintained anymore, here is another way to use a german dictionary.
Hunspellplugin and restart Ruby Mine
sudo apt install hunspell-de-de
/usr/share/hunspell/de_DE.dicin File > Settings > Editor > Spelling > Custom Directory +
There are times when you have a chunk of text that you want to do something with, e.g. replace something on it, or quickly edit it.
While you can open your favorite non-RubyMine editor for this, there is also a plugin: Scratch.
It allows RubyMine to open temporary files (actually they are saved, but somewhere inside the plugin's directory) so you don't need to switch to a text editor like gEdit that works differently and may not even offer what you are used to.
Note that RubyMine also offers so...
When you find yourself constantly ignoring a RubyMine warning, you can simple disable that warning and de-clutter your editor. E.g. in my Cucumber scenarios RubyMine underlines 90% of all lines because it does not know about spreewald, making the file really hard to read.
You can disable any unwanted inspection by opening
File / Settings / Editor / Inspections and searching for the warning text.
What you disable or keep is up to your personal preference. I personally disable at least the following...
iconv -f UTF-16 -t UTF-8 de_neu.dic -o ~/Documents/dic/de_neu_utf8.dic
If another session is accessing your database you are trying to reset or drop you might have seen the following error:
PG::ObjectInUse: ERROR: database "foo_development" is being accessed by other users DETAIL: There is 1 other session using the database.
This could be the rails server, rubymine and many more. Beside terminating the session connection manually you can also find out the
pid and kill the process.
SELECT * FROM pg_stat_activity;
datid | 98359 datname | foo_developm...
RubyMine provides a visual tool for resolving merge conflicts locally.
Git > Resolve Conflicts
in the context menu to open RubyMine's merge conflict tool.
You can also use a similar pane view to compare to files.
Mark two files and press
Ctrl + D to compare.