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.

[PATCH] Rake tasks failing silently when using unsupported adapters

#5947

The case statements in create_database and drop_database in databases.rake do not have an "else" block. Thus when you call a rake task that uses one of these methods and you're using an adapter that's not listed in the proceeding cases, the task will fail silently.

I've added else statements that throw exceptions in these situations and included a patch.

Reported by Paul Hieromnimon · November 10th, 2010 @ 10:37 PM

State: open
Milestone: none
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Paul Hieromnimon
    Paul Hieromnimon
    • Title changed from Rake tasks failing silently when using unsupported adapters to [Patch] Rake tasks failing silently when using unsupported adapters

    November 10th, 2010 @ 11:49 PM

  2. Paul Hieromnimon
    Paul Hieromnimon
    • Title changed from [Patch] Rake tasks failing silently when using unsupported adapters to [PATCH] Rake tasks failing silently when using unsupported adapters

    November 10th, 2010 @ 11:49 PM

  3. Rohit Arondekar
    Rohit Arondekar
    • Importance changed from to Low

    Should't it be "db:create/db:drop not supported" instead of "db_create/db_drop not supported"?

    November 11th, 2010 @ 02:31 AM

  4. Paul Hieromnimon
    Paul Hieromnimon

    Rohit,

    Good point! I made the changes you suggested and am attaching an updated patch. Sorry for the delay - I had to go out of town for the last few days.

    November 17th, 2010 @ 05:26 AM

  5. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to open
    • Assigned user set to José Valim

    November 17th, 2010 @ 09:41 AM

  6. rails
    rails
    • Tag changed from rake tasks, databases.rake, patch, rake to rake tasks, databasesrake, patch, rake

    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 18th, 2011 @ 12:00 AM

  7. rails
    rails
    • State changed from open to stale

    February 18th, 2011 @ 12:00 AM

  8. Paul Hieromnimon
    Paul Hieromnimon
    • State changed from stale to open

    This is still a problem on master. I think that it is very important for Rails (or any software) to be able to provide error messages to the user rather than silently failing. [state:open]

    February 21st, 2011 @ 05:56 AM