Heroku宝石不适用于RVM [英] Heroku gem not working with RVM
问题描述
我在 http://railstutorial.org上关注Ruby on Rails教程。 /chapters/beginning#sec:1.4.1 ,一切都很顺利,直到我试图让我的应用程序继续使用Heroku。
我安装了heroku,工作正常,但现在当我运行 heroku keys:add
或任何其他heroku命令时,出现以下错误:
/home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rest-client-1.4.2/lib/restclient.rb:9:在<顶部(必需)>'中拯救:
没有这样的文件加载 - net / https。尝试从/home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rest-client-1.4.2/lib/restclient运行apt-get install libopenssl-ruby(LoadError)
.rb:5:在<< top(required)>'
from< internal:lib / rubygems / custom_require>:29:在'require'
from< internal:lib / rubygems / custom_require>:29:在'require'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rest-client-1.4.2/lib/rest_client.rb :2:在<< top(required)>'
from< internal:lib / rubygems / custom_require>:29:在'require'
from< internal:lib / rubygems / custom_require> ;:29:在`require'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.9.14/lib/heroku/client.rb:2 :从<< internal(lib)/ rubygems / custom_require>'< top(required)>'
:'require'
from< internal:lib / rubygems / custom_require> ;: 29:从/ home / si开始`require'
rswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.9.14/lib/heroku.rb:3:在<< top(required)>'
from< ; internal:lib / rubygems / custom_require>:29:在'require'
from< internal:lib / rubygems / custom_require>:29:'require'
from /home/sirswap/.rvm /gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.9.14/bin/heroku:6:in`< top(required)>'从/home/sirswap/.rvm获得
/gems/ruby-1.9.2-p0@rails3tutorial/bin/heroku:19:in`load'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin/ heroku:19:在`< main>'
我做了错误消息说的, libopenssl-ruby,但heroku仍然无法正常工作。
我已经完成搜索并找到以下两个页面,它们试图对抗heroku错误:
http://www.mail-archive.com/heroku@googleg roups.com/msg05001.html
http://blog.project -sierra.de/archives/1534
我按照这些页面上的说明操作(它们是相同的),但是heroku仍然不起作用。 / p>
我通常在windows上做我的工作,所以在Ubuntu上对我来说一切都是新鲜的。这是我的ruby环境:
RubyGems环境:
- RUBYGEMS版本:1.3.7
- RUBY VERSION :1.9.2(2010-08-18 patchlevel 0)[i686-linux]
- INSTALLATION DIRECTORY:/home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial
- RUBY EXECUTABLE:/home/sirswap/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
- 可执行目录:/home/sirswap/.rvm/gems/ruby-1.9.2-p0@ rails3tutorial / bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- 创业板路径:
- /home/sirswap/.rvm/gems/ruby- 1.9.2-p0@rails3tutorial
- /home/sirswap/.rvm/gems/ruby-1.9.2-p0@global
- 创业板配置:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- 远程来源:
- http://rubygems.org/
$ b
任何关于下一步的帮助或建议都将非常感谢:)
我遇到了同样的问题,我认为这是由于在运行时没有安装列出的所有ruby依赖关系造成的:
$ rvm需求#它早些时候:rvm notes
我执行了[请务必首先安装aptitude]:
$ sudo aptitude install build-essential bison openssl libreadline5 libreadline5-dev curl git zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev
,我重新编译了我的ruby install(使用 $ rvm重新安装1.9.2
),并且heroku的工作方式就像一个魅力一样。
I'm following the Ruby on Rails tutorial at http://railstutorial.org/chapters/beginning#sec:1.4.1, and all is going well until I tried to get my app going on Heroku.
I installed heroku, that worked fine, but now when I run heroku keys:add
or any other heroku command, I get the following error:
/home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/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/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/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/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/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/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/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/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/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/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.9.14/bin/heroku:6:in `<top (required)>'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin/heroku:19:in `load'
from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin/heroku:19:in `<main>'
I did what the error message said, and installed libopenssl-ruby, but heroku still didn't work.
I've done a search and found the following two pages which try to combat the heroku errors: http://www.mail-archive.com/heroku@googlegroups.com/msg05001.html http://blog.project-sierra.de/archives/1534
I followed the instructions on these pages (which are the same), but heroku still doesn't work.
I usually do my work on windows, so everything is a bit new to me on ubuntu. Here's my ruby environment:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial
- RUBY EXECUTABLE: /home/sirswap/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
- EXECUTABLE DIRECTORY: /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial
- /home/sirswap/.rvm/gems/ruby-1.9.2-p0@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
I'm running ubuntu 10.04.
Any help or advice for next steps would be much appreciated :)
I experienced the same problem, and I think it was caused by not installing all the ruby dependencies listed when you run:
$rvm requirements # it was earlier: rvm notes
Specifically, I executed [be sure to install aptitude first]:
$sudo aptitude install build-essential bison openssl libreadline5 libreadline5-dev curl git zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev
and after all that, I recompiled my ruby install (using $rvm reinstall 1.9.2
) and heroku worked like a charm.
这篇关于Heroku宝石不适用于RVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!