How do I add a module to a ruby mine project ?

TIMFOX123 used Ask the Experts™
I have rubymine ide and have read some good things about modules.  I want to put all my reuseable code in a module and use that as a basis for all my code, forever and ever.

The gui does not have a "file /new /module".

If I put it in a project, how do I find it for later projects ?  Should i put in a symlink ?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
My teacher has a great page for our scripting class. This section is about modules and it should be helpful.¬es=10
Here are some links that show how to extract a module from existing code in RubyMind:

Much of the code I've seen puts modules into a separate 'lib' directory inside your project. If you want to use the module from several projects, you'll have to put it into a separate library and then make that library available to Ruby in the project that uses it (gems do that by dropping their code into a subdirectory that ruby already knows about and then initializing themselves).

Take a look at for how gems are structured / created for some insight into this.


Jesii - great job, by the way I have paid for my ide, wating for lic.    

Mhamel - thanks for the class, will be using it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial