'Admin::UsersHelper' is already used problem

Try using:

script/generate controller admin/users

Do you happen to have a model named Admin?

Nvm what I just said earlier. It's a confirmed bug:

http://rails.lighthouseapp.com/projects/8994/tickets/545

One way I found around it is to temporarily rename the helper with the same name on the parent namespace before running the script/generate.

Erol Fornoles wrote:

Hi,

Thanks for the replies.

One way I found around it is to temporarily rename the helper with the same name on the parent namespace before running the script/generate.

Erol how did you actually renamed it? I tried and complains about some dependencies.

C:\InstantRails\rails_apps\test>ruby script/generate scaffold Problem bug:string       exists app/models/       exists app/controllers/       exists app/helpers/       create app/views/problems       exists app/views/layouts/       exists test/functional/       exists test/unit/       exists public/stylesheets/       create app/views/problems/index.html.erb       create app/views/problems/show.html.erb       create app/views/problems/new.html.erb       create app/views/problems/edit.html.erb       create app/views/layouts/problems.html.erb       create public/stylesheets/scaffold.css       create app/controllers/problems_controller.rb       create test/functional/problems_controller_test.rb       create app/helpers/problems_helper.rb        route map.resources :problems   dependency model       exists app/models/       exists test/unit/       exists test/fixtures/       create app/models/problem.rb       create test/unit/problem_test.rb       create test/fixtures/problems.yml       create db/migrate       create db/migrate/20081008061905_create_problems.rb

C:\InstantRails\rails_apps\test>ruby script/generate controller Admin::Problems   The name 'Admin::ProblemsHelper' is either already used in your application or reserved by Ruby on Rails.   Please choose an alternative and run this generator again.

I'm assuming you already have non-namespaced ProblemsController - and corresponding ProblemsHelper.

Rename problems_helper.rb to problems_helper.rb.bak in your app/ helpers directory. Run your generate script. Rename problems_helper.rb.bak to its original name.

HTH

Rename problems_helper.rb to problems_helper.rb.bak in your app/ helpers directory. Run your generate script. Rename problems_helper.rb.bak to its original name.

Yeah, now it went through.

Thanks!