1

我最近切换到 zsh,对此非常高兴。除了heroku工具带不再工作......

这是我输入时的内容heroku -v

/usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find heroku (>= 0) amongst [actionmailer-3.2.13, actionpack-3.2.13, activemodel-3.2.13, activerecord-3.2.13, activeresource-3.2.13, activesupport-3.2.13, arel-3.0.2, bcrypt-ruby-3.0.1, bootstrap-sass-2.3.1.0, builder-3.0.4, bundler-1.3.5, climate_control-0.0.3, cocaine-0.5.1, coffee-rails-3.2.2, coffee-script-2.2.0, coffee-script-source-1.6.2, daemons-1.1.9, devise-2.2.3, erubis-2.7.0, eventmachine-1.0.3, execjs-1.4.0, faraday-0.8.7, haml-3.1.4, hashie-1.2.0, hike-1.2.2, httpauth-0.2.0, i18n-0.6.1, journey-1.0.4, jquery-rails-2.2.1, json-1.7.7, jwt-0.1.8, mail-2.5.3, mime-types-1.23, mime-types-1.22, multi_json-1.7.3, multi_json-1.7.2, multipart-post-1.2.0, oauth2-0.8.1, omniauth-1.1.3, omniauth-facebook-1.4.1, omniauth-oauth2-1.1.1, orm_adapter-0.4.0, paperclip-3.4.1, pg-0.15.1, polyglot-0.3.3, rack-1.4.5, rack-cache-1.2, rack-ssl-1.3.3, rack-test-0.6.2, rails-3.2.13, railties-3.2.13, rake-10.0.4, rdoc-3.12.2, rubygems-bundler-1.1.1, rvm-1.11.3.7, sass-3.2.9, sass-rails-3.2.6, sprockets-2.2.2, thin-1.5.1, thor-0.18.1, tilt-1.4.1, tilt-1.3.7, treetop-1.4.12, tzinfo-0.3.37, uglifier-2.1.0, warden-1.2.1] (Gem::LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
    from /usr/local/bin/heroku:22:in `<main>'

自从我读到它后,我试图重新安装工具带,但结果相同。

我比较了 bash 和 zsh $PATH,但它们似乎包含指向 heroku 文件夹的相同指针:

重击:

/usr/local/heroku/bin:/home/augustin/.rvm/gems/ruby-1.9.3-p392/bin:/home/augustin/.rvm/gems/ruby-1.9.3-p392@global/bin:/home/augustin/.rvm/rubies/ruby-1.9.3-p392/bin:/home/augustin/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/google/google_appengine:/usr/local/heroku/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/google/google_appengine:/home/augustin/.rvm/bin:/home/augustin/.rvm/bin

Zsh:

/home/augustin/.rvm/gems/ruby-1.9.3-p392/bin:/home/augustin/.rvm/gems/ruby-1.9.3-p392@global/bin:/home/augustin/.rvm/rubies/ruby-1.9.3-p392/bin:/home/augustin/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/google/google_appengine:/usr/local/heroku/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/google/google_appengine:/home/augustin/.rvm/bin

因为我有 ruby​​ 错误,所以我已经阅读了有关安装 heroku gem 的信息,但我也读到它已经贬值,因为工具带存在:https ://github.com/robbyrussell/oh-my-zsh/issues/1401

那么问题出在哪里?

我对 Ruby 很陌生,我仍然不了解有关 rvms 的所有内容,并且我觉得我的错误与它有关。

最后,这是我的 .zshrc 文件,我认为它也可以提供帮助。

# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh

# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="robbyrussell"
#ZSH_THEME="muse"
ZSH_THEME="ys"

# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"

# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"

# Uncomment to change how often before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13

# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"

# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment following line if you want to disable command autocorrection
# DISABLE_CORRECTION="true"

# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"

# Uncomment following line if you want to disable marking untracked files under
# VCS as dirty. This makes repository status check for large repositories much,
# much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails rails3 git textmate ruby lighthouse)

source $HOME/.aliases

plugins=(git ruby rails rails3 rvm heroku)

source $ZSH/oh-my-zsh.sh

# [[ -s "$HOME/.rvm/scripts/rvm" ]] && . “$HOME/.rvm/scripts/rvm”
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi

# Customize to your needs...
export PATH=$PATH:/usr/local/heroku/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/google/google_appengine:/home/augustin/.rvm/bin

非常感谢提前。

4

2 回答 2

3

编辑最后一行~/.zshrc并将其更改为:

export PATH=/usr/local/heroku/bin:$PATH:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/games:/usr/local/games:/opt/google/google_appengine
于 2013-05-21T12:51:41.060 回答
0

只需放入您的终端:

sudo snap install --classic heroku
于 2020-02-17T21:01:43.133 回答