Rubymine supports keybinding to switch panes by hotkey like awesome window manager users are used to.
Type "splitter" in the top right keymap section search field (not the global settings search).
Note: A splitter
is what you get after using split vertically
or split horizontally
.
It is good programming practice to Don't Repeat Yourself (or DRY). In Ruby on Rails we keep our code DRY by sharing behavior by using inheritance, modules, traits or partials.
When you reuse behavior you want to reuse tests as well. You are probably already reusing examples in unit tests. Unfortunately it is much harder to reuse code when writing integration tests with Cucumber, where you need t...
To make this go away I had to wipe my RubyMine settings (~/.RubyMine
) and configure everything again. Fun.
<Project>
to Git
Awesome color schemes for RubyMine, Sublime Text 2 and other editors.
To install the themes into your Rubymine, copy intellij-themes/*.xml
from the repository to your local ~/.RubyMine40/config/colors
. Then restart RubyMine.
Enjoy!
There is no reason to leave trailing whitespace characters in your project's files, so don't add any.
A git diff --check
will tell you if there are any and you should not commit when you see them. So go ahead and switch your editor/IDE to automatically remove them for you.
Below are a few instructions on how to get them removed by your favorite IDE or editor.
Note that except for RubyMine, the following changes will remove trailing white-space on all lines, not only those that you changed.
While this should not be a problem if your proje...
You can quickly access views that belong to a controller by using the tiny "page with arrow" icon in the gutter:
Click the icon next to the method definition in the controller.
If a view file does not yet exist, RubyMine will prompt you for its filename.
For a list of all views and partials that belong to the current ...
A number of issues concerning Sass/SCSS autocompletion and syntax highlighting were submitted as a feedback for RubyMine 4.5. Web development with Rails can’t do without Sass/SCSS code writing so we’ve decided to fix the most annoying bugs as soon as possible.
I highly recommend that you make use of RubyMine's feature to pin tabs.
When you pin all "important" files, you can follow method definitions, wildly open files from search results and have a ton of open tabs -- without the problem of finding the stuff you were working on before.
If your project uses another version than your default Ruby, RubyMine will give you incorrect inspections, for example.\
Here is how to switch which Ruby you use in RubyMine.
Ctrl+Alt+S
)Though it may seem you are changing a global setting here, this is in fact a per-project setting, as are all things you change in the "Project Settings [your_project_name]" area of the global settings dialog.
When you switch to another proje...
Every time I started RubyMine, it opened the main window on the left monitor -- when moving it to the center monitor and closing it, the next time it still opened up on the left one.
Here is how I forced RubyMine to start up on a different screen:
That's crazy!
Under Settings / Appearance you can uncheck a box Animate windows. This will change your life.
This setting seems to not exist anymore.
You are looking for a functionality in RubyMine but don't know or remember its keyboard shortcut or which menu it is located in?\
Hit Ctrl+Shift+A
.
This will bring up the "Find Action" box where you can enter an action's name or category. Pick the result from the list to run it.
The list of results will also show you any assigned keyboard shortcuts.
RubyMine offers you to exclude directories from search, meaning faster search results and less "noise" in the list of result.
Right-click a folder in your project tree and click "Mark Directory As" → "Excluded".
Do it for your your log, data, and other directories that you don't need to access during development and whose search results are irrelevant.
They won't be deleted but simply ignored when searching across a project's files.
![](https://makandracards.com/makandra/6635-rubymine-exclude-data-and-log-directories-from-a-project/atta...
You can use heredoc to avoid endlessly long lines of code that nobody can read. Heredoc strings preserve linebreaks and can be used like this:
def long_message
puts(<<-EOT)
Here goes a very long message...
Sincerely,
foobear
EOT
end
<<-EOT
will be somewhat of a placeholder: anything you write in the line after you used it will be its value until you write EOT
in a single line.
You can use any string to flag your heredocs. To be more verbose you...
If you want to use the (badly implemented!) solarized color scheme in your Rubymine IDE:
Clone the IntelliJ IDEA port:
git clone https://github.com/jkaving/intellij-colors-solarized.git
Import the settings in Rubymine by chosing the above directory File -> Import Settings
Change the color scheme in the settings (Ctrl-Alt-S) in Editor -> Colors & Fonts
Note that selecting a color scheme will also reset your previous editor font choice. You might want to change the font to [Envy Code R](http://damieng.com/blog/2008/05/2...
My RubyMine (and it seems like many other Java GUI applications) crashes the Compiz window decorator almost every time on exit. This also seems to happen for the Unity decorator.
Update: The commited fix from below seems to have made it into the stable Ubuntu repository.
You can restore window decorations by executing this command:
gtk-window-decorator --replace &
This is only a temporary fix.
Also, there is a committed fix that is n...
This card explains how to upgrade an existing RubyMine installation to a newer version. If you're installing RubyMine for the first time, see install RubyMine under Ubuntu. You might also consider installing RubyMine with snap, so it can receive automatic updates (also described in the install card).
This procedure ensures that an update does not totally break your IDE, as it allows you to keep both the previous and the new version of RubyMine:
To activate the shell command, go to Tools > Create Command-line Launcher
and confirm.
Now you have mine
as bash command. Run this to open a project in RubyMine:
mine path/to/my_project
The mine
script will attach the opened project to a current Rubymine instance. If there is none, it will run Rubymine right there on your command line.
To move Rubymine to the background and suppress log messages you can create your own shell script (vim ~/bin/rubymine
):
#!/bin/sh
( mine "$@" & ) > /dev/null ...
This card explains how to install RubyMine for the first time. If you want to upgrade an existing RubyMine installation (after legacy install) to a newer version, see How to upgrade RubyMine.
Ubuntu 16.04 comes with snap, a way to package software with all its dependencies. RubyMine is also packaged as a snap.
A snap will always track a channel
(like stable
, beta
) and automatically update to the newest version available in this channel. By default the snap daemon will check for ...
If you did file operations inside a shell or for example using Nautilus, it can take quite a while until RubyMine takes note of them and updates things like your project tree or its internal file list.
Flushing file system buffers helps you out (run it from a terminal):
sync
This is also possibly via the RubyMine menus: File → Synchronize.
Note that you should disable the Java plug-in in your browsers after installation.
Java 11
sudo apt install openjdk-11-jre-headless
Java 10
sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get update
sudo apt-get install oracle-java10-installer
Java 8
You probably want to get rid of OpenJDK (which is installed by default and leads to bad RubyMine performance):
...
Since RubyMine 3.1 you can drag tabs across panes/windows and out of the main window to create new windows.
For any version below 3.1 do it like this (will only allow dragging tabs inside their pane, not across panes):
Seriously.