[test@localhost usr]$ /usr/local/ruby/bin/gem install bundler ERROR: Loading command: install (LoadError) cannot load such file -- openssl ERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass
在用源碼安裝ruby之后,想要安裝bundler,卻報出上面錯誤
\curl -sSL https://get.rvm.io | bash
rvm pkg install openssl
重新編譯
./configure --prefix=/opt/ruby20 --with-openssl-dir=/home/test/.rvm/usr
最后可能會提示如下的錯誤,不用管他
configure: WARNING: unrecognized options: --with-openssl-dir
make make install
沒有問題了
[root@localhost ruby-2.0.0-p598]# /opt/ruby20/bin/gem install bundler -V GET https://rubygems.org/latest_specs.4.8.gz 302 Moved Temporarily GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
如果報出這個警告:
'rvm pkg ...' is deprecated
則采用
rvm autolibs