Firstly, install the
aspell-no package:
sudo apt-get install aspell-no
Secondly, convert the just installed Norwegian Bokmål dictionary to the format appropriate for RubyMine:
aspell --lang nb dump master | aspell --lang nb expand | tr ' ' '\n' > nb.dic
Thirdly, open the RubyMine settings dialog, find "Spelling" in the "Project Settings" section and switch to the "Dictionaries" tab. Then press "Add" in the "Custom Dictionaries Folder" section and choose the folder where you've just created the
nb.dic file.
The process of converting and adding dictionary for any other language should be similar.