{"id":242,"date":"2011-03-19T22:59:32","date_gmt":"2011-03-20T04:59:32","guid":{"rendered":"http:\/\/www.pervasivecode.com\/blog\/?p=242"},"modified":"2011-03-19T22:59:44","modified_gmt":"2011-03-20T04:59:44","slug":"macruby-tweaks-to-your-customized-irbrc","status":"publish","type":"post","link":"http:\/\/www.pervasivecode.com\/blog\/2011\/03\/19\/macruby-tweaks-to-your-customized-irbrc\/","title":{"rendered":"MacRuby tweaks to your customized .irbrc"},"content":{"rendered":"<p>I started playing with MacRuby this evening. macirb wouldn&#8217;t run with my customized .irbrc and gave the following error:<\/p>\n<pre>\/usr\/local\/bin\/macirb:60:in `block': No such file or directory - open() failed (Errno::ENOENT)\r\n\tfrom \/usr\/local\/bin\/macirb:9:in `block'\r\n\tfrom \/usr\/local\/bin\/macirb:7:in `<main>'\r\n<\/pre>\n<p><!--more--><br \/>\nIf you&#8217;re seeing this, you need to do something like this:<\/p>\n<pre># preserve history across irb executions:\r\nrequire 'irb\/completion'\r\nunless 'macruby' == RUBY_ENGINE\r\n  require 'irb\/ext\/save-history'\r\n  ARGV.concat [ \"--readline\"]\r\nend\r\nIRB.conf[:SAVE_HISTORY] = 100\r\nIRB.conf[:HISTORY_FILE] = \"#{ENV['HOME']}\/.irb-save-history\"\r\n<\/pre>\n<p>What I changed was to add lines 2 and 5 from that excerpt, making lines 3 and 4 only run if I&#8217;m *not* using macirb. If you&#8217;re getting the same error from macirb, this (or something similar) should fix it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I started playing with MacRuby this evening. macirb wouldn&#8217;t run with my customized .irbrc and gave the following error: \/usr\/local\/bin\/macirb:60:in `block&#8217;: No such file or directory &#8211; open() failed (Errno::ENOENT) from \/usr\/local\/bin\/macirb:9:in `block&#8217; from \/usr\/local\/bin\/macirb:7:in `&#8217;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,26],"tags":[],"class_list":["post-242","post","type-post","status-publish","format-standard","hentry","category-mac","category-ruby"],"_links":{"self":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/242"}],"collection":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/comments?post=242"}],"version-history":[{"count":7,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/242\/revisions"}],"predecessor-version":[{"id":249,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/242\/revisions\/249"}],"wp:attachment":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/media?parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/categories?post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/tags?post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}