Signal playing nice with Bundler

When Signal changed to Bundler as the gem dependency manager, all the projects inside it that were also using Bundler started to break, as some gems were not being loaded. This behavior did also occur with other continuous integration tools that also use Bundler, like Integrity.

This problem happend because when Bundler is loaded it sets some environment variables like BUNDLE_GEMFILE and this environment variables were being read by the projects inside Signal.

Let’s suppose Signal is installed in /var/local/apps/signal. When Signal is started, it will load Bundler and Bundler will try to read the environment variable BUNDLE_GEMFILE to know where the Gemfile is. As BUNDLE_GEMFILE is empty, it will read the Gemfile in the application root path and set this path to BUNDLE_GEMFILE. At this moment, the value of BUNDLE_GEMFILE is /var/local/apps/signal/Gemfile.

Now lets imagine we have a project inside Signal called Panthers and that his build script is like this:

bundle install
rake spec

When this script is executed by Signal, it will load Bundler and again Bundler will try to read the environment variable BUNDLE_GEMFILE to know where the Gemfile is. The problem is that at this time BUNDLE_GEMFILE would be set to /var/local/apps/signal/Gemfile and because of this Bundler will load Signal‘s gems instead of Panther’s gems.

To resolve this, now when Signal executes a build script, it unsets some environment variables like BUNDLE_GEMFILE and RAILS_ENV, trying to simulate a “clean” environment.

If you know a better solution for this, please let me know.

28 thoughts on “Signal playing nice with Bundler

  1. Bundler provides its own mechanism to execute code in a clean environment: Bundler.with_clean_env. You can use it like this:

    Bundler.with_clean_env do
    system(“bundle install”)

  2. The subsequent time I learn a weblog, I hope that it doesnt disappoint me as a lot as this one. I imply, I do know it was my option to learn, however I really thought youd have something interesting to say. All I hear is a bunch of whining about something that you would repair if you werent too busy looking for attention.

    • thanks for the post! i had the same problem, and you came up first on goolge. very helpful. for me, it seemed /config/boot.rb was the best place to put a fix.thanks again!

    • Ryan, exactly. We’ve figerud it out how to organize contributions to a projects that are alive. But there’s no typical gentlemanly workflow to take over the project. Typically it leads to dozens of forks that die in a month – everybody willing to keep maintenance act separately bringing the chaos in. On the other side giving master level of control to anyone having one accepted PR sounds way too extreme.+1.

  3. Magnificent goods from you, man. Sun Damaged to “Sun Virgin”! I’ve understand your stuff previous to and you are just too wonderful. I actually like what you’ve acquired here, really like what you are stating and the way in which you say it. You make it enjoyable and you still care for to keep it smart. I can’t wait to read far more from you. This is actually a great Sun Damaged to “Sun Virgin”! informations.

  4. I am really loving the theme/design of your weblog. Do you ever run into any internet browser compatibility issues? A few of my blog readers have complained about my blog not operating correctly in Explorer but looks great in Firefox. Do you have any recommendations to help fix this problem?

  5. First off I want to say great blog! I had a quick question that I’d like to ask if you don’t mind. I was interested to find out how you center yourself and clear your thoughts before writing. I’ve had a tough time clearing my mind in getting my thoughts out. I truly do take pleasure in writing however it just seems like the first 10 to 15 minutes tend to be lost just trying to figure out how to begin. Any recommendations or hints? Thank you!

  6. you are really a excellent webmaster. The web site loading velocity is incredible. It sort of feels that you’re doing any unique trick. Also, The contents are masterwork. you’ve performed a fantastic task on this topic!

  7. Perfectly indited written content, thank you for selective information. “The bravest thing you can do when you are not brave is to profess courage and act accordingly.” by Corra Harris.

  8. Just want to say your article is as astonishing. The clarity on your post is just nice and i could suppose you are an expert on this subject. Fine along with your permission allow me to grab your RSS feed to keep up to date with impending post. Thank you one million and please continue the gratifying work.

  9. Good post. I learn something totally new and challenging on websites I stumbleupon everyday. It will always be interesting to read content from other writers and practice something from their sites.

  10. This might make a pedestal sink project just as highly-priced as the set up of other styles of sinks. The new liner will essentially give you a new pool with previous steps and an aged drinking water slide. 1 Off Metropolis Vitality Star Bathroom Gentle Brushed Nickel Vanity Lights Fixtures.

  11. Not only can the Sani – GLAZE process restore previous, unattractive, and unsanitary tile and grout to &ldquolike new,&rdquo it can also support protect against new tile from turning into aged and hideous searching. The use of Call Cement adhesive can easily get on the fingers and then on the ceiling tiles. On the other hand, there are situations when simple answers won’t do the work, that is when experts’ enable comes in useful.

  12. Females find skates are additionally scale of in another way to by men’s, yet men’s and women’s shape skates tend to be generated in the same common sizes. Typically the glasses really are gradual trifocals (steeply-priced) together with the antiglare, antiscratch and then smoothly tinted. It’s the time involving industry paperbacks in addition to hardcovers.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">