爲了開發新的 logstash 插件git
原覺得只是很簡單的 bundle install 就能搞定的事情,實際卻遇到了一堆問題。github
1. clone git git@github.com:logstash-plugins/logstash-filter-example.gitruby
2. cd logstash-filter-examplethis
3. bundle install,結果報錯:Could not find gem 'logstash-devutils'spa
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 jrubycode
2. rvm gemset create exampleblog
3. rvm use jruby-1.7.19@example開發
4. bundle installit
5. OK 了。