Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue #10 #11

Merged
merged 2 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sudo apt install -y build-essential gettext libssl-dev libreadline-dev \
zlib1g-dev sqlite3 libsqlite3-dev libbz2-dev \
libxml2-dev libdb-dev ccache libffi-dev libpq-dev mcrypt \
liblzma-dev lzma libncurses5-dev xz-utils libxmlsec1-dev \
tk-dev llvm libicu-dev libcurl4-openssl-dev
tk-dev llvm libicu-dev libcurl4-openssl-dev checkinstall

# install some 'nice to have' that are missing from very mininal images...
sudo apt install -y nano htop openssh-server openssh-client
Expand Down
35 changes: 34 additions & 1 deletion modules/ruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,41 @@ git clone https://github.com/yyuu/rbenv-ccache.git ~/.rbenv/plugins/rbenv-ccache
echo $'bundler\nsassc\nrails\nrspec\nrspec-rails' > ~/.rbenv/default-gems
# set up .gemrc to avoid installing documentation for each gem...
echo "gem: --no-document" > ~/.gemrc

# check the version of OpenSSL installed.
if [[ $openssl_ver =~ "1.1.1" ]]; then
echo "OpenSSL Version is good to use."
openssl_dir="/usr/lib/ssl"
else
echo "we need to install openssl 1.1.1"
our_dir=$(pwd)
# get a temporary directory to download openssl
tmpdir=$(mktemp -d)
cd $tmpdir
# get the openssl source
wget https://www.openssl.org/source/openssl-1.1.1o.tar.gz
tar xf openssl-1.1.1o.tar.gz
# build and install openssl
cd openssl-1.1.1o
./config --prefix=/opt/openssl-1.1.1o --openssldir=/opt/openssl-1.1.1o shared zlib
make
make test
sudo make install
# link the system certs to openssl-1.1.1o
sudo rm -rf /opt/openssl-1.1.1o/certs
sudo ln -s /etc/ssl/certs /opt/openssl-1.1.1o
# set the configure options for Ruby
openssl_dir="/opt/openssl-1.1.1o"
cd $our_dir
fi

configure_opts="--with-openssl-dir=${openssl_dir}"
echo "configure_opts: $configure_opts"



# install the required ruby version and set as default
rbenv install 2.7.6
RUBY_CONFIGURE_OPTS=$configure_opts rbenv install 2.7.6
rbenv install 3.1.2
rbenv global 2.7.6

Expand Down
3 changes: 3 additions & 0 deletions support/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
[core]
autocrlf = false
filemode = false
pager = less -FRX
[diff]
colorMoved = zebra