Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some people say that gem does not work with rails 4.2 like it cannot load some modules #14

Open
dhampik opened this issue Mar 8, 2015 · 6 comments

Comments

@dhampik
Copy link
Owner

dhampik commented Mar 8, 2015

No description provided.

@trinode
Copy link

trinode commented Mar 8, 2015

FYI:

rails g admin:scaffold_controller TermsOfService details:string --parent_controller=administration
[WARNING] Could not load generator "generators/admin/scaffold_controller/scaffold_controller_generator". Error: Admin is not a module.
/usr/local/rvm/gems/ruby-2.2.1/gems/rails-admin-scaffold-0.1.0/lib/generators/admin/scaffold_controller/scaffold_controller_generator.rb:5:in `<top (required)>'

@roma86
Copy link

roma86 commented May 12, 2015

i have this issue too


Could not find generator 'admin:scaffold_controller'. Maybe you meant 'scaffold_controller' or 'responders_controller' or 'test_unit:controller'
Run `rails generate --help` for more options.
imac:EatsEasyRoR Georg$ rails g admin:scaffold_controller City name:string lat:decimal lng:decimal
[WARNING] Could not load generator "generators/admin/scaffold_controller/scaffold_controller_generator". Error: Admin is not a module.
/Library/Ruby/Gems/2.0.0/gems/rails-admin-scaffold-0.1.0/lib/generators/admin/scaffold_controller/scaffold_controller_generator.rb:5:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/generators.rb:334:in `block (2 levels) in lookup'

Gemfile


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.1'

# Use postgresql as the database for Active Record
gem 'pg'
#sudo env ARCHFLAGS="-arch x86_64" gem install pg

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc


gem "therubyracer"
gem "less-rails"
gem 'sass-rails'
gem "compass-rails", '>= 2.0.4'
gem 'bootstrap-sass'
gem "twitter-bootstrap-rails"

gem 'simple_form'gem 'devise'
gem 'omniauth'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'omniauth-vkontakte'

gem 'rabl'
gem 'oj'
gem 'gon'
#use jsonview chrome extension

gem 'rails-admin-scaffold'

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

@maslenkov
Copy link

maslenkov commented May 19, 2015

I did some research.
It is conflict between class Admin generated by devise_for :admin(code) and rails-admin-scaffold module Admin(code)

Tmp solution:

  1. commet/remove devise_for :admins in you routes.rb
  2. run rails g admin:scaffold_controller ... command
  3. toggle comment/add devise_for :admins in you routes.rb

P.S. It is not issue of devise. It is conflict between name of generated by devise class and name of existing module in current gem.

Sorry for my English;)

@frgooall
Copy link

frgooall commented Jun 2, 2016

Thanks so much @maslenkov...your solution solved my issue.

@anhkt
Copy link

anhkt commented Apr 9, 2017

I have a problem. After active, it said that : "Model Users could not be found". Help me please!!!

@maslenkov
Copy link

@anhkt can you add more details. And please push minimal app which reproduces this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants