Skip to content

Instantly share code, notes, and snippets.

@jalberto
Forked from tvdeyen/gist:2711329
Last active December 20, 2015 02:09
Show Gist options
  • Save jalberto/6053996 to your computer and use it in GitHub Desktop.
Save jalberto/6053996 to your computer and use it in GitHub Desktop.
Small script to install linecache19
#!/bin/bash
# Install with:
# bash < <(curl -L https://gist.github.com/jalberto/6053996/raw/bcbb6e14d4f26b56c6c589882f047a96a3ab587a/linecache19_install)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
ruby_version="$(rvm info ruby | grep version | head -n1 | awk '{print $2}' | tr '"' ' ')"
echo "Installing ruby-debug with $ruby_version ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
gem install linecache19-0.5.13.gem ruby-debug-base19-0.11.26.gem -- --with-ruby-include=$rvm_path/src/$ruby_version/
rm linecache19-0.5.13.gem ruby-debug-base19-0.11.26.gem
gem install debugger-linecache -v '1.1.1' -- --with-ruby-include=$rvm_path/src/$ruby_version
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment