Last active
October 11, 2015 13:37
-
-
Save thomaswitt/3867131 to your computer and use it in GitHub Desktop.
Getting Umlauts/UTF-8 in irb or rails/console on the mac 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
RUBY_VERSION="1.9.3-p362" | |
###Use this for global readline for later reuse | |
# OPT_DIR=/usr/local/ruby-opt/ | |
OPT_DIR=${HOME}/.rbenv/versions/${RUBY_VERSION}/ | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
cd ~/.rbenv/plugins | |
git clone git://github.com/sstephenson/ruby-build.git | |
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} | |
rbenv global ${RUBY_VERSION} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment