-
-
Save maveonair/5719750 to your computer and use it in GitHub Desktop.
Installing Ruby with umlaut support when using Rbenv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [[ -z "$1" ]]; then | |
echo "No Ruby version was specified." | |
echo "example: install_ruby_rbenv.sh 1.9.3-p429" | |
exit 1 | |
fi | |
RUBY_VERSION=$1 | |
###Use this for global readline for later reuse | |
# OPT_DIR=/usr/local/ruby-opt/ | |
OPT_DIR=${HOME}/.rbenv/versions/${RUBY_VERSION}/ | |
cd /tmp | |
curl -O 'ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz' | |
tar xf readline-6.2.tar.gz | |
cd readline-6.2 | |
export MACOSX_DEPLOYMENT_TARGET=10.5 | |
export CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" | |
export CCFLAGS="-arch x86_64 -g -Os -pipe" | |
export CXXFLAGS="-arch x86_64 -g -Os -pipe" | |
export LDFLAGS="-arch x86_64 -bind_at_load" | |
./configure --prefix=${OPT_DIR} | |
cd shlib | |
sed -e 's/-dynamic/-dynamiclib/' Makefile > Makefile.good | |
mv Makefile.good Makefile | |
cd .. | |
make -j 2 && make install | |
cd .. | |
export CONFIGURE_OPTS="--with-opt-dir=${OPT_DIR} --with-readline-dir=${OPT_DIR} --enable-shared --disable-install-doc" | |
rbenv install -k ${RUBY_VERSION} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works only with Ruby 1.9 versions!
Usage: