Set source directory

I got one Rails project with unusual directory scheme:
* doc
* src
     * app
     * config
     * ...

Rails application is in src directory. I open a root dir in RM couse I like to have git support in IDE. But in such case RM can't see Rakefile and I am unable to run rake tasks from RubyMine. I there any option to mark 'src' directory as source code root or something?

4 comments
Comment actions Permalink

. I open a root dir in RM couse I like to have git support in IDE.

You can open 'src' dir as project in RubyMine and configure git root as src parent folder. I'll find mappings in RubyMine | File | Settings | Version Control dialog

0
Comment actions Permalink

Awsome! This is exactly what I need! Thank you Roman

0
Comment actions Permalink

I have a similar problem, but the solution does not seem so easy.  Our existing (large) Rails application also has a peculiar directory structure: the Gemfile and the .rvmrc file are in the directory above the home directory of the Rails application.  (There's a reason for this; the parent directory also contains other non-Rails Ruby scripts.)

To get RubyMine to correctly locate and use the Gemfile and the .rvmrc file, I need to open RubyMine to the directory that contains those files.  But then RubyMine doesn't know where to find the Rails application.

Is there some way to specify the directory that containst the Rails application itself?  Also, we have some custom-defined environments, like development_secure, and production_preview, but the Environment drop-down in the Run/Debug configurations shows only the pre-configured standard Environments:  development, test, production.

Need to figure out how to set this up .. I want to be able to debug our existing application with the RubyMine IDE.

Thanks!

0
Comment actions Permalink

Well, I found a workaround -- rather than setting up a Rails configuration, I just set up a Ruby configuration, which gives me the option to specify the location of the script file to execute, and environment variables to set.

0

Please sign in to leave a comment.