This project is archived and is in readonly mode.
Bug colliding classes (when they shouldn't)
-
Eduard Gimenez
Also, calling controller generator the two times also fails.
$ rails test2
$ cd test2
$ script/generate controller Post
$ script/generate controller Admin::Post
The name 'Admin::PostHelper' is either already used in your application or reserved by Ruby on Rails.
Please choose an alternative and run this generator again.
-
Eduard Gimenez
Seems it was broken in 2d372d704987e05712ccd937e78d8dbd41242efe
-
Dieter Komendera
I can confirm this bug. I'll attach a quick test case which shows the problem. This test case fails with 2.1 and latest version from github.
-
Dieter Komendera
- Tag changed from 2.1, bug, generators to 2.1, bug, edge, generators
- Assigned user set to josh
Indeed, with 2d372d704987e05712ccd937e78d8dbd41242efe reverted, everything works fine again.
What was the patch about?
-
Matthijs Langenberg
I've also ran into this with Rails 2.1.0.
mlangenberg-mbp:test-app mlangenberg$ script/generate controller adminblabla/post The name 'Adminblabla::PostHelper' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again.Is this already fixed in the current HEAD?
-
josh
- State changed from new to resolved
-
Claudio Poli
not sure if it's fixed..
-
Jose Fernandez
Bug still shows up on my end, edge rails up to date.
-
wildchild
Experiencing the same problem
$ script/generate controller hello::world => OK! $ script/generate controller hello::everyone => The name 'hello' is either already used in your...
-
Bryan T. Richardson
I'm getting the same as wildchild.
$ script/generate controller World --> works $ script/generate controller Hello::World --> now works $ script/generate controller Hello::Universe --> The name 'hello' is either already used...
-
Claudio Poli
problem arises when including helper :all in ApplicationController for me.
-
Major Kong
I have tried to augment an existing controller with the scaffold generator and get the same error.
rails foo cd foo script/generate scaffold fum script/generate scaffold fum title:string
BOOM...
"The name 'FumsHelper' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again."
gem list says: rails (2.1.0, 1.2.6)
-
Alexandre da Silva
- Tag changed from 2.1, bug, edge, generators to 2.1, bug, edge, generators
in 2.1.1 seems to be already there:
$ ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
$ rails -v Rails 2.1.1
$ rails test $ cd test
$ script/generate controller Posts ... $ script/generate controller Admin::Posts The name 'Admin::PostsHelper' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again.
-
Lakshan Perera
I'm also running the latest edge release but still experience this collision. Any idea what's happening?
-
Matthijs Langenberg
- No changes were found…
-
Major Kong
Is there a way to see what changes were made to the source when the bug was flipped to "resolved"? It would be helpful to read the source in order to try to fix this since it, at least in my opinion, is not fully done.
Or, perhaps this is by design; could someone then please explain to me what the rationale is.
-
Claudio Poli
- Tag changed from 2.1, bug, edge, generators to 2.1, bug, edge, generators
definitely not solved on edge.
again, the problem appears when including
helper :all
in ApplicationController.
-
claytonlz
With "helper :all" in application.rb
$ rails -v Rails 2.1.1
$ ruby -v ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.1.0]
$ script/generate rspec_controller 'admin/categories'
The name 'Admin::CategoriesHelper' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative and run this generator again.
Without "helper :all" in application.rb
$ script/generate rspec_controller 'admin/categories' ... success
-
josh
- State changed from resolved to open
- Milestone cleared.
- Tag changed from 2.1, bug, edge, generators to generators
I did revert the commit as suggested and applied that failing test.
http://github.com/rails/rails/co...
Apparently, the issue still exists. Any more patches :)
This ticket is holding off the 2.2 beta release.
-
Repository
- State changed from open to resolved
(from [9ab83b1cd1323e0ffebbd287c38aff614c18822c]) Don't include the path when checking class collisions [#545 state:resolved] http://github.com/rails/rails/co...
