gem 'logstash-devutils'

本文记录了使用gem 'logstash-devutils'开发Logstash插件的过程中遇到的问题及解决方案。作者最初尝试通过简单地运行bundle install来安装必要的组件,但遭遇了gem未找到的错误。最终发现必须使用jruby环境并按特定步骤配置才能成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

gem 'logstash-devutils'

需求

为了开发新的 logstash 插件

问题

原以为只是很简单的 bundle install 就能搞定的事情,实际却遇到了一堆问题。

1. clone git git@github.com:logstash-plugins/logstash-filter-example.git

2. cd logstash-filter-example

3. bundle install,结果报错:Could not find gem 'logstash-devutils'

复制代码
lcy@lcy:~/logstash-filter-example$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Could not find gem 'logstash-devutils' in any of the gem sources listed in your Gemfile or available on this machine.
复制代码

解决

最开始以为只是有依赖无法解决,于是一个个慢慢安装依赖包,,,最后才发现,原来需要使用 jruby !!!

1. rvm install jruby

2. rvm gemset create example

3. rvm use jruby-1.7.19@example

4. bundle install

5. OK 了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值