我試着按照RVM中列出的說明嘗試使OpenSSL正常工作,以便Gist與pry一起使用。但是,儘管嘗試了所有建議,我仍然一直在獲取這些錯誤。我不知道這個結構是否足夠實驗不同的選擇。在設置RVM環境以使用Gist和OpenSSL時遇到困難
[email protected]:~/Downloads$ pry
[1] pry(main)> gist s.each_line
LoadError: cannot load such file -- openssl
from /home/stanley/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
[2] pry(main)>
[email protected]:~/Downloads$ gem install openssl
ERROR: Could not find a valid gem 'openssl' (>= 0) in any repository
ERROR: Possible alternatives: opendsl, OpenS3, open_dsl, opensrs, openurl
[email protected]:~/Downloads$ rm -rf $rvm_path/usr
[email protected]:~/Downloads$ rvm requirements
Requirements for Linux (DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10")
NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
This is the *original*/standard Ruby Language Interpreter
'ree' represents Ruby Enterprise Edition
'rbx' represents Rubinius
bash >= 4.1 required
curl is required
git is required (>= 1.7 for ruby-head)
patch is required (for 1.8 rubies and some ruby-head's).
To install rbx and/or Ruby 1.9 head (MRI) (eg. 1.9.2-head),
then you must install and use rvm 1.8.7 first.
Additional Dependencies:
# For Ruby/Ruby HEAD (MRI, Rubinius, & REE), install the following:
ruby: /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
# For JRuby, install the following:
jruby: /usr/bin/apt-get install curl g++ openjdk-6-jre-headless
jruby-head: /usr/bin/apt-get install ant openjdk-6-jdk
# For IronRuby, install the following:
ironruby: /usr/bin/apt-get install curl mono-2.0-devel
[email protected]:~/Downloads$ rvm reinstall 1.9.2 --with-openssl-dir=/usr/local
it seems that /home/stanley/.rvm/src/ruby-1.9.2-p320 is already non existent.
it seems that /home/stanley/.rvm/rubies/ruby-1.9.2-p320 is already non existent.
Removing ruby-1.9.2-p320 aliases...
Removing ruby-1.9.2-p320 wrappers...
Removing ruby-1.9.2-p320 environments...
Removing ruby-1.9.2-p320 binaries...
Fetching yaml-0.1.4.tar.gz to /home/stanley/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /home/stanley/.rvm/src
Prepare yaml in /home/stanley/.rvm/src/yaml-0.1.4.
Configuring yaml in /home/stanley/.rvm/src/yaml-0.1.4.
Compiling yaml in /home/stanley/.rvm/src/yaml-0.1.4.
Installing yaml to /home/stanley/.rvm/usr
Installing Ruby from source to: /home/stanley/.rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)...
ruby-1.9.2-p320 - #fetching
ruby-1.9.2-p320 - #downloading ruby-1.9.2-p320, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8770k 100 8770k 0 0 171k 0 0:00:50 0:00:50 --:--:-- 212k
ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /home/stanley/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #extracted to /home/stanley/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #configuring
ruby-1.9.2-p320 - #compiling
ruby-1.9.2-p320 - #installing
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.2-p320 ...
Installation of rubygems completed successfully.
ruby-1.9.2-p320 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.2-p320 - #importing default gemsets (/home/stanley/.rvm/gemsets/)
Install of ruby-1.9.2-p320 - #complete
[email protected]:~/Downloads$ pry
[1] pry(main)> gist s.each_line
LoadError: cannot load such file -- openssl
from /home/stanley/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
[2] pry(main)>
[email protected]:~/Downloads$ rvm pkg install openssl
Fetching openssl-0.9.8t.tar.gz to /home/stanley/.rvm/archives
Extracting openssl-0.9.8t.tar.gz to /home/stanley/.rvm/src
Configuring openssl in /home/stanley/.rvm/src/openssl-0.9.8t.
Compiling openssl in /home/stanley/.rvm/src/openssl-0.9.8t.
Installing openssl to /home/stanley/.rvm/usr
[email protected]:~/Downloads$ pry
[1] pry(main)> gist s.each_line
LoadError: cannot load such file -- openssl
from /home/stanley/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
[2] pry(main)>
[email protected]:~/Downloads$ rvm reinstall 1.9.2 --with-openssl-dir=$rvm_path/usr
Removing /home/stanley/.rvm/src/ruby-1.9.2-p320...
Removing /home/stanley/.rvm/rubies/ruby-1.9.2-p320...
Removing ruby-1.9.2-p320 aliases...
Removing ruby-1.9.2-p320 wrappers...
Removing ruby-1.9.2-p320 environments...
Removing ruby-1.9.2-p320 binaries...
Installing Ruby from source to: /home/stanley/.rvm/rubies/ruby-1.9.2-p320, this may take a while depending on your cpu(s)...
ruby-1.9.2-p320 - #fetching
ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /home/stanley/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #extracted to /home/stanley/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #configuring
ruby-1.9.2-p320 - #compiling
ruby-1.9.2-p320 - #installing
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.2-p320 ...
Installation of rubygems completed successfully.
ruby-1.9.2-p320 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.2-p320 - #importing default gemsets (/home/stanley/.rvm/gemsets/)
Install of ruby-1.9.2-p320 - #complete
[email protected]:~/Downloads$ pry
[1] pry(main)> gist s.each_line
LoadError: cannot load such file -- openssl
from /home/stanley/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
[2] pry(main)>
[email protected]:~/Downloads$ rvm --skip-autoreconf pkg install openssl
Fetching openssl-0.9.8t.tar.gz to /home/stanley/.rvm/archives
Extracting openssl-0.9.8t.tar.gz to /home/stanley/.rvm/src
Configuring openssl in /home/stanley/.rvm/src/openssl-0.9.8t.
Compiling openssl in /home/stanley/.rvm/src/openssl-0.9.8t.
Installing openssl to /home/stanley/.rvm/usr
[email protected]:~/Downloads$ pry
[1] pry(main)> gist s.each_line
LoadError: cannot load such file -- openssl
from /home/stanley/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
[2] pry(main)>
您有什麼建議可以解決此問題?在此先感謝您的幫助。
看起來RVM正在爲您提供一個解決方案。嘗試運行'/ usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses- dev automake libtool bison subversion'安裝Ruby的所有依賴項。 – matt