The name 'Client' is reserved by Ruby on Rails.
Please choose an alternative and run this generator again.
I did a bit of searching and I couldn't find anything about the word
"client" being reserved in Rails. I've also already setup my data
model (prior to installing the resources_controller) and I was able to
run my migrations just fine with this name.
> I tried to create a resource using the following
> script/generate scaffold_resource client
> I got the following message:
> The name 'Client' is reserved by Ruby on Rails. > Please choose an alternative and run this generator again.
> I did a bit of searching and I couldn't find anything about the word > "client" being reserved in Rails. I've also already setup my data > model (prior to installing the resources_controller) and I was able to > run my migrations just fine with this name.
On Sun, Apr 20, 2008 at 4:12 PM, James Golick <jamesgol...@gmail.com> wrote: > If rails finds that constant present anywhere in your app, it assumes that > it's reserved. It's a bad error message, but that's what's happening.
> J.
> On Sun, Apr 20, 2008 at 3:14 PM, Sean Schofield <sean.schofi...@gmail.com> > wrote:
> > I tried to create a resource using the following
> > script/generate scaffold_resource client
> > I got the following message:
> > The name 'Client' is reserved by Ruby on Rails. > > Please choose an alternative and run this generator again.
> > I did a bit of searching and I couldn't find anything about the word > > "client" being reserved in Rails. I've also already setup my data > > model (prior to installing the resources_controller) and I was able to > > run my migrations just fine with this name.
> > Is this a restriction being introduced by r_c?
> So are you saying the conflict is with my own client.rb? There are no > such problems with the other pre-existing models that I have.
> Sean
> On Sun, Apr 20, 2008 at 4:12 PM, James Golick <jamesgol...@gmail.com> > wrote: > > If rails finds that constant present anywhere in your app, it assumes > that > > it's reserved. It's a bad error message, but that's what's happening.
> > J.
> > On Sun, Apr 20, 2008 at 3:14 PM, Sean Schofield < > sean.schofi...@gmail.com> > > wrote:
> > > I tried to create a resource using the following
> > > script/generate scaffold_resource client
> > > I got the following message:
> > > The name 'Client' is reserved by Ruby on Rails. > > > Please choose an alternative and run this generator again.
> > > I did a bit of searching and I couldn't find anything about the word > > > "client" being reserved in Rails. I've also already setup my data > > > model (prior to installing the resources_controller) and I was able to > > > run my migrations just fine with this name.
> > > Is this a restriction being introduced by r_c?
James is right that this is something that Rails is complaining
about. I never quite figured out why Rails thought that I had these
constants defined. I ran into another problem trying to create a
vendor resource. I believe the problem with vendor may be that there
are other constants defined in the vendor folder.
Since I had already created my models and I just wanted to stub out
the r_c stuff I added the following hack to the
scaffold_resource_generator.rb that comes with r_c
module Rails
module Generator
module Commands
class Create
def raise_class_collision(class_name)
# Do Nothing
end
end
end
end
end
Just in case anyone else is running into that issue.