zsh: инструментальный пояс Heroku больше не найден

Я недавно перешел на zsh, очень доволен этим. За исключением того, что инструментальный пояс герояку больше не работает ...

Вот что у меня есть, когда я набираю 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 $PATHs, но они, кажется, содержат одни и те же указатели на папки 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

Зш:

/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

Я читал об установке драгоценного камня heroku, так как у меня есть ошибки ruby, но я также читал, что он устарел, поскольку существует инструментальный пояс: 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

Заранее большое спасибо.


person Augustin Riedinger    schedule 21.05.2013    source источник


Ответы (2)


отредактируйте последнюю строку ~/.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
person mpapis    schedule 21.05.2013
comment
Оно работает! Не могли бы вы немного объяснить, что было не так? У моего $PATH, похоже, не так много новых целей... - person Augustin Riedinger; 21.05.2013
comment
исправление состояло в том, чтобы переместить героку в начало PATH, хотя героку как таковой не работает, потому что он должен работать из любого места в PATH, а не только в первой позиции - person mpapis; 21.05.2013

просто вставьте в свой терминал:

sudo snap install --classic heroku
person Nejmeddine Jammeli    schedule 17.02.2020