因此我尝试安装 heroku,并且当我运行它时收到以下消息:
/home/brian/.rvm/gems/ruby-1.9.2-p0@seniorproject/gems/rest-client-1.4.2/lib/restclient.rb:9:in `rescue in <top (required)>': no such file to load -- net/https. Try running apt-get install libopenssl-ruby (LoadError)
from /home/brian/.rvm/gems/ruby-1.9.2-p0@seniorproject/gems/rest-client-1.4.2/lib/restclient.rb:5:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /home/brian/.rvm/gems/ruby-1.9.2-p0@seniorproject/gems/rest-client-1.4.2/lib/rest_client.rb:2:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /home/brian/.rvm/gems/ruby-1.9.2-p0@seniorproject/gems/heroku-1.9.14/lib/heroku/client.rb:2:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /home/brian/.rvm/gems/ruby-1.9.2-p0@seniorproject/gems/heroku-1.9.14/lib/heroku.rb:3:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /home/brian/.rvm/gems/ruby-1.9.2-p0@seniorproject/gems/heroku-1.9.14/bin/heroku:6:in `<top (required)>'
from /home/brian/.rvm/gems/ruby-1.9.2-p0@seniorproject/bin/heroku:19:in `load'
from /home/brian/.rvm/gems/ruby-1.9.2-p0@seniorproject/bin/heroku:19:in `<main>'
我已经安装了建议的库,但它仍然不起作用。我是否必须为此重新编译 ruby?如果是这样,我应该事先安装哪些软件包?
答案1
就我个人而言,我暂时放弃了使用 Rails 3 和 Heroku 运行 1.9.2 的想法。然而OSDIR 邮件列表提及以下说明
$ rvm remove 1.9.2
$ rvm package install openssl
$ rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr
答案2
“package” 调用不存在(也许这是旧名称)
你可以更直接地这样做:
rvm pkg install openssl
rvm reinstall 1.9.2 --with-openssl-dir=$rvm_path/usr
答案3
我使用 和rvm
完成了安装过程。您在最后一步放弃了。ruby 1.9.2
sqlite3
经过两天与 Heroku 的角力后,这个对我有用:
sudo apt-get install libreadline-dev
cd ~/.rvm/src/ruby-1.8.7-p249/ext/readline
然后构建扩展
ruby extconf.rb
make
make install