RubyGem FPM出错

时间:2015-11-26 12:09:19

标签: rubygems grafana

我正在尝试Grafana,我正在关注其instructions,以便从源代码构建它。

虽然,当我开始创建优化发布包时,在安装FPM(v.1.4.0)后,我不断收到同样的错误:

$ fpm
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- ffi (LoadError)
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/fpm-1.4.0/lib/fpm/util.rb:3
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/fpm-1.4.0/lib/fpm/package.rb:2
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/fpm-1.4.0/lib/fpm.rb:3
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/fpm-1.4.0/bin/fpm:5
    from /usr/bin/fpm:19:in `load'
    from /usr/bin/fpm:19

关于它可能是什么的任何想法?我在RedHat EL6 64位机器上。

1 个答案:

答案 0 :(得分:0)

经过大量的搜索和大量的反复试验后,我通过以下命令找到了解决问题的方法:

gem install --http_proxy http://username:password@proxy fpm

问题在于如何正确使用 gem 命令来绕过我公司的代理并获取所有FPM的依赖项。