Any suggestions for configuring project to follow existing folder conventions

I have a few project that have an existing project structure, but I'm not sure how to setup RubyMine to best work with it for both auto-completion and for launch configurations. The folder layout looks like this.

ROOT/
         src/
              main/
                      ruby/
                             file1.rb
                             folder1/
                                       file2.rb
              test/
                     ruby/
                            file1_harness.rb

Any thoughts? If there are some better practices, I'm willing to check them out and consider them, so post that as well.

Thanks.

3 comments
Comment actions Permalink

Hello Nathan,

Sorry for long waiting for reply.

And where 'lib' folder will be located?

I think the better way is to
1. open ROOT folder in RubyMine
2. mark 'test' folder as 'Test Sources' (File | Settings | Project Structure)
3. probably add "src" folder to autocompletion loadpath (File | Settings | Project Structure | Load Path)
4. probably set default work directory to ROOT or ROOT/src/ folders in Run | Edit Configurations | Edit Defaults

Any thoughts? If there are some better practices, I'm willing to check them out and consider them, so post that as well.

And what do you think about structure similar to rails application

ROOT /
  main /
    file1.rb
    folder1/
      file2.rb
  lib /
  test /
  ruby /
   file1_harness.rb




Probably "src" folder is Java style because in Java folder structure is related to packages

0
Comment actions Permalink

Thanks for the reply. Can you give any advice on importing this project in RubyMine and configuring the Project Structure, Load Path and whatever else?

http://svn.apache.org/repos/asf/lucene/solr/trunk/client/ruby/solr-ruby/

The main code is under 'lib' which has a peer 'test' folder. When I do a plain open of the directory and try to run the tests, it fails to find the 'solr' folder in the requires.

Perhaps this is just a limitation of the current version - run as always requires tweaking for plain Ruby projects. If so, is this something that's being enhanced for 1.5 or beyond? I'd like to just be able to mark the root source and test paths and have all features (auto-complete, inspection, run as, debug as) just work without config.

0
Comment actions Permalink

I think I figured out what I'm looking for and decided to log an enhancement request - http://www.jetbrains.net/jira/browse/RUBY-4601.

0

Please sign in to leave a comment.