How to package and release a Ruby application?

落花浮王杯 提交于 2019-12-25 01:47:08

问题


I,ve got a Ruby app (so no Rails!) and want to release it to 'the public'. On my mac, I've set up the $PATH to include the bin directory of my app, so I can just type executable_name as a command.

However, when somebody installs the app, they would have to add the bin directory to their $PATH like I did. This is not as easy as I would like. Is it possible to let users install with Homebrew or something similar? Or maybe I'm missing something I did't know about? How do you guys generally go about this?

For the sake of completeness -> the file structure:

|- my_application

   |- bin
      |- executable

   |- lib
      |- my_class.rb
      |- my_class.rb
      |- my_class.rb

   |- tests
      |- my_tests.rb

回答1:


In Ruby any lib/application called gem and should be installed via rubygems. Read how make your own gem. This all what you need.

It is contain section about adding executable



来源:https://stackoverflow.com/questions/27145599/how-to-package-and-release-a-ruby-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!