This project is archived and is in readonly mode.

#2892 ✓stale
gruntruk

rake gems:install returns success exit code when failing on gem install

Reported by gruntruk | July 9th, 2009 @ 02:05 PM | in 2.3.10

Assume I haven't set http://gems.github.com as a valid gem source:

gtgapp@rza:~/.cruise/projects/gtg-trunk/work$ rake gems:install --verbose RAILS_ENV=test
(in /home/gtgapp/.cruise/projects/gtg-trunk/work)
gem install relevance-rcov --version ">= 0.8.3.4"
ERROR:  could not find gem relevance-rcov locally or in a repository

gtgapp@rza:~/.cruise/projects/gtg-trunk/work$ echo $?
0

Notice the exit code is set to 0 indicating success despite failing to install the gem. I came across this while setting up gem installation on a cruise.rb instance.

Comments and changes to this ticket

  • Michael Koziarski

    Michael Koziarski August 3rd, 2009 @ 06:08 AM

    • Assigned user set to “Matt Jones”
  • Jeremy Kemper

    Jeremy Kemper May 4th, 2010 @ 06:48 PM

    • Milestone changed from 2.x to 3.x
  • Rohit Arondekar

    Rohit Arondekar July 5th, 2010 @ 09:48 AM

    • Milestone changed from 3.x to 2.x
    • Importance changed from “” to “”

    Can somebody try and reproduce this on 2-3-stable or 2.8?

    Changing milestone to 2.x since 3 doesn't have a gems:install task anymore because of Bundler.

  • Miles Egan

    Miles Egan July 10th, 2010 @ 08:05 PM

    Can reproduce here but not sure what the fix should be. The installer is just shelling out to the gem command and it might be installing several gems. Should it return non-zero if any of the gem installs fails?

  • Lenary

    Lenary July 10th, 2010 @ 08:28 PM

    I would say yes, it should only return zero if completely successful.

  • Neeraj Singh

    Neeraj Singh July 29th, 2010 @ 09:20 PM

    • Milestone changed from 2.x to 2.3.9
  • Jeremy Kemper

    Jeremy Kemper August 30th, 2010 @ 02:28 AM

    • Milestone changed from 2.3.9 to 2.3.10
  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:32 PM

    • State changed from “new” to “open”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:32 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Tags

Pages