RubyMine new user questions

Hi,
I'm trying out the free trial version of RubyMine 3.0.1 on Ubuntu 10.10. Mostly I'm finding my way around OK, but I have a few basic questions:

* the right-click behaviour seems odd - I have to click and drag the right button to show context menu, rather than the normal affordance which is to click and release. Is this expected behaviour?

* I'd like to re-run a single failing rspec test, but I couldn't see how to do that - I could only find how to re-run the entire rspec spec file

* My sinatra application is started from a rackup config.ru, but I couldn't see how to run a rackup application inside RubyMine (one of the main reasons I'm interesed in RubyMine is for the debugger)

* I'm confused what installing/attaching a gem does in RubyMine. All of the gems my project uses are already loaded by rvm, but I seem to have to re-install them under RubyMine. Where are these gems being installed to, and why can't RubyMine re-use the gems that rvm has already cached?

Thanks for any comments,
Ian

4 comments
Comment actions Permalink

Hi,

Can't answer the others :-( but to run a single RSpec spec, you can right-click on the word 'describe'.  One of the choices is "Run FooController" (or whatever the context is) and it just runs that.  Then, once you've done that, the Run/Debug drop-down in the top right corner will list that as the current choice, so you can just click the green triangle to run it again.

0
Comment actions Permalink

Hi,

* I'm confused what installing/attaching a gem does in RubyMine. All of the gems my project uses are already loaded by rvm, but I seem to have to re-install them under RubyMine. Where are these gems being installed to, and why can't RubyMine re-use the gems that rvm has already cached?


RubyMine re-uses gems already installed in your ruby SDK. Please check that your application uses correct ruby sdk - "RubyMine | File | Settings | Ruby SDK and Gems" dialog.

"Attach" gem means to tell RubyMine that your application uses the gem and it should be indexed, parsed, etc. Also RubyMine turns on/off some features (e.g. specific codecompletion etc) according to attached gems list. It doesn't influence on run-time application behaviour, just on RubyMine code insight support

If RubyMine detects that gem isn't installed in current project SDK it will suggest to install the gem & attach to project. If your application uses bundler, RubyMine will just launch bundle install.

0
Comment actions Permalink

Maybe this is a stupid question, but is there any reason why a gem that IS NOT defined in the Gemfile and installed with bundle install should be indexed, parsed, used for code completion?

In my opinion it's not DRY at all to "attach" gems within RM it, but maybe I'm totally wrong?

Hubert

0
Comment actions Permalink

Gem Manager in RubyMine was implemented before bundler gem had appeared. That's why it isn't DRY. In future versions we will remove "attach" gem concept but at the moment lots of internal things relies on it so we cannot safely remove it in minor ide update.

0

Please sign in to leave a comment.