正如标题所述,我一直在尝试安装 Heroku。但是,只要我运行任何 heroku 命令,就会得到以下结果:
/usr/local/heroku/vendor/gems/json-1.7.7/lib/json/common.rb:67:in `initialize': no implicit conversion of nil into Hash (TypeError)
from /usr/local/heroku/vendor/gems/json-1.7.7/lib/json/common.rb:67:in `new'
from /usr/local/heroku/vendor/gems/json-1.7.7/lib/json/common.rb:67:in `generator='
from /usr/local/heroku/vendor/gems/json-1.7.7/lib/json/ext.rb:17:in `<module:Ext>'
from /usr/local/heroku/vendor/gems/json-1.7.7/lib/json/ext.rb:12:in `<module:JSON>'
from /usr/local/heroku/vendor/gems/json-1.7.7/lib/json/ext.rb:9:in `<top (required)>'
from /home/andrew/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/andrew/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/heroku/vendor/gems/json-1.7.7/lib/json.rb:58:in `<module:JSON>'
from /usr/local/heroku/vendor/gems/json-1.7.7/lib/json.rb:54:in `<top (required)>'
from /home/andrew/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/andrew/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/heroku/lib/heroku/cli.rb:18:in `<top (required)>'
from /home/andrew/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/andrew/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/heroku/bin/heroku:23:in `<main>'
我运行以下命令来安装 Heroku:
sudo apt-add-repository 'deb http://toolbelt.herokuapp.com/ubuntu ./'
wget -O- https://toolbelt.heroku.com/apt/release.key | apt-key add -
sudo apt-get update
sudo apt-get install heroku-toolbelt
有人能帮帮我吗?谢谢!
答案1
Heroku ToolBelt 3.9.4 版本似乎存在问题。
由于有新版本可用,因此应该通过更新进行修复:
$ sudo apt-get update && sudo apt-get upgrade
或者如果你只想更新该包
$ sudo apt-get install heroku-toolbelt