This project is archived and is in readonly mode.
test tasks fail when db/schema.rb doesn't exist
-
Rizwan Reza
- Tag set to bugmash, error, verified
verified
+1 Agreed. That is sure to scare a beginner. :)
-
Josh Nichols
Chrome has failed me for the last time for attaching a patch.
No tests, because there's no previous tests for rake stuff.
-
Dan Croak
+1 verified patch applies cleanly. Looks like the right error message now.
-
John Trupiano
+1 verified patch applies cleanly, addresses something I think should be fixed.
It's worth pointing out that rails can be used without a database. Would it make sense to change the error message from:
db/schema.rb doesn't exist yet. Run "rake db:migrate" to create it then try again.to
db/schema.rb doesn't exist yet. Run "rake db:migrate" to create it then try again. If you do not intend to use a database, you should instead alter config/environment.rb to remove active_record: config.frameworks -= [ :active_record ]I've attached a revised patch for consideration.
-
Rizwan Reza
verified
+1 The patch applies cleanly to master and 2-3-stable.
-
Nikolay Petrachkov
- Assigned user set to Pratik
- Tag changed from bugmash, error, verified to bugmash, error, patch, verified
+1 Patch works for 2-3.
-
Elad Meidar
+1 on idea and message, verified and applies cleanly on 2-3-stable and master
sidenote: there should be a test suit for the basic included rake tasks, there are tests.
-
Josh Nichols
+1 on John's message tweaks. I had thought to include a message to that effect, but figured it'd be a little too verbose. Looks fine though.
-
David Trasbo
+1
Applies cleanly to edge Rails. But the patch needs tests.
-
Josh Nichols
As I said before, there aren't any tests for ANY of the rake tasks, so starting to do that just for this one patch seems a little overwhelming.
-
Derander
- Assigned user cleared.
+1
I frequently write rails apps with no database.
Patch applied cleanly to 2-3-stable and master.
-
Derander
- Assigned user set to Pratik
Oops, apparently I cleared the assigned user. That wasn't intentional.. undoing that.
-
Rebecca Frankel
+1 Yes, I really want this fix. I want to be reminded what to do rather than get a long stack trace that is always the same. Could there be analogous fixes for the perennial stack traces that result from not having some needed gem installed?
patch applied to 2-3-stable. I ran the tests too, not that it makes a difference for a patch without tests.
-
Hugo Peixoto
+1 on the idea.
-
Repository
- State changed from new to committed
(from [84d24cdae8269a161d36e00009c043bbd102cbbd]) Only load db/schema.rb if it exists; otherwise, display a message to run db:migrate or remove active_record in environment.rb.
[#3012 test tasks fail when db/schema.rb doesn't exist state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/84d24cdae8269a161d36e00009c043... -
Repository
(from [ebb6606a4d09ca362a0c56a458444a8dd551c495]) Only load db/schema.rb if it exists; otherwise, display a message to run db:migrate or remove active_record in environment.rb.
[#3012 test tasks fail when db/schema.rb doesn't exist state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/ebb6606a4d09ca362a0c56a458444a... -
Jeremy Kemper
- Tag changed from bugmash, error, patch, verified to error, patch, verified
- Milestone set to 2.3.4
