how to install devise member in rails 4.0.2 - ruby-on-rails

how to generate devise member in rails 4.0.2:
anubhav#ubuntu:~/rail$ rails generate devise:model
/usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/connection_specification.rb:44:in `resolve_string_connection': development database is not configured (ActiveRecord::AdapterNotSpecified)
from /usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/connection_specification.rb:30:in `spec'
from /usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_handling.rb:39:in `establish_connection'
from /usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/railtie.rb:176:in `block (2 levels) in <class:Railtie>'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in `each'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from /usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/base.rb:322:in `<module:ActiveRecord>'
from /usr/local/lib/ruby/gems/2.1.0/gems/activerecord-4.0.2/lib/active_record/base.rb:22:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise/orm/active_record.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /home/anubhav/rail/config/initializers/devise.rb:22:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.1.0/gems/devise-3.2.2/lib/devise.rb:288:in `setup'
from /home/anubhav/rail/config/initializers/devise.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `each'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `block in <class:Engine>'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /usr/local/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
from /usr/local/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /usr/local/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /usr/local/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /usr/local/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /usr/local/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /usr/local/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /usr/local/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/anubhav/rail/config/environment.rb:5:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

I think this line might be the clue
"development database is not configured"
Check the content of config/database.yml
and Gemfile to ensure you are using a database adapter that is installed. If you are using mysql for example ensure you have:
config/database.yml
development:
adapter: mysql2
encoding: utf8
database: yourDbName
username: yourSQLUser
password: passwordHere
host: 127.0.0.1
port: 3306
Gemfile
gem 'mysql2'
and mysql installed on the system also
If you were trying to run in production maybe you need to run
rake db:migrate RAILS_ENV=production
or postfix whatever command with RAILS_ENV=production

anubhav#ubuntu:~/rail$ rails generate devise MODEL , eg: rails generate devise User to generate a User model

Related

Installing Redmine Plugins Gives me Long Error List

I am having trouble installing plugins in Redmine 3.1.0-stable. I have placed the plugins in the plugin directory and restarted my server using:
bundle exec ruby bin/rails server -b 162.209.99.106 webrick -e production
I have also tried to use the command rake redmine:plugins:migrate which gives me this. I see that is says Access denied for user root#localhost but that doesn't make sense as that isn't what is configured in my config/databases.yml? Any advice?
rake aborted!
Mysql2::Error: Access denied for user 'root'#'localhost' (using password: NO)
/usr/local/rvm/gems/ruby-2.1.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:70:in `connect'
/usr/local/rvm/gems/ruby-2.1.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:70:in `initialize'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:436:in `new_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:446:in `checkout_new_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:565:in `retrieve_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:87:in `connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/model_schema.rb:230:in `table_exists?'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/attribute_methods/primary_key.rb:97:in `get_primary_key'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/attribute_methods/primary_key.rb:85:in `reset_primary_key'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/attribute_methods/primary_key.rb:73:in `primary_key'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_record/mass_assignment_security/attribute_assignment.rb:15:in `attributes_protected_by_default'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:337:in `block in protected_attributes_configs'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:222:in `yield'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:222:in `protected_attributes'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:126:in `block in attr_protected'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:125:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:125:in `attr_protected'
/opt/redmine/redmine-3.0.1/app/models/custom_field.rb:32:in `<class:CustomField>'
/opt/redmine/redmine-3.0.1/app/models/custom_field.rb:18:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `load'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `block in load_file'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:647:in `new_constants_in'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:456:in `load_file'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:354:in `require_or_load'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:494:in `load_missing_constant'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:526:in `load_missing_constant'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:526:in `load_missing_constant'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:526:in `load_missing_constant'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
/opt/redmine/redmine-3.0.1/lib/redmine/field_format.rb:83:in `field_attributes'
/opt/redmine/redmine-3.0.1/lib/redmine/field_format.rb:86:in `<class:Base>'
/opt/redmine/redmine-3.0.1/lib/redmine/field_format.rb:48:in `<module:FieldFormat>'
/opt/redmine/redmine-3.0.1/lib/redmine/field_format.rb:19:in `<module:Redmine>'
/opt/redmine/redmine-3.0.1/lib/redmine/field_format.rb:18:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/opt/redmine/redmine-3.0.1/lib/redmine.rb:38:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/opt/redmine/redmine-3.0.1/config/initializers/30-redmine.rb:6:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:652:in `block in load_config_initializer'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:166:in `instrument'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:651:in `load_config_initializer'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:615:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:615:in `block in <class:Engine>'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `tsort_each_child'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
/opt/redmine/redmine-3.0.1/config/environment.rb:14:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/application.rb:328:in `require'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/application.rb:328:in `require_environment!'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/application.rb:443:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
HERE IS THE COMMAND RUN WITH --TRACE flag ( Looks the same to me)
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Mysql2::Error: Access denied for user 'root'#'localhost' (using password: NO)
/usr/local/rvm/gems/ruby-2.1.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:70:in `connect'
/usr/local/rvm/gems/ruby-2.1.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:70:in `initialize'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:436:in `new_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:446:in `checkout_new_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:565:in `retrieve_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:87:in `connection'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/model_schema.rb:230:in `table_exists?'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/attribute_methods/primary_key.rb:97:in `get_primary_key'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/attribute_methods/primary_key.rb:85:in `reset_primary_key'
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.0/lib/active_record/attribute_methods/primary_key.rb:73:in `primary_key'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_record/mass_assignment_security/attribute_assignment.rb:15:in `attributes_protected_by_default'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:337:in `block in protected_attributes_configs'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:222:in `yield'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:222:in `protected_attributes'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:126:in `block in attr_protected'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:125:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:125:in `attr_protected'
/opt/redmine/redmine-3.0.1/app/models/custom_field.rb:32:in `<class:CustomField>'
/opt/redmine/redmine-3.0.1/app/models/custom_field.rb:18:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `load'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in `block in load_file'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:647:in `new_constants_in'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:456:in `load_file'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:354:in `require_or_load'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:494:in `load_missing_constant'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:526:in `load_missing_constant'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:526:in `load_missing_constant'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:526:in `load_missing_constant'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:in `const_missing'
/opt/redmine/redmine-3.0.1/lib/redmine/field_format.rb:83:in `field_attributes'
/opt/redmine/redmine-3.0.1/lib/redmine/field_format.rb:86:in `<class:Base>'
/opt/redmine/redmine-3.0.1/lib/redmine/field_format.rb:48:in `<module:FieldFormat>'
/opt/redmine/redmine-3.0.1/lib/redmine/field_format.rb:19:in `<module:Redmine>'
/opt/redmine/redmine-3.0.1/lib/redmine/field_format.rb:18:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/opt/redmine/redmine-3.0.1/lib/redmine.rb:38:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/opt/redmine/redmine-3.0.1/config/initializers/30-redmine.rb:6:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:652:in `block in load_config_initializer'
/usr/local/rvm/gems/ruby-2.1.0/gems/activesupport-4.2.0/lib/active_support/notifications.rb:166:in `instrument'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:651:in `load_config_initializer'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:615:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:615:in `block in <class:Engine>'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:44:in `tsort_each_child'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
/opt/redmine/redmine-3.0.1/config/environment.rb:14:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/application.rb:328:in `require'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/application.rb:328:in `require_environment!'
/usr/local/rvm/gems/ruby-2.1.0/gems/railties-4.2.0/lib/rails/application.rb:443:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `call'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:217:in `block in invoke_prerequisites'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:215:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:215:in `invoke_prerequisites'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `each'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
/usr/local/rvm/gems/ruby-2.1.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.1.0/bin/rake:23:in `load'
/usr/local/rvm/gems/ruby-2.1.0/bin/rake:23:in `<main>'
/usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => redmine:plugins:migrate => environment
HERE IS THE ERROR --------
# production: adapter: mysql2 database: redmine host: localhost username:
redmine password: "***********" encoding: utf8 development: adapter: mysql2
database: redmine_dev host: localhost username: redmine-dev password:
"***********" encoding: utf8
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production. test: adapter:
mysql2 database: redmine_test host: localhost username: redmine_test
password:
"************" encoding: utf8
# PostgreSQL configuration example
#production: # adapter: postgresql
# database: redmine
# host: localhost
# username: postgres
# password: "postgres"
# SQLite3 configuration example
#production:
# adapter: sqlite3
# database: db/redmine.sqlite3
# SQL Server configuration example #production:
# adapter: sqlserver
# database: redmine
# host: localhost
# username: jenkins
# password: jenkins

mandrill-mailer with sidekiq 5.0.4 uninitialized constant Sidekiq::Extensions::ActionMailer

I've juste updated the sidekiq gem to 5.0.4, and now I have this error when I run my server.
NameError: uninitialized constant Sidekiq::Extensions::ActionMailer
/Users/mike/Documents/paycar/back_end/config/initializers/mail.rb:15:in `<top (required)>'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:166:in `instrument'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:651:in `load_config_initializer'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `each'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `each'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:415:in `call'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
/Users/mike/Documents/paycar/back_end/config/environment.rb:6:in `<top (required)>'
/Users/mike/Documents/paycar/back_end/spec/rails_helper.rb:5:in `require'
/Users/mike/Documents/paycar/back_end/spec/rails_helper.rb:5:in `<top (required)>'
/Users/mike/Documents/paycar/back_end/spec/controllers/api/csrf_controller_spec.rb:2:in `require'
/Users/mike/Documents/paycar/back_end/spec/controllers/api/csrf_controller_spec.rb:2:in `<top (required)>'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `load'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `each'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:97:in `setup'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:85:in `run'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:70:in `run'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:38:in `invoke'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/exe/rspec:4:in `<top (required)>'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/bin/rspec:22:in `load'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/bin/rspec:22:in `<top (required)>'
now line 15 in mail.rb is this
::MandrillMailer::TemplateMailer.extend(Sidekiq::Extensions::ActionMailer)
I've tried adding config.eager_loading = true and also tried to add the classes config.autoload_paths but that didn't help.
Any help would be greatly appreciated.
It might be a file ordering thing. You can see that Sidekiq::Extensions::ActionMailer is defined at https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/extensions/action_mailer.rb. Perhaps try adding a require 'sidekiq/extensions/action_mailer' line at the top?
See "The Delayed Extensions..."
https://github.com/mperham/sidekiq/blob/master/5.0-Upgrade.md#whats-new

Rails 4 in action devise

Again I have a problem.
In chapter 6 Rails 4 in Action I generated Devise views with rails g devise:views and it was OK. Then I made some changes in .html files and wanted to run bundle exec rspec and got this error:
$ bundle exec rspec
bundler: failed to load command: rspec (/usr/local/bin/rspec)
NameError: uninitialized constant Devise
/home/rafal/ruby_workspace/ticketee/config/initializers/devise.rb:3:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:652:in `block in load_config_initializer'
/var/lib/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/notifications.rb:166:in `instrument'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:651:in `load_config_initializer'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:615:in `each'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:615:in `block in <class:Engine>'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `instance_exec'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `run'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:55:in `block in run_initializers'
/usr/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
/usr/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/usr/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in `each'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:44:in `tsort_each_child'
/usr/lib/ruby/2.3.0/tsort.rb:415:in `call'
/usr/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
/usr/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `each'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `call'
/usr/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
/usr/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
/usr/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
/usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in `run_initializers'
/usr/lib/ruby/vendor_ruby/rails/application.rb:352:in `initialize!'
/home/rafal/ruby_workspace/ticketee/config/environment.rb:5:in `<top (required)>'
/home/rafal/ruby_workspace/ticketee/spec/rails_helper.rb:4:in `require'
/home/rafal/ruby_workspace/ticketee/spec/rails_helper.rb:4:in `<top (required)>'
/home/rafal/ruby_workspace/ticketee/spec/controllers/projects_controller_spec.rb:1:in `require'
/home/rafal/ruby_workspace/ticketee/spec/controllers/projects_controller_spec.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `load'
/var/lib/gems/2.3.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
/var/lib/gems/2.3.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `each'
/var/lib/gems/2.3.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
/var/lib/gems/2.3.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:97:in `setup'
/var/lib/gems/2.3.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:85:in `run'
/var/lib/gems/2.3.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:70:in `run'
/var/lib/gems/2.3.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:38:in `invoke'
/var/lib/gems/2.3.0/gems/rspec-core-3.2.3/exe/rspec:4:in `<top (required)>'
/usr/local/bin/rspec:23:in `load'
/usr/local/bin/rspec:23:in `<top (required)>'
Could you help me?
The problem is that rspec doesn't load devise, to fix it, in your spec/rails_helper.rb file add require devise after require 'rspec/rails'

Rspec 3 with devise: uninitialized constant Devise (NameError)

I am trying to set up rails_rspec with devise.
When I run: rspec all the tests run fine.
When I try with bundle exec rspec I get: config/initializers/devise.rb:3:in `': uninitialized constant Devise (NameError)
The error happens in the initializer file, I have devise in my gemfile. I'm using rails 4 with Devise version 3.4.1 and Rspec version 3.2.0.
Here's the full trace:
/Users/glesauteur/Marc/gigmarket/config/initializers/devise.rb:3:in `<top (required)>': uninitialized constant Devise (NameError)
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:413:in `call'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
from /Users/glesauteur/Marc/gigmarket/config/environment.rb:5:in `<top (required)>'
from /Users/glesauteur/Marc/gigmarket/spec/rails_helper.rb:4:in `require'
from /Users/glesauteur/Marc/gigmarket/spec/rails_helper.rb:4:in `<top (required)>'
from /Users/glesauteur/Marc/gigmarket/spec/models/client_spec.rb:1:in `require'
from /Users/glesauteur/Marc/gigmarket/spec/models/client_spec.rb:1:in `<top (required)>'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `load'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `each'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:97:in `setup'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:85:in `run'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:70:in `run'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:38:in `invoke'
from /Users/glesauteur/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-3.2.3/exe/rspec:4:in `<top (required)>'
from /Users/glesauteur/.rbenv/versions/2.2.1/bin/rspec:23:in `load'
from /Users/glesauteur/.rbenv/versions/2.2.1/bin/rspec:23:in `<main>'

Can't generate anything using rails-api gem

I'm trying to set up a rails json api using the rails-api gem but I'm having a little trouble getting it to work like it should.
I'm following this tutorial since I'll be creating this for an ember.js frontend.
http://blog.jasonkriss.com/building-an-app-with-ember-app-kit-part-1/
And bundling (after fixing the [ issue on line 3) works.
When I attempt to generate the model that he generates after bundling I just get something that looks like this in the terminal...
/Users/jordanriser/workspace/Test/config/environments/development.rb:1:in `<top (required)>': undefined method `configure' for #<Test::Application:0x007f9bcb9b0640> (NoMethodError)
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/engine.rb:590:in `each'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/engine.rb:590:in `block in <class:Engine>'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:30:in `run'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:44:in `each'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/application.rb:215:in `initialize!'
from /Users/jordanriser/workspace/Test/config/environment.rb:5:in `<top (required)>'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/application.rb:189:in `require_environment!'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I've googled that "undefined method 'configure'" But I can't seem to find any definitive answers on what that is.

Resources