kbu*_*rns 3 ruby ubuntu heroku ubuntu-10.04
我已经在其他博客和stackoverflow线程中看到了这个问题,但似乎没有人有答案.我正在尝试运行heroku并收到此错误:
/usr/local/heroku/vendor/gems/rest-client-1.6.1/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 /usr/local/heroku/vendor/gems/rest-client-1.6.1/lib/restclient.rb:5:in `<top (required)>'
from /usr/local/heroku/vendor/gems/rest-client-1.6.1/lib/rest_client.rb:2:in `require'
from /usr/local/heroku/vendor/gems/rest-client-1.6.1/lib/rest_client.rb:2:in `<top (required)>'
from /usr/local/heroku/lib/heroku/client.rb:2:in `require'
from /usr/local/heroku/lib/heroku/client.rb:2:in `<top (required)>'
from /usr/local/heroku/lib/heroku.rb:3:in `require'
from /usr/local/heroku/lib/heroku.rb:3:in `<top (required)>'
from /usr/local/heroku/lib/heroku/cli.rb:1:in `require'
from /usr/local/heroku/lib/heroku/cli.rb:1:in `<top (required)>'
from /usr/bin/heroku:29:in `require'
from /usr/bin/heroku:29:in `<main>'
Run Code Online (Sandbox Code Playgroud)
问题是libopenssl-ruby已经是最新版本了.
还有其他人遇到过这个问题吗?
Juo*_*zas 13
我刚刚在我的ubuntu 10.04上遇到了类似的问题,修复方式如下:
编辑:
更快的修复:检查/ usr/local/heroku/bin/heroku我使用的ruby版本是什么:
#!/usr/bin/env ruby1.9.1
Run Code Online (Sandbox Code Playgroud)
然后安装正确的lib:
$ sudo apt-get install libopenssl-ruby1.9.1
Run Code Online (Sandbox Code Playgroud)
旧:
安装rvm:http://beginrescueend.com/rvm/install/
要〜/ .bashrc添加:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
Run Code Online (Sandbox Code Playgroud)
跑:
$ source ~/.bachrc
Run Code Online (Sandbox Code Playgroud)
然后:
$ rvm remove 1.9.2
$ rvm pkg install openssl
$ rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr
Run Code Online (Sandbox Code Playgroud)
在运行最后一个命令之后我有了这个输出,请注意ruby-1.9.2-p290:
Installing Ruby from source to: /my/home/dir/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)
Run Code Online (Sandbox Code Playgroud)
然后编辑/ usr/local/heroku/bin/heroku 在第一行更改:
#!/usr/bin/env ruby1.9.1
Run Code Online (Sandbox Code Playgroud)
至:
#!/usr/bin/env ruby-1.9.2-p290
Run Code Online (Sandbox Code Playgroud)
您可能需要安装一些缺少的库来实现所有这些,这将有助于找到什么
$ rvm notes
Run Code Online (Sandbox Code Playgroud)
我希望这有帮助.
归档时间: |
|
查看次数: |
4092 次 |
最近记录: |