LoginSignup
3
2

More than 5 years have passed since last update.

小ネタ:gemのexecutable directoryをPATHに追加したい

Posted at

homebrewを使ってrubyを更新すると、その都度gemのExecutableDirectoryをPATHに追加する必要があります。めんどくさいので手抜きします。

.zshrc
# =========
# Ruby(gem)
# =========
# Check "gem env" to EXECUTABLE DIRECTORY:
GEM_EXE_DIR=`gem env | grep "EXECUTABLE DIRECTORY" | awk '{print $4}'`
export PATH=$GEM_EXE_DIR:$PATH

gem envにExecutableDirectoryだけを出すオプションが欲しい。あったりするのかな?

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2