markdown Linux的下安装红宝石

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Linux的下安装红宝石相关的知识,希望对你有一定的参考价值。

# Linux下安装Ruby
## [Install rbenv](https://github.com/rbenv/rbenv#basic-github-checkout)
```zsh
# Clone rbenv into ~/.rbenv
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv

# Optionally, try to compile dynamic bash extension to speed up rbenv. Don't worry if it fails; rbenv will still work normally
$ cd ~/.rbenv && src/configure && make -C src

# Add ~/.rbenv/bin to your $PATH
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc

# Set up rbenv in your shell
$ ~/.rbenv/bin/rbenv init

# Follow the printed instructions to set up rbenv shell integration, it looks like this:
$ echo 'eval "$(rbenv init -)"' >> ~/.zshrc

# Verify that rbenv is properly set up using this rbenv-doctor script:
$ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
```

## [Install ruby-build plugin](https://github.com/rbenv/ruby-build#readme)
```zsh
# As an rbenv plugin
$ mkdir -p "$(rbenv root)"/plugins
$ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
```

## [Install Ruby versions](https://github.com/rbenv/rbenv#installing-ruby-versions)
```zsh
# list all available versions
$ rbenv install -l

# install a Ruby version
$ rbenv install 2.5.1

# list all installed Ruby versions
$ rbenv versions

# list current Ruby version
$ rbenv version

# set global version of Ruby to be used in all shells by writing the version name to the `~/.rbenv/version` file
$ rbenv global 2.5.1

# reports the currently configured global version
$ rbenv global

# set a local application-specific Ruby version by writing the version name to a .ruby-version file in the current directory
$ rbenv local 2.5.1

# set a shell-specific Ruby version
$ rbenv shell 2.5.1

# install Ruby gems
$ gem install bundler
```

以上是关于markdown Linux的下安装红宝石的主要内容,如果未能解决你的问题,请参考以下文章

markdown Linux的下判断文件的编码

markdown Linux的下修改用户名

markdown Linux的下PDF软件迷走星球

markdown Linux的下查看CPU数量及使用率

markdown Linux的下用更新的替代命令来设置系统默认命令

markdown Linux的下动态库路径配置,静态库,动态库的制作与使用