This setting is located in File | Settings (Preferences on Mac) | Editor | Appearance | Show line numbers:
File
Settings
Preferences
Editor
Appearance
On Rubymine 7.1, using a Mac, I found it under:
Near the top is a Show line numbers checkbox. See illustration.
Show line numbers
On RubyMine 6.3 I used File->Settings...->Editor->Appearance and checked the box "Show line numbers" to enable them.