prepare
If you use zsh.
.zshrc
eval "$(direnv hook zsh)"
set EDITOR env_val
python virtualenv
layout pythonlayout python
.envrc
layout python <phtyon-path>
Create new virtualenv in <projectdir>/.direnv/...
Activate pre-installed virtualenv
.envrc
# source <virtualenv-path>/activate e.g ↓	
source ~/.virtualenvs/aws/bin/activate
Ruby bundler
add_PATH & binstub
python
bundle install --path vendor/bundle --binstubs=vendor/bundle/bin
.envrc
PATH_add vendor/bundler/bin
But gem command point global gem's path (not vendoer/bundler ...).
To show all installed gems, run bundle exec gem list .
Recommended Posts