Rails mountable Engine + Devise - ruby-on-rails

I am doing Authentication app using Devise (as Engine). I followed the steps from this link every thing goes perfectly until i reach the command
rails generate devise MODEL
from the above link after this command it shows some errors
invoke active_record
create db/migrate/20140901111733_devise_create_fd_users.rb
/Users/user/.rvm/gems/ruby-1.9.3-p547/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished)
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/activerecord-4.1.5/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/activerecord-4.1.5/lib/active_record/connection_handling.rb:87:in `connection'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/devise-3.3.0/lib/generators/active_record/devise_generator.rb:86:in `postgresql?'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/devise-3.3.0/lib/generators/active_record/devise_generator.rb:78:in `inet?'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/devise-3.3.0/lib/generators/active_record/devise_generator.rb:74:in `ip_column'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/devise-3.3.0/lib/generators/active_record/devise_generator.rb:56:in `migration_data'
from (erb):4:in `migration_template'
from /Users/user/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/erb.rb:838:in `eval'
from /Users/user/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/erb.rb:838:in `result'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/migration.rb:64:in `block in migration_template'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `call'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `render'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block (2 levels) in invoke!'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `open'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block in invoke!'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `call'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/migration.rb:34:in `create_migration'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators/migration.rb:63:in `migration_template'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/devise-3.3.0/lib/generators/active_record/devise_generator.rb:16:in `copy_devise_migration'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:277:in `block in _invoke_for_class_method'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/shell.rb:68:in `with_padding'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:266:in `_invoke_for_class_method'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:149:in `_invoke_from_option_orm'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/generators.rb:157:in `invoke'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/commands/generate.rb:11:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.5/lib/rails/engine/commands.rb:19:in `<top (required)>'
from bin/rails:12:in `require'
from bin/rails:12:in `<main>'
I thought Database connection not established properly so i tested using the command
rails generate model Test name:string email:string
its working properly, then i gave
rake db:migrate
Now database also migrated successfully, so i think database connection is properly working. The commands mentioned above were run from Engine's Directory. If any information needed comment it out i will provide the details. Thanks

Use devise 3.2.x instead of devise 3.3.x

Related

rails 5 - could could not generate rspec:install

I am trying to build restful api using rails
I am following the blog link tutorial to work out
https://scotch.io/tutorials/build-a-restful-json-api-with-rails-5-part-one
but when i run this following command
rails generate rspec:install
It generates the following error
identical .rspec
exist spec
create spec/C:/Users/Shad Munir/AppData/Local/Temp/d20170503-6768-l4n0e9/spec/spec_helper.rb
C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:253:in `mkdir': Invalid argument # dir_s_mkdir - E:/todos-api/spec/C: (Errno::EINVAL)
from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:253:in `fu_mkdir'
from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:227:in `block (2 levels) in mkdir_p'
from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:225:in `reverse_each'
from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:225:in `block in mkdir_p'
from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:211:in `each'
from C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:211:in `mkdir_p'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:61:in `block in invoke!'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:60:in `invoke!'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions.rb:95:in `action'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:25:in `create_file'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/file_manipulation.rb:27:in `copy_file'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/directory.rb:94:in `block in execute!'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/directory.rb:80:in `each'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/directory.rb:80:in `execute!'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/directory.rb:66:in `invoke!'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions.rb:95:in `action'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/directory.rb:52:in `directory'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rspec-rails-3.5.2/lib/generators/rspec/install/install_generator.rb:23:in `block in copy_spec_files'
from C:/Ruby23-x64/lib/ruby/2.3.0/tmpdir.rb:89:in `mktmpdir'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rspec-rails-3.5.2/lib/generators/rspec/install/install_generator.rb:20:in `copy_spec_files'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `block in invoke_all'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `each'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `map'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `invoke_all'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/group.rb:232:in `dispatch'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/generators.rb:180:in `invoke'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/generate.rb:13:in `<top (required)>'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `block in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:138:in `require_command!'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:145:in `generate_or_destroy'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:60:in `generate'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I tried some related solution from stack overflow but none of them is working .
I had this same problem a couple of days ago. What I had to do was delete all versions of RSpec from my machine and then run bundle install. This installed the latest version of RSpec and everything was good afterwards.

Apartment gem giving unexpected error when generating model on Rails 5.1.0

I am new to rails platform. I'm building a multi-tenant application using Apartment gem. I'm following https://medium.com/#balogic/using-apartment-gem-to-implement-multitenant-concept-in-rails-b86f7d9e37c5 this guide to learn how to use this gem. But when i am scaffolding or generating User model i am getting the below error :
$ rails g scaffold Users email name subdomain
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.1.0/lib/action _dispatch/middleware/stack.rb:35:in `build': undefined method `new' for "Apartme nt::Elevators::Subdomain":String (NoMethodError)
Did you mean? next
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.1 .0/lib/action_dispatch/middleware/stack.rb:99:in `block in build'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.1 .0/lib/action_dispatch/middleware/stack.rb:99:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.1 .0/lib/action_dispatch/middleware/stack.rb:99:in `inject'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.1 .0/lib/action_dispatch/middleware/stack.rb:99:in `build'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/engine.rb:508:in `block in app'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/engine.rb:504:in `synchronize'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/engine.rb:504:in `app'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/application/finisher.rb:45:in `block in <module:Finisher>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/initializable.rb:30:in `instance_exec'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/initializable.rb:30:in `run'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/initializable.rb:59:in `block in run_initializers'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block i n tsort_each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block ( 2 levels) in each_strongly_connected_component'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_st rongly_connected_component_from'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block i n each_strongly_connected_component'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_st rongly_connected_component'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_e ach'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_e ach'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/initializable.rb:58:in `run_initializers'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/application.rb:353:in `initialize!'
from C:/Sites/multitenant_app/config/environment.rb:5:in `<top (required )>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/application.rb:329:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/application.rb:329:in `require_environment!'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/command/actions.rb:16:in `require_application_and_environment!'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/commands/generate/generate_command.rb:19:in `perform'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.4/li b/thor/command.rb:27:in `run'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.4/li b/thor/invocation.rb:126:in `invoke_command'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.4/li b/thor.rb:369:in `dispatch'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/command/base.rb:63:in `perform'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/command.rb:44:in `invoke'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.1.0 /lib/rails/commands.rb:16:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
**Note : ** My Rails version is 5.0.1 and Ruby version is 2.3.0
Change this line Rails.application.config.middleware.use 'Apartment::Elevators::Subdomain' removing quotation marks.
Reference:
https://github.com/influitive/apartment/pull/422
Add the below line in application.rb file
require 'apartment/elevators/subdomain'
Add below line in application.rb file inside Application class
config.middleware.use Apartment::Elevators::Subdomain

permission Denied whil installing activeadmin

I am trying to use activeadmin in my Rails app.But when i try to install activeadmin it throws 'permission denied' error.
I have added in my Gemfile.
gem 'activeadmin', github: 'activeadmin'
When I run 'rails generate active_admin:install'
I get the following error
**/home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:101:in `initialize': Permission denied # rb_sysopen - /home/cbls-2/academics/office_management/config/routes.rb (Errno::EACCES)**
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:101:in `open'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:101:in `replace!'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:59:in `invoke!'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:30:in `insert_into_file'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators/actions.rb:224:in `block in route'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:194:in `block in in_root'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:184:in `block in inside'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/2.3.0/fileutils.rb:128:in `chdir'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/2.3.0/fileutils.rb:128:in `cd'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:184:in `inside'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:194:in `in_root'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators/actions.rb:223:in `route'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/devise-4.1.0/lib/generators/devise/devise_generator.rb:22:in `add_devise_routes'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/activeadmin-70cfbf3d7d33/lib/generators/active_admin/devise/devise_generator.rb:39:in `create_admin_user'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/group.rb:277:in `block in _invoke_for_class_method'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/shell.rb:68:in `with_padding'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/group.rb:266:in `_invoke_for_class_method'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/group.rb:133:in `_invoke_from_option_users'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators.rb:157:in `invoke'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/generate.rb:13:in `<top (required)>'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:130:in `generate_or_destroy'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:50:in `generate'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/cbls-2/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:9:in `require'
from bin/rails:9:in `<main>'
Try running
sudo chown -R youruser ~/.rbenv

Error on Rails Admin install. Possibly Devise related?

Sorry to copy in this entire log, but I'm hoping it might make more sense to someone familiar with this issue. When devise began setting up the user model I wasn't given the option (I never pressed enter) and the install proceeded and crashed, outputting the following. Thanks!
? What would you like the user model to be called? Press <enter> for [user] > - Now setting up devise with user model name 'user':
generate devise
invoke active_record
create db/migrate/20120825075751_add_devise_to_users.rb
insert app/models/user.rb
route devise_for :users
- Now you'll need an initializer...
create config/initializers/rails_admin.rb
/home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `block in source_reflection': undefined method `klass' for nil:NilClass (NoMethodError)
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `collect'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:385:in `source_reflection'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:375:in `rescue in foreign_key'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activerecord-3.2.8/lib/active_record/reflection.rb:373:in `foreign_key'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:259:in `association_foreign_key_lookup'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:71:in `block in associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:64:in `map'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:64:in `associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:29:in `block (2 levels) in polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:28:in `each'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:28:in `block in polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:27:in `tap'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/abstract_model.rb:27:in `polymorphic_parents'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:222:in `association_model_lookup'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/adapters/active_record.rb:69:in `block (2 levels) in associations'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:49:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:49:in `associated_model_config'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/fields/types/polymorphic_association.rb:19:in `block in <class:PolymorphicAssociation>'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:68:in `instance_eval'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:68:in `block in register_instance_option'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/rails_admin/config/configurable.rb:42:in `block in register_instance_option'
from (erb):86:in `block (2 levels) in template'
from (erb):85:in `map'
from (erb):85:in `block in template'
from (erb):82:in `map'
from (erb):82:in `template'
from /home/funkdified/.rvm/rubies/ruby-1.9.3-p125-HEAD/lib/ruby/1.9.1/erb.rb:838:in `eval'
from /home/funkdified/.rvm/rubies/ruby-1.9.3-p125-HEAD/lib/ruby/1.9.1/erb.rb:838:in `result'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/file_manipulation.rb:111:in `block in template'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:54:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:54:in `render'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `block (2 levels) in invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `open'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:63:in `block in invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `call'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `invoke_with_conflict_check'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:61:in `invoke!'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions.rb:95:in `action'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/create_file.rb:26:in `create_file'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/actions/file_manipulation.rb:110:in `template'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/rails_admin-0.0.5/lib/generators/rails_admin/install_generator.rb:59:in `install'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `block in invoke_all'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `each'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `map'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `invoke_all'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/group.rb:238:in `dispatch'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/generators.rb:171:in `invoke'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/commands/generate.rb:12:in `<top (required)>'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /home/funkdified/.rvm/gems/ruby-1.9.3-p125-HEAD#rails323/gems/railties-3.2.8/lib/rails/commands.rb:29:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I figured it out. I installed devise first to debug and found it was an issue with my existing User model. I needed to drop the User table and start over.

Broken rails environment: can't run rails generate scaffold

I have a mystery: My rvm/ruby-1.9.2 environment, running rails 3.1.3, can no longer run this command
rails generate scaffold Game name:string difficulty:string
I get the following dump after a 'method missing' failure
kenb#stargate:~/development/sudoku$ rails g scaffold Game name:string difficulty:string
invoke active_record
/home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/base.rb:1088:in `method_missing': undefined method `mass_assignment_sanitizer=' for ActiveRecord::Base:Class (NoMethodError)
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railtie.rb:59:in `block (3 levels) in <class:Railtie>'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railtie.rb:58:in `each'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railtie.rb:58:in `block (2 levels) in <class:Railtie>'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/base.rb:2190:in `<top (required)>'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/generators/named_base.rb:165:in `pluralize_table_names?'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/generators/named_base.rb:112:in `table_name'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/rails/generators/active_record/model/model_generator.rb:17:in `create_migration_file'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:109:in `invoke'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/group.rb:269:in `block in _invoke_for_class_method'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/shell.rb:74:in `with_padding'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/group.rb:258:in `_invoke_for_class_method'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/group.rb:150:in `_invoke_from_option_orm'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/generators.rb:168:in `invoke'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/commands/generate.rb:12:in `<top (required)>'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
from /home/kenb/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/commands.rb:28:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I have gone so far as to remove rvm and all dependent gems, re-install rvm, ruby-1.9.2, and then run 'bundle install' in my app folder. All goes well. Then, I get a failure on the generate command.
According to http://apidock.com/rails/ActiveModel/MassAssignmentSecurity/ClassMethods/mass_assignment_sanitizer%3D mass_assignment_sanitizer was introduced in rails 3.2, while you are using 3.1.3. Haven't you generated you project with rails 3.2?

Resources