This project is archived and is in readonly mode.

#5947 open
Paul Hieromnimon

[PATCH] Rake tasks failing silently when using unsupported adapters

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

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.

Comments and changes to this ticket

  • Paul Hieromnimon

    Paul Hieromnimon November 10th, 2010 @ 11:49 PM

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

    Paul Hieromnimon November 10th, 2010 @ 11:49 PM

    • Title changed from “[Patch] Rake tasks failing silently when using unsupported adapters” to “[PATCH] Rake tasks failing silently when using unsupported adapters”
  • Rohit Arondekar

    Rohit Arondekar November 11th, 2010 @ 02:31 AM

    • Importance changed from “” to “Low”

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

  • Paul Hieromnimon

    Paul Hieromnimon November 17th, 2010 @ 05:26 AM

    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.

  • Rohit Arondekar

    Rohit Arondekar November 17th, 2010 @ 09:41 AM

    • State changed from “new” to “open”
    • Assigned user set to “José Valim”
  • rails

    rails February 18th, 2011 @ 12:00 AM

    • 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.

  • rails

    rails February 18th, 2011 @ 12:00 AM

    • State changed from “open” to “stale”
  • Paul Hieromnimon

    Paul Hieromnimon February 21st, 2011 @ 05:56 AM

    • 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]

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>

Attachments

Pages