📢 Webサイト閉鎖と移転のお知らせ
このWebサイトは2026年9月に閉鎖いたします。
新しい記事は移転先で追加しております。(旧サイトでは記事を追加しておりません)

 
(同じ利用者による、間の3版が非表示)
21行目: 21行目:
==== ソースコードからインストール ====
==== ソースコードからインストール ====
Rubyのビルドに必要なライブラリをインストールする。<br>
Rubyのビルドに必要なライブラリをインストールする。<br>
# RHEL
sudo dnf install curl patch bzip2 bison gperf make automake autoconf gcc gcc-c++ rust \
                  gdbm-devel ncurses-devel readline-devel zlib-devel libffi-devel openssl-devel libyaml-devel
# SUSE
  sudo zypper install gcc gcc-c++ autoconf bison gperf libopenssl-devel libopenssl-1_1-devel libyaml-devel zlib-devel \
  sudo zypper install gcc gcc-c++ autoconf bison gperf libopenssl-devel libopenssl-1_1-devel libyaml-devel zlib-devel \
                     readline-devel libedit-devel gmp-devel libffi-devel rust cargo ruby2.5-devel
                     readline-devel libedit-devel gmp-devel libffi-devel rust cargo ruby2.5-devel
# Raspberry Pi / Mobian
sudo apt install curl patch build-essential make automake autoconf gcc rustc \
                  libgdbm6 libgdbm-dev libncurses5-dev libreadline6-dev zlib1g-dev libgmp-dev libffi-dev libdb-dev uuid-dev libssl-dev libyaml-dev
# Manjaro ARM
sudo pacman -S --needed base-devel rust libffi libyaml openssl zlib
<br>
<br>
[https://www.ruby-lang.org/ja/downloads/ Rubyの公式Webサイト]、または、[https://github.com/ruby/ruby RubyのGithub]にアクセスして、ソースコードをダウンロードする。<br>
[https://www.ruby-lang.org/ja/downloads/ Rubyの公式Webサイト]、または、[https://github.com/ruby/ruby RubyのGithub]にアクセスして、ソースコードをダウンロードする。<br>
95行目: 107行目:
  <syntaxhighlight lang="sh">
  <syntaxhighlight lang="sh">
  # ログインシェルがBashの場合
  # ログインシェルがBashの場合
# ~/.profile または ~/.bash_profile または ~/.bashrc
  export RBENV_ROOT="<RbEnvのインストールディレクトリ>"
  export RBENV_ROOT="<RbEnvのインストールディレクトリ>"
  eval "$($RBENV_ROOT/bin/rbenv init - bash)"
  eval "$($RBENV_ROOT/bin/rbenv init - bash)"
   
   
  # ログインシェルがZshの場合
  # ログインシェルがZshの場合
# ~/.zprofile
  export RBENV_ROOT="<RbEnvのインストールディレクトリ>"
  export RBENV_ROOT="<RbEnvのインストールディレクトリ>"
  eval "$($RBENV_ROOT/bin/rbenv init - zsh)"
  eval "$($RBENV_ROOT/bin/rbenv init - zsh)"
   
   
  # ログインシェルがFishの場合
  # ログインシェルがFishの場合
# ~/.config/fish/config.fish
  set -Ux RBENV_ROOT <RbEnvのインストールディレクトリ>
  set -Ux RBENV_ROOT <RbEnvのインストールディレクトリ>
  status --is-interactive; and $RBENV_ROOT/bin/rbenv init - fish | source
  status --is-interactive; and $RBENV_ROOT/bin/rbenv init - fish | source
122行目: 137行目:
Rubyのビルドに必要なライブラリをインストールする。<br>
Rubyのビルドに必要なライブラリをインストールする。<br>
  # RHEL
  # RHEL
  sudo dnf install curl patch bzip2 bison gperf make autoconf gcc gdbm-devel ncurses-devel readline-devel zlib-devel openssl-devel libyaml-devel libffi-devel
  sudo dnf install curl patch bzip2 bison gperf make automake autoconf gcc gcc-c++ rust \
                  gdbm-devel ncurses-devel readline-devel zlib-devel libffi-devel openssl-devel libyaml-devel
   
   
  # SUSE
  # SUSE
  sudo zypper install curl patch bzip2 bison gperf make automake autoconf gcc gcc-c++ rust \
  sudo zypper install curl patch bzip2 bison gperf make automake autoconf gcc gcc-c++ rust \
                     zlib-devel gdbm-devel ncurses-devel readline-devel libffi-devel libopenssl-devel libyaml-devel
                     gdbm-devel ncurses-devel readline-devel zlib-devel libffi-devel libopenssl-devel libyaml-devel
# Raspberry Pi / Mobian
sudo apt install curl patch build-essential make automake autoconf gcc rustc \
                  libgdbm6 libgdbm-dev libncurses5-dev libreadline6-dev zlib1g-dev libgmp-dev libffi-dev libdb-dev uuid-dev libssl-dev libyaml-dev
# Manjaro ARM
sudo pacman -S --needed base-devel rust libffi libyaml openssl zlib
<br>
<br>
もし、<code>rbenv install</code>コマンドが見つからない場合は、ruby-buildをプラグインとしてインストールすることができる。<br>
もし、<code>rbenv install</code>コマンドが見つからない場合は、ruby-buildをプラグインとしてインストールすることができる。<br>
136行目: 159行目:
このディレクトリのエントリは、ファイルシステム上の他の場所にインストールされたRubyのバージョンへのシンボリックリンクにもなる。<br>
このディレクトリのエントリは、ファイルシステム上の他の場所にインストールされたRubyのバージョンへのシンボリックリンクにもなる。<br>
<br>
<br>
==== Ruby gemsのインストール ====
==== Ruby gemsのインストール ====
プロジェクトのRubyバージョンを選択する。<br>
プロジェクトのRubyバージョンを選択する。<br>