Rails server suddenly went down - ruby-on-rails

I am working on an app and the rails servr was working fine, but suddenly it has stopped. I tried rebooting my system (iOS) and starting the server again and again and I get this error -
/Users/alokdas/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/Users/alokdas/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
=> Booting WEBrick
=> Rails 3.2.11 application starting in development on htt.://0.0.0.3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activemodel-3.2.11/lib/active_model/validations/length.rb:14:in `initialize': :in and :within must be a Range (ArgumentError)
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activemodel-3.2.11/lib/active_model/validations/with.rb:82:in `new'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activemodel-3.2.11/lib/active_model/validations/with.rb:82:in `block in validates_with'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activemodel-3.2.11/lib/active_model/validations/with.rb:81:in `each'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activemodel-3.2.11/lib/active_model/validations/with.rb:81:in `validates_with'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activemodel-3.2.11/lib/active_model/validations/length.rb:121:in `validates_length_of'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/models/validatable.rb:35:in `block in included'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/models/validatable.rb:28:in `class_eval'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/models/validatable.rb:28:in `included'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/models.rb:112:in `include'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/models.rb:112:in `block (2 levels) in devise'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/models.rb:92:in `each'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/models.rb:92:in `block in devise'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/models.rb:123:in `devise_modules_hook!'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/models.rb:90:in `devise'
from /users/alokdas/code/omrails/app/models/view.rb:5:in `<class:View>'
from /users/alokdas/code/omrails/app/models/view.rb:1:in `<top (required)>'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:469:in `load'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:469:in `block in load_file'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:639:in `new_constants_in'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:468:in `load_file'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:353:in `require_or_load'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:502:in `load_missing_constant'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:192:in `block in const_missing'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:190:in `each'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:190:in `const_missing'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/inflector/methods.rb:230:in `block in constantize'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/inflector/methods.rb:229:in `each'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/inflector/methods.rb:229:in `constantize'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:554:in `get'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:588:in `constantize'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise.rb:267:in `get'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/mapping.rb:77:in `to'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/mapping.rb:72:in `modules'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/mapping.rb:89:in `routes'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/mapping.rb:156:in `default_used_route'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/mapping.rb:66:in `initialize'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise.rb:301:in `new'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise.rb:301:in `add_mapping'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/rails/routes.rb:208:in `block in devise_for'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/rails/routes.rb:207:in `each'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/devise-2.2.3/lib/devise/rails/routes.rb:207:in `devise_for'
from /users/alokdas/code/omrails/config/routes.rb:2:in `block in <top (required)>'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:260:in `draw'
from /users/alokdas/code/omrails/config/routes.rb:1:in `<top (required)>'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `block in load'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/file_update_checker.rb:78:in `call'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/file_update_checker.rb:78:in `execute'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /users/alokdas/code/omrails/config/environment.rb:5:in `<top (required)>'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /users/alokdas/code/omrails/config.ru:3:in `block in <main>'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/rack-1.4.4/lib/rack/builder.rb:51:in `instance_eval'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/rack-1.4.4/lib/rack/builder.rb:51:in `initialize'
from /users/alokdas/code/omrails/config.ru:in `new'
from /users/alokdas/code/omrails/config.ru:in `<main>'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/rack-1.4.4/lib/rack/builder.rb:40:in `eval'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/rack-1.4.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/rack-1.4.4/lib/rack/server.rb:200:in `app'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/commands/server.rb:46:in `app'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/rack-1.4.4/lib/rack/server.rb:304:in `wrapped_app'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/rack-1.4.4/lib/rack/server.rb:254:in `start'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/commands/server.rb:70:in `start'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap'
from /Users/alokdas/.rvm/gems/ruby-1.9.3-p374/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Just before this I had run - rails generate devise:views
Thanks for your help
More Info -
I had used - rails generate devise:install - before and it had created a Sign-up page.
Now I remember that I had used the command 'rails generate devise views' (without the colon in-between) and it had created some files, but not sure where. Could that have created some conflicts?
Here is my view.rb file from Model
class View < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me
# attr_accessible :title, :body
end

Looks like you did not run rails g devise:install, and i think that if you run and rails g command it will also fail. best option, try installing devise again and if it fails, manually delete all devise related files and try again.

Related

How can I debug a gem in Rails?

I'm attempting to start my rails server, but I'm getting the error trace below.
I've commented out the line mentioned here:
4.2.0/lib/audited/auditor.rb:48:in `audited'
from /home/david-vm/Documents/rails_projects/bane/app/models/user.rb:9:in `<class:User>'
, and I can get it to run, but I'm not sure why that is breaking it. So I was thinking of maybe using byebug to trace down the issue, but can't seem to figure out how I would go about that. Or is there another way I can troubleshoot this issue? Thanks!
Error
/home/david-vm/.rvm/gems/ruby-2.3.0/gems/tiny_tds-0.7.0/lib/tiny_tds/client.rb:74:in `connect': Server name not found in configuration files (TinyTds::Error)
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/tiny_tds-0.7.0/lib/tiny_tds/client.rb:74:in `initialize'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.3/lib/active_record/connection_adapters/sqlserver_adapter.rb:280:in `new'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.3/lib/active_record/connection_adapters/sqlserver_adapter.rb:280:in `dblib_connect'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.3/lib/active_record/connection_adapters/sqlserver_adapter.rb:271:in `connect'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.3/lib/active_record/connection_adapters/sqlserver_adapter.rb:59:in `initialize'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.3/lib/active_record/sqlserver_base.rb:18:in `new'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.3/lib/active_record/sqlserver_base.rb:18:in `sqlserver_connection'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:436:in `new_connection'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:446:in `checkout_new_connection'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:565:in `retrieve_connection'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:87:in `connection'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/model_schema.rb:230:in `table_exists?'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/attribute_methods/primary_key.rb:97:in `get_primary_key'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/attribute_methods/primary_key.rb:85:in `reset_primary_key'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.0/lib/active_record/attribute_methods/primary_key.rb:73:in `primary_key'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/audited-activerecord-4.2.0/lib/audited/adapters/active_record.rb:7:in `default_ignored_attributes'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/audited-4.2.0/lib/audited/auditor.rb:48:in `audited'
from /home/david-vm/Documents/rails_projects/bane/app/models/user.rb:9:in `<class:User>'
from /home/david-vm/Documents/rails_projects/bane/app/models/user.rb:1:in `<top (required)>'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `load'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `block in load_file'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:647:in `new_constants_in'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:456:in `load_file'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:354:in `require_or_load'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:494:in `load_missing_constant'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:261:in `const_get'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:261:in `block in constantize'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `each'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `inject'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in `constantize'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:566:in `get'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:597:in `constantize'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise.rb:377:in `get'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise/mapping.rb:81:in `to'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise/mapping.rb:76:in `modules'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise/mapping.rb:93:in `routes'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise/mapping.rb:160:in `default_used_route'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise/mapping.rb:70:in `initialize'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise.rb:411:in `new'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise.rb:411:in `add_mapping'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise/rails/routes.rb:241:in `block in devise_for'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise/rails/routes.rb:240:in `each'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/devise-4.0.1/lib/devise/rails/routes.rb:240:in `devise_for'
from /home/david-vm/Documents/rails_projects/bane/config/routes.rb:11:in `block in <top (required)>'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in `instance_exec'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in `eval_block'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:401:in `draw'
from /home/david-vm/Documents/rails_projects/bane/config/routes.rb:1:in `<top (required)>'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /home/david-vm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
from /home/david-vm/Documents/rails_projects/bane/config/environment.rb:5:in `<top (required)>'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/application.rb:328:in `require_environment!'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:142:in `require_application_and_environment!'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:67:in `console'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/david-vm/.rvm/gems/ruby-2.3.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
User.rb
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :ldap_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
after_destroy :ensure_an_admin_remains
before_create { generate_token(:auth_token) }
# Audit changes made except for the columns as specified below
audited except: [:last_seen_at, :sign_in_count, :last_sign_in_at, :last_sign_in_ip, :password_digest]
has_associated_audits
acts_as_tagger
acts_as_taggable_on :roles
# associations, methods, etc...
end
Update
Turns out it was a DNS issue, so even though my database.yml hadn't changed- the server name was no longer working. Just added the update in case anyone is having this similar issue, might be worth checking this out.
The answer is IN the stack trace. It's telling you exactly what file ON your system is having the error. The fact that that file came from a gem, or lives in a different part of your computer, is irrelevant.
/home/david-vm/.rvm/gems/ruby-2.3.0/gems/tiny_tds-0.7.0/lib/tiny_tds/client.rb:74:in `connect': Server name not found in configuration files (TinyTds::Error)
Open that file (or whatever file in the backtrace seems most appropriate) with your editor, stick a binding.pry (or byebug, or debugger, whatever you're using) in there before the line it's blowing up on (74). Then restart your app and debug as if it was a file in your app.

Devise generate view

I am following this tutorial:
http://www.rubyonrailstree.blogspot.com/2014/02/ruby-on-rails-device-gem-install-step.html
and I am having trouble with:
rails g devise:views
&
rake db:migrate
both comming up with a simmilar error of:
/home/zach/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.4/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `attr_accessible' for User (call 'User.connection' to establish a connection):Class (NoMethodError)
from /home/zach/HandCoOp/project/HandCo-op/app/models/user.rb:8:in `<class:User>'
from /home/zach/HandCoOp/project/HandCo-op/app/models/user.rb:1:in `<top (required)>'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:443:in `load'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:443:in `block in load_file'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:633:in `new_constants_in'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:442:in `load_file'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:342:in `require_or_load'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:480:in `load_missing_constant'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:180:in `const_missing'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/inflector/methods.rb:238:in `const_get'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/inflector/methods.rb:238:in `block in constantize'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/inflector/methods.rb:236:in `each'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/inflector/methods.rb:236:in `inject'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/inflector/methods.rb:236:in `constantize'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:552:in `get'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:583:in `constantize'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/devise-1.4.7/lib/devise.rb:259:in `get'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/devise-1.4.7/lib/devise/mapping.rb:103:in `to'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/devise-1.4.7/lib/devise/mapping.rb:98:in `modules'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/devise-1.4.7/lib/devise/mapping.rb:115:in `routes'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/devise-1.4.7/lib/devise/mapping.rb:84:in `initialize'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/devise-1.4.7/lib/devise.rb:289:in `new'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/devise-1.4.7/lib/devise.rb:289:in `add_mapping'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/devise-1.4.7/lib/devise/rails/routes.rb:190:in `block in devise_for'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/devise-1.4.7/lib/devise/rails/routes.rb:189:in `each'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/devise-1.4.7/lib/devise/rails/routes.rb:189:in `devise_for'
from /home/zach/HandCoOp/project/HandCo-op/config/routes.rb:2:in `block in <top (required)>'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:337:in `instance_exec'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:337:in `eval_block'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:315:in `draw'
from /home/zach/HandCoOp/project/HandCo-op/config/routes.rb:1:in `<top (required)>'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `block in load'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/file_update_checker.rb:75:in `call'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/finisher.rb:71:in `block in <module:Finisher>'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `instance_exec'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `run'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/zach/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /home/zach/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /home/zach/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /home/zach/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /home/zach/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /home/zach/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /home/zach/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /home/zach/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /home/zach/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/initializable.rb:54:in `run_initializers'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application.rb:300:in `initialize!'
from /home/zach/HandCoOp/project/HandCo-op/config/environment.rb:5:in `<top (required)>'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `block in require'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application.rb:276:in `require_environment!'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:147:in `require_application_and_environment!'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:133:in `generate_or_destroy'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:51:in `generate'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Am I using version of ruby that does not support this yet? I will keep looking into this error and I thank anyone who has information about this issue.
routes.rb:
Rails.application.routes.draw do
devise_for :users
root 'home#index'
user.rb model:
class User < ActiveRecord::Base
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
:email
:password
:password_confirmation
:remember_me
end
thanks, hope this helps!
root 'home#index' should be changed root to: "home#index".
Starting from Rails 4 you do not use attr_accessible. You will have to remove the line.
when using a gem the better solution is to appeal to its docs. So in your case the command to generate views (after you added gem 'devise' to Gemfile and run bundle) should be
a) rails generate devise:install,
b) rails generate devise:views

Devise strong params

I am trying to implement devise in one of my rails 4 projects and am getting a weird error. When I run:
rake db:migrate
I get the following:
rake aborted!
NameError: undefined local variable or method `params' for User (call 'User.connection' to establish a connection):Class
/home/zach/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.4/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/home/zach/HandCoOp/project/HandCo-op/app/models/user.rb:8:in `<class:User>'
/home/zach/HandCoOp/project/HandCo-op/app/models/user.rb:1:in `<top (required)>'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:443:in `load'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:443:in `block in load_file'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:633:in `new_constants_in'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:442:in `load_file'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:342:in `require_or_load'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:480:in `load_missing_constant'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:180:in `const_missing'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/inflector/methods.rb:238:in `const_get'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/inflector/methods.rb:238:in `block in constantize'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/inflector/methods.rb:236:in `each'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/inflector/methods.rb:236:in `inject'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/inflector/methods.rb:236:in `constantize'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:552:in `get'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:583:in `constantize'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise.rb:297:in `get'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:77:in `to'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:72:in `modules'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:89:in `routes'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:156:in `default_used_route'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:66:in `initialize'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise.rb:331:in `new'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise.rb:331:in `add_mapping'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/rails/routes.rb:221:in `block in devise_for'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `each'
/home/zach/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `devise_for'
/home/zach/HandCoOp/project/HandCo-op/config/routes.rb:2:in `block in <top (required)>'
/home/zach/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:337:in `instance_exec'
/home/zach/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:337:in `eval_block'
/home/zach/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.4/lib/action_dispatch/routing/route_set.rb:315:in `draw'
/home/zach/HandCoOp/project/HandCo-op/config/routes.rb:1:in `<top (required)>'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `block in load'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in `load'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `each'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:16:in `reload!'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/file_update_checker.rb:75:in `call'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/file_update_checker.rb:75:in `execute'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:27:in `updater'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application/finisher.rb:71:in `block in <module:Finisher>'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `instance_exec'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/initializable.rb:30:in `run'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/initializable.rb:54:in `run_initializers'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application.rb:300:in `initialize!'
/home/zach/HandCoOp/project/HandCo-op/config/environment.rb:5:in `<top (required)>'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `block in require'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/zach/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in `require'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application.rb:276:in `require_environment!'
/home/zach/.rvm/gems/ruby-2.1.2/gems/railties-4.1.4/lib/rails/application.rb:379:in `block in run_tasks_blocks'
/home/zach/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/home/zach/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
this is my model and the error is pointing to "params.require" which according to strong params, it should be solid.
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :lockable, :timeoutable, :confirmable and :activatable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
params.require(:email, :password, :password_confirmation)
end
Does anyone know what is going on? maybe I am missing a gem required for strong params? I just don't know. I will keep looking into the issue and thank you anyone who knows my mistake.
Did you look how to use strong params? Delete this params.require(:email, :password, :password_confirmation) line from model.
In your controller (assume users_controller.rb):
def create
#user = User.new(user_params)
end
And then at the bottom of a file:
private
def user_params
params.require(:user).permit(:email, :password, :password_confirmation)
end
Defined this in your controller, your create method will be working.

Unable to install devise gem "unidentified method for install"on Rails

When I try to perform "rails generate devise:install" I get this error message:
I've tried re-installing the devise gem multiple times. This error also comes up when I try to start up my server. I'm wondering if the cause of this is from initially trying to install the devise gem with "rails generate devise install" instead of putting a colon between devise and install.
Maxs-MacBook-Air:pinteresting allecat941$ rails generate devise:install
/Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `devise' for Install (call 'Install.connection' to establish a connection):Class (NoMethodError)
from /Users/allecat941/pinteresting/app/models/install.rb:4:in `<class:Install>'
from /Users/allecat941/pinteresting/app/models/install.rb:1:in `<top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:443:in `load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:443:in `block in load_file'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:633:in `new_constants_in'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:442:in `load_file'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:342:in `require_or_load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:480:in `load_missing_constant'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:180:in `const_missing'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:238:in `const_get'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:238:in `block in constantize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `inject'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `constantize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:552:in `get'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:583:in `constantize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise.rb:297:in `get'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:77:in `to'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:72:in `modules'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:89:in `routes'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:156:in `default_used_route'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:66:in `initialize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise.rb:331:in `new'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise.rb:331:in `add_mapping'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/rails/routes.rb:221:in `block in devise_for'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `devise_for'
from /Users/allecat941/pinteresting/config/routes.rb:2:in `block in <top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:335:in `instance_exec'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:335:in `eval_block'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:313:in `draw'
from /Users/allecat941/pinteresting/config/routes.rb:1:in `<top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `block in load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/finisher.rb:71:in `block in <module:Finisher>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
from /Users/allecat941/pinteresting/config/environment.rb:5:in `<top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:92:in `preload'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:140:in `serve'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:128:in `block in run'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:122:in `loop'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:122:in `run'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
It looks like your accidental install created Install model and other files. Delete those, perhaps?
I am using the device gem and without devise install . Then use, the cmd rails g device auth in this case rails throw the error than using this method my problem is solved
extend Devise::Models
in my auth.rb files
class Auth < ApplicationRecord
extend Devise::Models
end

Rails 4: devise and omniauthable error

I use devise and omniauth in my Rails 4 app. I did all actions from this page (from answer):
Devise, Omniauth and Facebook integration session error
After adding this :omniauthable into
this string
devise :database_authenticatable, :registerable, :confirmable,
:recoverable, :rememberable, :trackable, :validatable
, i'm getting error:
/home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:193:in `normalize_conditions!': You should not use the `match` method in your router without specifying an HTTP method. (RuntimeError)
If you want to expose your action to GET, use `get` in the router:
Instead of: match "controller#action"
Do: get "controller#action"
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:64:in `initialize'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1425:in `new'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1425:in `add_route'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1404:in `decomposed_match'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1386:in `block in match'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1386:in `each'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:1386:in `match'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:365:in `devise_omniauth_callback'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:212:in `block (4 levels) in devise_for'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:212:in `each'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:212:in `block (3 levels) in devise_for'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:376:in `with_devise_exclusive_scope'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:211:in `block (2 levels) in devise_for'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:311:in `block in devise_scope'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:833:in `block in constraints'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:716:in `scope'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/mapper.rb:833:in `constraints'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:310:in `devise_scope'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:209:in `block in devise_for'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:192:in `each'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/devise-1.5.4/lib/devise/rails/routes.rb:192:in `devise_for'
from /home/u164/nikita/projects/domain-inspect/config/routes.rb:2:in `block in <top (required)>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/route_set.rb:320:in `instance_exec'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/route_set.rb:320:in `eval_block'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-4.0.0.beta1/lib/action_dispatch/routing/route_set.rb:298:in `draw'
from /home/u164/nikita/projects/domain-inspect/config/routes.rb:1:in `<top (required)>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:222:in `load'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:222:in `block in load'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:222:in `load'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/file_update_checker.rb:75:in `call'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:30:in `instance_exec'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:30:in `run'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:180:in `each'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
from /home/u164/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:54:in `run_initializers'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/application.rb:213:in `initialize!'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/u164/nikita/projects/domain-inspect/config/environment.rb:5:in `<top (required)>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `require'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `block in require'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `require'
from /home/u164/nikita/projects/domain-inspect/config.ru:3:in `block in <main>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /home/u164/nikita/projects/domain-inspect/config.ru:in `new'
from /home/u164/nikita/projects/domain-inspect/config.ru:in `<main>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/commands/server.rb:46:in `app'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/commands/server.rb:71:in `start'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/commands.rb:78:in `block in <top (required)>'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/commands.rb:73:in `tap'
from /home/u164/.rvm/gems/ruby-1.9.3-p392/gems/railties-4.0.0.beta1/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
What should I do? Or there is now way to use devise in rail 4 apps?
UPD 1
Here is my routes.rb
DomainInspect::Application.routes.draw do
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" ,:registrations => "registrations" }
root :to => 'pages#main'
resources :users, only: [:show, :edit, :update]
resources :domains
end
Rails 4 isn't currently supported in the latest release of devise (v2.2.3 as of this writing). However there is currently an active pull request open.
So until this gets merged and released into the wild, you can point your Gemfile to use it with the following:
gem 'devise', :github => 'plataformatec/devise', :branch => 'rails4'

Resources