Tag: rbenv
$ cd $ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)"
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
git clone https://github.com/rkh/rbenv-update.git ~/.rbenv/plugins/rbenv-update
git clone https://github.com/sstephenson/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems
echo bundler > ~/.rbenv/default-gems
$ cd ~/.rbenv $ git pull $ cd ~/.rbenv/plugins/ruby-build $ git pull
rbenv install --list
rbenv versions
$ sudo port install openssl $ sudo port install readline $ RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/local --with-readline-dir=/opt/local" rbenv install 1.9.3-p429 $ sudo rbenv rehash
$ brew install openssl readline $ RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl)" rbenv install 1.9.3-p429 $ rbenv rehash
apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev #以下も必要かも(ImageMagick、MySQL、SQLite3)、 sudo apt install imagemagick libmagickcore-dev libmagickwand-dev libmysqlclient-dev libsqlite3-dev
sudo apt-get install nodejs
sudo dnf install git zlib zlib-devel readline readline-devel openssl openssl-devel curl curl-devel mysql-devel sqlite-devel nodejs
dnf install -y epel-release dnf config-manager --set-enabled PowerTools dnf install -y ImageMagick ImageMagick-devel
yum -y install git zlib zlib-devel readline readline-devel openssl openssl-devel curl curl-devel
yum -y --enablerepo=remi install mysql-devel
yum -y install postgresql-devel
yum -y install sqlite-devel
yum -y install ImageMagick-devel
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
rbenv uninstall 1.9.3-p392
rbenv global
rbenv global 1.9.3-p392
rbenv global <バージョン> | デフォルトで使うRubyの切り替え |
rbenv local <バージョン> | 特定ディレクトリ以下のrubyのバージョン指定となる |
rbenv shell <バージョン> | 一時的に切り替えたいとき |
shell > local > globalの順に優先される。
#!/usr/bin/env ruby
gem install passenger
passenger-install-apache2-module
rbenv install --patch 1.8.7-p375 < <(curl -sSL https://gist.githubusercontent.com/src256/552c6474fbae80358829/raw/0235199a77e84eafc1a51a69c9b8aa333e41cc25/install-patched-ruby-1.8.7-p375.sh)
cat patch.diff | rbenv install --patch 1.9.3-p194
$ sudo yum install libffi-devel
export PATH="${HOME}/.rbenv/bin:${HOME}/.rbenv/shims:${PATH}"
RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl)" rbenv install --patch 2.1.1 < <(curl -sSL 'https://projects.archlinux.org/svntogit/packages.git/plain/ruby/trunk/0001-Fix-undeclared-identifier-error-by-using-the-actual-.patch?id=d54cc2645013754f6a303075eb22df1eecb7676a')
RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/local --with-readline-dir=/opt/local" rbenv install --patch 2.1.1 < <(curl -sSL 'https://projects.archlinux.org/svntogit/packages.git/plain/ruby/trunk/0001-Fix-undeclared-identifier-error-by-using-the-actual-.patch?id=d54cc2645013754f6a303075eb22df1eecb7676a')
BUILD FAILED (CentOS release 5.11 (Final) using ruby-build 20141222)
# local openssl="$(command -v "$(brew --prefix openssl 2>/dev/null)"/bin/openssl openssl | hea\ d -1)" local openssl="/usr/bin/openssl"