如何将 gems 添加到 Logstash [英] How to add gems into Logstash

查看:36
本文介绍了如何将 gems 添加到 Logstash的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行 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 没有开箱即用的几个 gem,只是 require 'gemname' 似乎不起作用.任何人都可以指导我阅读解释如何添加这些 3rd 方 gem 的阅读材料或向我展示一些可以执行此操作的示例代码.

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 文件,请将文件路径放在 GEM_PATH 中.

If you're installing a local gem file, put the path to the file in GEM_PATH.

这篇关于如何将 gems 添加到 Logstash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆