Dave Silvester
2005-Sep-11 21:34 UTC
Scaffold generator broken - "The name ** is reserved by Ruby on Rails"
There''s already a similar thread going on about this, but I''ve just encountered it myself, and seeing where it''s going, I think a more obvious thread title might get some attention and help find a fix. I''m running the current beta Rails (0.13.1.2203), and when I try and use the scaffold generator, I get the following: $ ruby script/generate scaffold Vehicletype exists app/controllers/ exists app/helpers/ create app/views/vehicletypes exists test/functional/ create app/views/vehicletypes/_form.rhtml dependency model The name ''Vehicletype'' is reserved by Ruby on Rails. Please choose an alternative and run this generator again. Suggestions: Now, the guy who had this problem before was using the word "Student", which at a stretch of the imagination didn''t seem like the most unlikely word to be reserved - OK, you have to stretch your imagination rather far, but less likely things have happened, somewhere! However, I would reckon that the probability that "Vehicletype" is a reserved word is absolutely zero. Which leads me to believe that something funky is going on here, and that there''s a bug of some sort. I''ve Googled and found nothing much except some stuff for Rails 0.9, which didn''t seem to relate to this problem at all. So, I''m wondering if anyone else is also experiencing this, and if anyone has a fix or workaround for it? Cheers, ~Dave -- Dave Silvester Rent-A-Monkey Website Development Web: http://www.rentamonkey.com/
Jacob Quinn Shenker
2005-Sep-12 00:35 UTC
Re: Scaffold generator broken - "The name ** is reserved by Ruby on Rails"
Can you start a clean Rails dir ("rails myapp") and then do "cd myapp && ./script/generate scaffold Vehicletype"? Jacob On 9/11/05, Dave Silvester <dave@rentamonkey.com> wrote:> There's already a similar thread going on about this, but I've just > encountered it myself, and seeing where it's going, I think a more obvious > thread title might get some attention and help find a fix. > > I'm running the current beta Rails (0.13.1.2203), and when I try and use the > scaffold generator, I get the following: > > $ ruby script/generate scaffold Vehicletype > exists app/controllers/ > exists app/helpers/ > create app/views/vehicletypes > exists test/functional/ > create app/views/vehicletypes/_form.rhtml > dependency model > The name 'Vehicletype' is reserved by Ruby on Rails. > Please choose an alternative and run this generator again. > > Suggestions: > > > Now, the guy who had this problem before was using the word "Student", which > at a stretch of the imagination didn't seem like the most unlikely word to be > reserved - OK, you have to stretch your imagination rather far, but less > likely things have happened, somewhere! > > However, I would reckon that the probability that "Vehicletype" is a reserved > word is absolutely zero. Which leads me to believe that something funky is > going on here, and that there's a bug of some sort. > > I've Googled and found nothing much except some stuff for Rails 0.9, which > didn't seem to relate to this problem at all. So, I'm wondering if anyone > else is also experiencing this, and if anyone has a fix or workaround for it? > > Cheers, > > ~Dave > > -- > > Dave Silvester > Rent-A-Monkey Website Development > Web: http://www.rentamonkey.com/ > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Dave Silvester
2005-Sep-12 01:05 UTC
Re: Scaffold generator broken - "The name ** is reserved by Ruby on Rails"
Dave Silvester wrote:> I''m running the current beta Rails (0.13.1.2203), and when I try and use > the scaffold generator, I get the following:OK, my workaround for now was to uninstall beta Rails, clean out all my other old versions of any gems (just being tidy there) leaving only the current versions, and revert back to mainstream gem Rails. This has fixed the problem for now, so something strange is definitely going on with the generators in beta Rails at the moment. I''m not brave enough to try edge Rails, so am not sure if the problem also exists there. I can''t see any relevant bugs listed at the moment though, so perhaps this is an elusive one? By the way, I found the following page of reserved words... http://wiki.rubyonrails.com/rails/show/ReservedWords ... and checked against it, and it came as no surprise to find that "Vehicletype" is not a reserved word, and neither is "Student" for that matter! So, the bug is as follows: The generators seem to be confused about what is a reserved word and what isn''t, and are seemingly saying that everything is a reserved word, and refusing to generate models... I think? Another aside: the mailing list is having sporadic big delays again, that last mail took around 2.5 hours to come through. I replied on another thread earlier, and it came through within minutes. Something is still not working right with this mailing list... oh well! :-S ~Dave -- Dave Silvester Rent-A-Monkey Website Development Web: http://www.rentamonkey.com/
Dave Silvester
2005-Sep-12 01:10 UTC
Re: Scaffold generator broken - "The name ** is reserved by Ruby on Rails"
Jacob Quinn Shenker wrote:> Can you start a clean Rails dir ("rails myapp") and then do "cd myapp > && ./script/generate scaffold Vehicletype"?Sorry, I couldn''t afford to hang around waiting for the mailing list (delays) on this one, had to find a fix fast, so I''ve reverted back to mainstream gem Rails. Perhaps "Moshe" (rails at mbdev dot net) can do that for you, since as far as I know, the "Student is a reserved word" thread didn''t ever come to a conclusion, and looks like the same bug. Although he''s using mainstream gem Rails, as far as I know? Weird! ~Dave -- Dave Silvester Rent-A-Monkey Website Development Web: http://www.rentamonkey.com/