mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
better Ubuntu Desktop installation instructions
Don't suggest that they add to their `.profile` anymore because: 1. They would have to restart the desktop session for their change to be reflected, or source the file manually; 2. An error in `.profile` may prevent logging in; 3. The `rbenv()` shell function and shell completions won't be available in Terminal since it doesn't start bash in login mode by default. Therefore, suggest that they use `.bashrc` instead. This will be immediately reflected in a new Terminal tab. If bash is started in login mode somehow, the default `.profile` is set up to source `.bashrc` anyway. Also, don't suggest restarting the shell environment with `exec $SHELL -l`, since we don't know what was the original mode that their shell was started in. (OS X Terminal.app will be login mode, Ubuntu Terminal has non-login mode by default.) Mode can be checked with: * bash: `shopt -q login_shell` * zsh: `[[ $options[login] = "on" ]]` But since this is gnarly, let's just avoid it altogether and go the easy route. Closes #305, fixes #373, reverts #286
This commit is contained in:
parent
e97326845c
commit
a1fb5b1153
1 changed files with 6 additions and 5 deletions
11
README.md
11
README.md
|
@ -167,7 +167,7 @@ easy to fork and contribute any changes back upstream.
|
||||||
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
|
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
**Ubuntu note**: Modify your `~/.profile` instead of `~/.bash_profile`.
|
**Ubuntu Desktop note**: Modify your `~/.bashrc` instead of `~/.bash_profile`.
|
||||||
|
|
||||||
**Zsh note**: Modify your `~/.zshrc` file instead of `~/.bash_profile`.
|
**Zsh note**: Modify your `~/.zshrc` file instead of `~/.bash_profile`.
|
||||||
|
|
||||||
|
@ -177,13 +177,14 @@ easy to fork and contribute any changes back upstream.
|
||||||
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
|
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
_Same as in previous step, use `~/.profile` on Ubuntu, `~/.zshrc` for Zsh._
|
_Same as in previous step, use `~/.bashrc` on Ubuntu, or `~/.zshrc` for Zsh._
|
||||||
|
|
||||||
4. Restart your shell as a login shell so the path changes take effect.
|
4. Restart your shell so that PATH changes take effect. (Opening a new
|
||||||
You can now begin using rbenv.
|
terminal tab will usually do it.) Now check if rbenv was set up:
|
||||||
|
|
||||||
~~~ sh
|
~~~ sh
|
||||||
$ exec $SHELL -l
|
$ type rbenv
|
||||||
|
#=> "rbenv is a function"
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
5. Install [ruby-build](https://github.com/sstephenson/ruby-build),
|
5. Install [ruby-build](https://github.com/sstephenson/ruby-build),
|
||||||
|
|
Loading…
Reference in a new issue