2012-12-22 58 views
9

我正在尝试做教程http://ruby.railstutorial.org/的heroku设置部分。但在https://toolbelt.heroku.com/上,我注意到Fedora没有.rpm,所以我试图单独安装Foreman和Heroku CLI。 Foreman和Git安装得很好,但我在Heroku CLI中遇到了问题。Fedora 17上的Heroku Toolbelt

当我尝试这样做:

$yum install rubygem-heroku 

,并随后做简单

$heroku 

我得到的错误:

/usr/share/rubygems/rubygems/dependency.rb:247:in `to_specs': Could not find heroku (>= 0) amongst [actionmailer-3.2.8, actionpack-3.2.8, activemodel-3.2.8, activerecord-3.2.8, activeresource-3.2.8, activesupport-3.2.8, addressable-2.3.2, arel-3.0.2, builder-3.0.4, builder-3.0.3, bundler-1.2.3, bundler-1.2.1, coffee-rails-3.2.2, coffee-script-2.2.0, coffee-script-source-1.4.0, coffee-script-source-1.3.3, erubis-2.7.0, excon-0.16.10, execjs-1.4.0, foreman-0.60.2, heroku-api-0.3.7, hike-1.2.1, i18n-0.6.1, journey-1.0.4, jquery-rails-2.1.4, jquery-rails-2.1.3, jquery-rails-2.0.2, json-1.7.5, launchy-2.1.2, libv8-3.3.10.4-x86_64-linux, mail-2.4.4, mime-types-1.19, multi_json-1.5.0, multi_json-1.3.6, netrc-0.7.7, polyglot-0.3.3, rack-1.4.1, rack-cache-1.2, rack-ssl-1.3.2, rack-test-0.6.2, rails-3.2.8, railties-3.2.8, rake-10.0.3, rake-0.9.2.2, rdoc-3.12, rest-client-1.6.7, rubygems-bundler-1.1.0, rubyzip-0.9.9, rvm-1.11.3.5, sass-3.2.3, sass-3.2.1, sass-rails-3.2.5, sprockets-2.1.3, sqlite3-1.3.6, sqlite3-1.3.5, therubyracer-0.10.2, thor-0.16.0, tilt-1.3.3, treetop-1.4.12, treetop-1.4.11, treetop-1.4.10, tzinfo-0.3.35, tzinfo-0.3.33, uglifier-1.3.0, uglifier-1.2.3, uglifier-1.0.3] (Gem::LoadError) 
    from /usr/share/rubygems/rubygems/dependency.rb:256:in `to_spec' 
    from /usr/share/rubygems/rubygems.rb:1231:in `gem' 
    from /usr/bin/heroku:18:in `<main>' 

所以我百胜删除,并试图代替做:

$rvmsudo gem install heroku 

现在,当我运行的Heroku,我得到:

/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- readline (LoadError) 
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /usr/local/rvm/gems/[email protected]/gems/heroku-2.33.5/lib/heroku/command/run.rb:1:in `<top (required)>' 
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /usr/local/rvm/gems/[email protected]/gems/heroku-2.33.5/lib/heroku/command.rb:14:in `block in load' 
    from /usr/local/rvm/gems/[email protected]/gems/heroku-2.33.5/lib/heroku/command.rb:13:in `each' 
    from /usr/local/rvm/gems/[email protected]/gems/heroku-2.33.5/lib/heroku/command.rb:13:in `load' 
    from /usr/local/rvm/gems/[email protected]/gems/heroku-2.33.5/lib/heroku/cli.rb:27:in `start' 
    from /usr/local/rvm/gems/[email protected]/gems/heroku-2.33.5/bin/heroku:17:in `<top (required)>' 
    from /usr/local/rvm/gems/[email protected]/bin/heroku:19:in `load' 
    from /usr/local/rvm/gems/[email protected]/bin/heroku:19:in `<main>' 
    from /usr/local/rvm/gems/[email protected]/bin/ruby_noexec_wrapper:14:in `eval' 
    from /usr/local/rvm/gems/[email protected]/bin/ruby_noexec_wrapper:14:in `<main>' 

试图rvm info产量

[email protected]: 

    system: 
    uname:  "Linux angelo 3.6.5-1.fc17.x86_64 #1 SMP Wed Oct 31 19:37:18 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux" 
    system:  "redhat/17./x86_64" 
    bash:  "/usr/bin/bash => GNU bash, version 4.2.37(1)-release (x86_64-redhat-linux-gnu)" 
    zsh:   " => not installed" 

    rvm: 
    version:  "rvm 1.16.6 (master) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]" 
    updated:  "2 months 20 days 1 hour 33 minutes 52 seconds ago" 

    ruby: 
    interpreter: "ruby" 
    version:  "1.9.3p194" 
    date:   "2012-04-20" 
    platform:  "x86_64-linux" 
    patchlevel: "2012-04-20 revision 35410" 
    full_version: "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]" 

    homes: 
    gem:   "/usr/local/rvm/gems/[email protected]" 
    ruby:   "/usr/local/rvm/rubies/ruby-1.9.3-p194" 

    binaries: 
    ruby:   "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby" 
    irb:   "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/irb" 
    gem:   "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/gem" 
    rake:   "/usr/local/rvm/gems/[email protected]/bin/rake" 

    environment: 
    PATH:   "/home/angelo/.rvm/bin:/usr/local/rvm/gems/[email protected]/bin:/usr/local/rvm/gems/[email protected]/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/angelo/heroku-client/:/home/angelo/.local/bin:/home/angelo/bin" 
    GEM_HOME:  "/usr/local/rvm/gems/[email protected]" 
    GEM_PATH:  "/usr/local/rvm/gems/[email protected]:/usr/local/rvm/gems/[email protected]" 
    MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-1.9.3-p194" 
    IRBRC:  "/usr/local/rvm/rubies/ruby-1.9.3-p194/.irbrc" 
    RUBYOPT:  "" 
    gemset:  "rails3tutorial2ndEd" 

我的轨道版本

$ rails -v 
Rails 3.2.8 

宝石ENV:

$ gem env 
RubyGems Environment: 
    - RUBYGEMS VERSION: 1.8.24 
    - RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [x86_64-linux] 
    - INSTALLATION DIRECTORY: /usr/local/rvm/gems/[email protected] 
    - RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby 
    - EXECUTABLE DIRECTORY: /usr/local/rvm/gems/[email protected]/bin 
    - RUBYGEMS PLATFORMS: 
    - ruby 
    - x86_64-linux 
    - GEM PATHS: 
    - /usr/local/rvm/gems/[email protected] 
    - /usr/local/rvm/gems/[email protected] 
    - GEM CONFIGURATION: 
    - :update_sources => true 
    - :verbose => true 
    - :benchmark => false 
    - :backtrace => false 
    - :bulk_threshold => 1000 
    - REMOTE SOURCES: 
    - http://rubygems.org/ 

我对整个ruby(以及heroku)都很新颖,所以我不确定我应该寻找什么来匹配,但一切似乎都是ruby-1.9.3,所以我很困惑为什么Heroku不想合作。

回答

0

如果您安装了rubygem_heroku软件包,它可能会在系统ruby中安装gem。

根据您的示例,您正在使用RVM。

您应该直接安装Heroku的宝石到RVM环境和宝石你想使用它:

gem install heroku 
+0

我最终得到了同样的错误信息,当我做它直接为“宝石rvmsudo安装的Heroku” – user1784747

3

我宁愿使用Heroku的和领班宝石比用在Fedora 17 Heroku的工具下注/ 18。

gem install heroku 
gem install foreman 

安装过程中会发出警告说

The heroku gem has been deprecated and replaced with the Heroku Toolbelt.

忽略这一点。 toolbet甚至给我在Windows系统上的问题。

所有其他工作正常在Fedora 17/18。

享受擦亮!

1

我做

sudo yum install rubygem-heroku 

如果您正在使用RVM,做到这一点

rvm use system 

使用Heroku的客户端。

都很难使Heroku的命令工作,RVM + JRuby的

1

你应该整体去是方式更稳定独立的选项。 我已经安装了宝石,以及和我钻进了很多类型的错误(SSL,证书,你的...)

你可以去:

https://toolbelt.heroku.com/standalone

,并根据您的操作系统上安装它。

希望这有助于