Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Rails in Rubymine from subproject

Tags:

rubymine

spree

I'm using RubyMine 3.1.1 with Rails 3.0.9.

I have the Spree project cloned from Github, and I want to debug the server while working on the code. To do this, Spree includes a sandbox rake command that creates a subfolder (called sandbox) that contains an instance of the rails app, one that refers to the parent directory containing the source as its spree gem.

If I close the original project and open the sandbox subfolder as a new probect, I get the correct run configurations for development and production and I can successfully debug. However, this doesn't let me edit the spree code in the parent directory.

If I'm in the parent directory, the subfolder is there of course, but there's no rails run configurations and you can't add one as it says there is no rails server launcher in the project (or some facsimile of that message).

Anyone know how to make RubyMine recognize the run configurations for a subfolder?

like image 332
Binary Phile Avatar asked Nov 25 '22 11:11

Binary Phile


1 Answers

I ran across this conversation that resolved a very similar issue to what you're reporting.

The gist is that you can go into settings | project structure and then add your subdirectory as a source root. Then you can set up your run configuration with that subdirectory instead of the project root.

like image 102
DMac the Destroyer Avatar answered Dec 10 '22 20:12

DMac the Destroyer