-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_ruby.sh
33 lines (25 loc) · 1.08 KB
/
install_ruby.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Dependencies are primarily homebrew and some libraries.
. install_dependencies.sh
# We exit if rbenv did not install correctly.
brew install rbenv ruby-build
[[ ! -s "$HOME/.rbenv/version" ]] && exit 1
# Initialize rbenv once
eval "$(/usr/local/bin/rbenv init -)"
# Install our main Ruby with rbenv, and make it the default ruby
rbenv install 2.4.4
rbenv global 2.4.4 --default
# Install global bundler
gem install bundler
bundle # Process the Gemfile included in this repo.
# NOTE: Remember that if you have issues with the mysql2 gem, it's probably
# because it cannot find the openssl lib. You need to explicitly pass LD/CPP
# flags to get it to compile.
#bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"
# --disable-openmp fixes the issue described here: https://github.com/rmagick/rmagick/issues/36
brew install imagemagick@6 --disable-openmp
echo 'IMPORTANT: Put the following line into your .bashrc or .bash_profile:'
echo ''
echo 'eval "$(rbenv init -)"'
echo ''
echo $(tput setaf 2)'Done!'