12

私はこの問題に数日間取り組んできました。zsh使用するコマンドが認識されるように、ディレクトリパスを使用し、設定する必要があります。これまでの手順に従ってください。

cd ~

ls -al

ls -alこれらのファイルを表示します:

.oh-my-zsh
.profile
.putty
.rediscli_history
.ringo-history
.ssh
.subversion
.viminfo
.zcompdump
.zsh-update
.zsh_history
.zshrc

パスをに追加する必要があると思います.zshrcので、次のようにします。

open -e .zshrc

ファイルの最後に、プロジェクトの設定に使用するコマンドのパスを追加しました(ringojsを使用)。

export PATH=Users/repos/ringojs/bin/:$PATH

ファイルを閉じ、ターミナルアプリケーションを再起動し、コンピューターを再起動しますが、ringo-admin上記のパス()の下にあるコマンド()/Users/repos/ringojs/binが見つかりません。

ringo-admin create --google-appengine MyAppName
zsh: command not found: ringo-admin

それで私を助けてください、それがいくつかの助けになるなら、ここに私の.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"

# 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 many often would you like to wait 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 red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="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 git textmate ruby lighthouse)
plugins=(git)

source $ZSH/oh-my-zsh.sh

# Customize to your needs...
export PATH=Users/repos/ringojs/bin/ringo-admin:$PATH

私は初めてですので、ステップバイステップで私を案内してくださいzsh。ありがとう。

アップデート:

echo $ PATHは、最近追加されたディレクトリを表示します。

/Users/repos/ringojs/bin/ringo-admin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin

コマンドが常に見つからない理由がわかりません。

4

1 に答える 1

25

先頭のスラッシュがありません。試す:

export PATH=/Users/repos/ringojs/bin/:$PATH
于 2012-12-24T16:17:35.437 に答える