For direnv to work properly it needs to be hooked into the shell. Each shell has its own extension mechanism.
Once the hook is configured, restart your shell for direnv to be activated.
Add the following line at the end of the ~/.bashrc
file:
eval "$(direnv hook bash)"
Make sure it appears even after rvm, git-prompt and other shell extensions that manipulate the prompt.
Add the following line at the end of the ~/.zshrc
file:
eval "$(direnv hook zsh)"
Add the following line at the end of the ~/.config/fish/config.fish
file:
eval (direnv hook fish)
Add the following line at the end of the ~/.cshrc
file:
eval `direnv hook tcsh`
Run:
$> direnv hook elvish > ~/.elvish/lib/direnv.elv
and add the following line to your ~/.elvish/rc.elv
file:
use direnv