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

3982

被折叠的 条评论
为什么被折叠?



