I don't think this is a specific RubyMine question/problem, but I've gone through the forums and have seen similar problems addressed, so I thought maybe someone might be able to help me.
The crux of the problem is where the gems are installed. When I first used RubyMine (which I love!) I noticed it installed gems to my home directory : /home/larry/.gem/ruby/1.8/gems. The problem was I had already installed Phusion Passenger's Enterprise Ruby and it had created and populated a different directory with gems: /opt/ruby-enterprise/lib/ruby/gems/1.8/gems. I'll refer to these two directories as /larry and /enterprise from now on.
I decided to keep all of my gems in /enterprise because (a) a bunch were there already and (b) I thought I was asking for trouble if I had gems living in 2 different directories.
But now I'm thinking that might be causeing me problems...
I have cucumber installed in my project's /vendor directory. It requires the treetop gem. That is not vendored, rather it lives in the /enterprise directory. A few days ago I also noticed it somehow made its way into the /larry directory - so I deleted it. Now I can't fire up my app (i.e. mongrel) from RubyMine because it complains that cucumber is missing treetop. The funny part is that all of my cucumber tests still run fine - so cucumber is finding it.
It seems that gems are looking for other gems and not finding them. I ran the 'gem environment' command as per someone's suggestion in one of your forums and it spit out that my GEM PATHS: were both the /enterprise/~~~ (listed first) and /larry/~~~~ (listed second).
Should I be putting gems in my /larry directory as well? Should I remove the corresponding ones from the /enterprise directory if I do? (It seems having two copies is just asking for trouble.)
Could it be an access-privilege problem? I'm thinking maybe during startup that cucumber (via RubyMine) is trying to access the treetop gem, but it isn't allowed to look in /enterprise so it decides to look for it in /larry and then complains when it can't find it.
Sorry if this question is a little off-kilter. But it's one of those things I'm hoping someone will "just know" and will share their solution.