Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#2892

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.

Reported by gruntruk · July 9th, 2009 @ 02:05 PM

State: stale
Milestone: 2.3.10
Assigned to: Matt Jones Matt Jones
Importance: none

Activity

  1. Michael Koziarski
    Michael Koziarski
    • Assigned user set to Matt Jones

    August 3rd, 2009 @ 06:08 AM

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

    May 4th, 2010 @ 06:48 PM

  3. Rohit Arondekar
    Rohit Arondekar
    • 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.

    July 5th, 2010 @ 09:48 AM

  4. Miles Egan
    Miles Egan

    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?

    July 10th, 2010 @ 08:05 PM

  5. Lenary
    Lenary

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

    July 10th, 2010 @ 08:28 PM

  6. Neeraj Singh
    Neeraj Singh
    • Milestone changed from 2.x to 2.3.9

    July 29th, 2010 @ 09:20 PM

  7. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.3.9 to 2.3.10

    August 30th, 2010 @ 02:28 AM

  8. Santiago Pastorino
    Santiago Pastorino
    • 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.

    February 2nd, 2011 @ 04:32 PM

  9. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:32 PM