14. rbenv (Ruby)
PHP と同じ
2016-06-29 第103回 PHP 勉強会 14
$ anyenv install rbenv
$ exec bash -l
$ rbenv install 2.4.0-preview1
$ rbenv global 2.4.0-preview1
$ ruby -e 'if (a, b = nil); p "True"; else p "False"; end'
-e:1: warning: found = in conditional, should be ==
"False"
◦ Multiple assignment in conditional expression (新機能らしいよ)
◦ https://github.com/ruby/ruby/blob/v2_4_0_preview1/NEWS
15. pyenv (Python)
PHP と同じ
2016-06-29 第103回 PHP 勉強会 15
$ anyenv install pyenv
$ exec bash -l
$ pyenv install 3.6.0a2
$ pyenv global 3.6.0a2
$ python -c 'name = "Fred"; print(f"He said his name is {name}")'
He said his name is Fred
◦ Formatted string literals (新機能らしいよ)
◦ https://docs.python.org/3.6/whatsnew/3.6.html
40. CHH/phpenv の使い方
今回説明してきた phpenv (madumlao/phpenv) と同じ
2016-06-29 第103回 PHP 勉強会 40
$ phpenv help
Usage: rbenv <command> [<args>]
Some useful rbenv commands are:
commands List all available rbenv commands
local Set or show the local application-specific Ruby version
global Set or show the global Ruby version
shell Set or show the shell-specific Ruby version
install Install a PHP version using the php-build plugin
uninstall Uninstall a specific PHP version using the php-build plugin
rehash Rehash rbenv shims (run this after installing executables)
version Show the current Ruby version and its origin
versions List all Ruby versions available to rbenv
which Display the full path to an executable
whence List all Ruby versions that contain the given executable
See `rbenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/rbenv/rbenv#readme
◦ あちこちに "rbenv" や "Ruby" と表示されていることに気付いた?