Newbie here. I've used RubyMine a bit in the last 2 weeks in order to evaluate it, seeking refuge from Oracle's recent smart decision about NetBeans. I like RubyMine so far, I only have a few of questions.
None of these questions are Rails-related, because we don't have Rails projects => our typical work in ruby is not related to web development, but rather processing log files, parsing queries for CSV reports and stuff like that. We are mainly a Java shop (we use Eclipse for all our Java development).
1) We have a few projects configured for NetBeans, with specs following the typical NetBeans structure
- All ruby files are under project directory "lib"
- All specs are under project directory "spec"
Is there any specific advice on how to import NetBeans projects?
When I've tried executing the specs of one of these projects I've got some errors, while I had none under NetBeans. It appears that, while under NetBeans the path of the "lib" folder is automatically added to the load path, that's not the case in RubyMine.
So, is it enough to just add the "lib" folder to the load path under File > Settings > Project Structure > Load Path? See also question #3 below.
2) One of those projects is based on JRuby. How do I configure a JRuby SDK so that it recognizes all existing gems and paths based on the interpreter?
I've tried adding JRuby as an SDK but it seems that it keeps the existing gems configuration.
3) I've created a project on my own with unit tests. I like the convention of keeping source files under "lib" and tests under "test". I've marked the directory "test" as a Test Source. Everything is fine if I execute all tests and I keep referring to library classes as "lib/something" in every test, but as I start trying to run an individual test file I get into errors. For example, event_parser_test.rb has the following requires:
When I try to execute it by itself I get:
/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/xxx/Workspaces/RubyMine/PerformanceReporting/test/event_parser_test.rb
Testing started at 9:14 AM ...
/Users/xxx/Workspaces/RubyMine/PerformanceReporting/test/event_parser_test.rb:2:in `require': no such file to load -- lib/event_parser (LoadError)
from -e:1:in `load'
Process finished with exit code 1
Empty test suite.
Note that I've tried configuring both /Users/xxx/Workspaces/RubyMine/PerformanceReporting and its lib subdirectory in the Load Path, but nothing changes.
4) I love keyboard shortcuts. The most important ones are related to navigation, IMO. It seems to me that there are basically 2 options in RubyMine:
- Use cmd+[, cmd+] to go back and forth in navigation history
- Use cmd+shift+[, cmd+shift+] to go to the previous/next file in the order in which the tabs are displayed
Is there anything like cmd+F6 and cmd+e in Eclipse, which present also the list of currently open files? In addition, is there anything like cmd+F6 that allows you to go through all files, resorting all the times based on most recently visited file? cmd+n is nice BTW, a bit like cmd+e in Eclipse (but it works on all files, not only on already opened ones).