{"id":3534,"date":"2011-09-07T17:31:56","date_gmt":"2011-09-07T17:31:56","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/?p=3534"},"modified":"2011-09-07T17:31:56","modified_gmt":"2011-09-07T17:31:56","slug":"fun-with-bundler","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2011\/09\/07\/fun-with-bundler\/","title":{"rendered":"Fun with Bundler"},"content":{"rendered":"<p>On Aeolus Conductor, we&#8217;re using Rails 3. Although I&#8217;ve been using Rails for years, some part of Rails 3&mdash;namely, <a title=\"Bundler\" href=\"http:\/\/gembundler.com\/\">Bundler<\/a>&mdash;are still relatively new to me.<\/p>\n<p>The problem I ran into is that we have a <tt>:development, :test<\/tt> <a href=\"http:\/\/gembundler.com\/groups.html\">group<\/a> defined, but it&#8217;s being installed in all environments. This is as described, but inconvenient when you&#8217;re trying to ship two separate RPMs&mdash;one package for end-users, and a -devel version for developers that depends on the gems in the <tt>:development<\/tt> and <\/tt>:test<\/tt> groups.<\/p>\n<p>It turns out that, by design, <a title=\"The How and Why of Bundler Groups\" href=\"http:\/\/yehudakatz.com\/2010\/05\/09\/the-how-and-why-of-bundler-groups\/\">bundle install will install all gems in all groups<\/a>, but Rails will only load those in the relevant environments. They have a good reason for doing this, but for certain use cases, this is inconvenient. It&#8217;s easy enough to skip this: <tt>bundle install --without=development test<\/tt> does the trick.<\/p>\n<p>But what trips me up is that it&#8217;s a &#8220;remembered setting,&#8221; something which is poorly-documented as far as I can tell. (But maybe I&#8217;m looking in the wrong places.) The problem is that there&#8217;s no apparent way to <em>un<\/em>-remember these flags, which is the subject of <a title=\"Bundler - Need a way to unremember options\" href=\"https:\/\/github.com\/carlhuda\/bundler\/issues\/867\">#867<\/a>. Right now, you&#8217;re left manually editing <tt>.bundle\/config<\/tt> to remove them. This works, but is really annoying. (<a title=\"Bundler - Automatically remembering configuration options is unexpected\" href=\"https:\/\/github.com\/carlhuda\/bundler\/issues\/1006\">#1006<\/a> argues that the whole &#8220;remembered options&#8221; feature is counter-intuitive and should be excised.)<\/p>","protected":false},"excerpt":{"rendered":"<p>On Aeolus Conductor, we&#8217;re using Rails 3. Although I&#8217;ve been using Rails for years, some part of Rails 3&mdash;namely, Bundler&mdash;are still relatively new to me. The problem I ran into is that we have a :development, :test group defined, but &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2011\/09\/07\/fun-with-bundler\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3534","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/3534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=3534"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/3534\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=3534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=3534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=3534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}