Sunday, 15 August 2010

ruby - Run gem from local source code -


I am currently working on developing a gem and I want to run that gem from the command line and point it out My local source wants to be enabled before I specified this path in the gem file and in the rail but now I would like to run the gem on a non-rail app. So I would like to know how to call the gem from the command line and specify that I want to use the source code in a specific directory. For example, I can CD in the directory that I want to run it but do something like: ruby ​​my_gem - path = ~ / code / mygem

Apart from this, do I have to make them gem or can I run it without the source of construction?

From your gem's root directory, try it lib / MyGem.rb :

  Ruby - Eliib Lib / Meiji. RB  

or test your gem interactive:

  irb-ilib> 'Mygem' true  
is required

No comments:

Post a Comment