Call a rubygem's binary executable from inside my rails applications?

不羁岁月 提交于 2020-01-07 05:10:11

问题


I know that bundler makes a gems executables available using the bundle exec command. I want to understand how I can call these executables from inside a controller action or model class method? I don't see anything about this in the Bundler doco.


回答1:


Executables are ruby scripts sitting in the bin directory of the gems and their behavior depend on each gem. They are wrappers around the gems classes/APIs: simply dig into the source code of the gems you target and mimic the behavior of their CLIs.



来源:https://stackoverflow.com/questions/14011404/call-a-rubygems-binary-executable-from-inside-my-rails-applications

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