I started playing with MacRuby this evening. macirb wouldn’t run with my customized .irbrc and gave the following error:
1 2 3 |
/usr/local/bin/macirb:60:in `block': No such file or directory - open() failed (Errno::ENOENT) from /usr/local/bin/macirb:9:in `block' from /usr/local/bin/macirb:7:in `<main>' |
If you’re seeing this, you need to do something like this:
1 2 3 4 5 6 7 8 |
# preserve history across irb executions: require 'irb/completion' unless 'macruby' == RUBY_ENGINE require 'irb/ext/save-history' ARGV.concat [ "--readline"] end IRB.conf[:SAVE_HISTORY] = 100 IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" |
What I changed was to add lines 2 and 5 from that excerpt, making lines 3 and 4 only run if I’m *not* using macirb. If you’re getting the same error from macirb, this (or something similar) should fix it.