Created
February 21, 2012 04:51
-
-
Save rf-/1873759 to your computer and use it in GitHub Desktop.
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
require 'pry' | |
require 'pry-exception_explorer' | |
require 'pry-exception_explorer/shim_builder' | |
binary_name = "lib_overrides.#{PryExceptionExplorer::ShimBuilder::Dyname}" | |
if !File.exists? File.join PryExceptionExplorer::ShimBuilder.dir, binary_name | |
puts "First run, building shim" | |
PryExceptionExplorer::ShimBuilder.compile | |
puts "Hopefully built...!" | |
end | |
if RUBY_PLATFORM =~ /darwin/ | |
ENV['DYLD_FORCE_FLAT_NAMESPACE'] = "1" | |
ENV['DYLD_INSERT_LIBRARIES'] = File.join PryExceptionExplorer::ShimBuilder.dir, binary_name | |
else | |
ENV['LD_PRELOAD'] = File.join PryExceptionExplorer::ShimBuilder.dir, binary_name | |
end | |
exec 'rails server' # or whatever |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment