问题描述
我正在运行Logstash 1.4.1,与最新的相比,我的安装文件夹中没有找到任何包含gem信息(与github中的最新代码有那些gembag.rb,Gemfile等)
I am running Logstash 1.4.1, comparing to the latest, I can't find anywhere in my installation folders contains gem information (versus the latest code in github has those gembag.rb, Gemfile etc..)
我目前的问题是需要使用Logstash没有开箱的几个宝石,只需 require'gemname'
似乎不行。任何人都可以引导我阅读,解释如何添加这些第三方宝石,或向我展示一些可以做到这一点的示例代码。
My current issue is I need to use several gems that Logstash doesn't have out of box, simply require 'gemname'
seems doesn't work. Could anyone direct me to the readings that explains how to add these 3rd party gems or show me some sample codes which can do this.
非常感谢!
推荐答案
cd /opt/logstash
env GEM_HOME=vendor/bundle/jruby/1.9 GEM_PATH="" java -jar vendor/jar/jruby-complete-1.7.11.jar -S gem install gemname
如果要安装本地宝石文件,请将文件路径放在GEM_PATH中。
If you're installing a local gem file, put the path to the file in GEM_PATH.
这篇关于如何添加宝石到Logstash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!