This project is archived and is in readonly mode.
Can't create a model called Task - conflicts with Rake::Task??
-
Jeff Dean
This has happened to me in the past when loading a gem or plugin that requires rake. For example whenever.
If you are using bundler, you may have to add :require => false, then manually require that gem after the rails initializer block in environment.rb.
I'd check your gems / plugins first, and make sure none are requiring rake as the next debugging step.
-
Neeraj Singh
How are you trying to access Task. I created a scaffold for Task and it is working fine for me at both 2-3-stable and rails edge.
-
Francis Fish
- Importance changed from to Low
It went away when I switched back to 2.3.5 and I haven't been chasing it since.
I've just dug through my git repo back to where I switched back and the problem isn't showing - must be some environmental thing that's been fixed since.
If I cant show you you can't look at it.
For the record, a fragment had many tasks and it was initialising fragments that caused the problem, looked like they hadn't been loaded, and when it was trying to load them it was finding the rake class first.
So you may as well close the log unless you can get it to choke with a new 2.3.5 and no later installs.
Currently running rake 0.8.7, which may be why it's working now.
Thank you.
-
Rohit Arondekar
Task is a reserved word. Using it can have weird consequences. A list of reserved words -> http://wiki.rubyonrails.org/rails/pages/reservedwords (Although the list is quite old).
-
Rohit Arondekar
- State changed from new to invalid
Quoting http://wiki.rubyonrails.org/rails/pages/reservedwords
The errors that occur when you use a reserved word tend to be very confusing. Things that you think are happening in your code, are actually happening somewhere in the framework. Sometimes you can look at the stack trace and see that its not going through your class, but through some framework class. If you have an error that makes no sense at all, I would check to make sure you don’t have a name that conflicts with the above list.
I'm going to close this ticket, but if anybody still feels this needs to be patched or the issue is something else just make a comment and I'll reopen.
-
Ryan Bigg
Automatic cleanup of spam.