Flickering Tests with PhantomJS and Rspec - ruby

I am using PhantomJS in my Rails app for integration testing of a form that is submitted through AJAX. My test suite runs green the first few times, and then eventually I run into these errors, which appear sporadically:
1) Admin update admin homepage should allow the admin to change a bicycle's listing to approved
Failure/Error: Unable to find matching line from backtrace
ActiveRecord::StatementInvalid:
PG::UnableToSend: : ROLLBACK
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `exec'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:425:in `block in log'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:420:in `log'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:127:in `execute'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:218:in `rollback_db_transaction'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/transaction.rb:171:in `perform_rollback'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/transaction.rb:110:in `rollback'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/database_statements.rb:240:in `rollback_transaction'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/fixtures.rb:883:in `block in teardown_fixtures'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/fixtures.rb:882:in `each'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/fixtures.rb:882:in `teardown_fixtures'
# /Users/epicodus/.gem/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/fixtures.rb:718:in `after_teardown'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-rails-2.14.0/lib/rspec/rails/adapters.rb:52:in `block (2 levels) in <module:MiniTestLifecycleAdapter>'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:247:in `instance_eval_with_args'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/hooks.rb:108:in `call'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/hooks.rb:108:in `run'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/hooks.rb:446:in `run_hook'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:340:in `run_around_each_hooks'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:256:in `with_around_each_hooks'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:111:in `run'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:390:in `block in run_examples'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:386:in `map'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:386:in `run_examples'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:371:in `run'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `block in run'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `map'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `run'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:28:in `map'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:28:in `block in run'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/reporter.rb:58:in `report'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:25:in `run'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:80:in `run'
# /Users/epicodus/.gem/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'
2) Admin update admin homepage should text "1 bicycle currently pending"
Failure/Error: Unable to find matching line from backtrace
ActiveRecord::RecordNotFound:
Couldn't find Bicycle with id=515
# ./app/controllers/bicycles_controller.rb:42:in `update'
3) User pages after being redirected to the sign in page, they are redirected back
Failure/Error: Unable to find matching line from backtrace
NoMethodError:
undefined method `cmd_tuples' for nil:NilClass
# ./app/controllers/bicycles_controller.rb:52:in `block (2 levels) in update'
# ./app/controllers/bicycles_controller.rb:43:in `update'
I can get the suite running green again if I run
rake db:drop
rake db:create
rake db:schema:load
rake db:test:prepare
but then the problem persists soon after. The feature works in development without fail. Here's my gemfile:
source 'https://rubygems.org'
gem 'rails', '4.0.0'
gem 'pg'
gem 'sass-rails', '~> 4.0.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'jbuilder', '~> 1.2'
gem 'paperclip'
gem 'devise'
gem 'bootstrap-sass', :git => 'https://github.com/thomas-mcdonald/bootstrap-sass'
gem 'textacular', "~> 3.0", require: 'textacular/rails'
gem 'will_paginate', '3.0.4'
gem 'will_paginate-bootstrap'
gem 'jquery-ui-rails'
gem "cancan"
gem 'recaptcha-mailhide'
group :production do
gem 'lograge'
gem 'rails_12factor'
end
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'quiet_assets'
end
group :test do
gem 'spork-rails'
gem 'capybara'
gem 'shoulda-matchers'
gem 'launchy'
gem 'poltergeist'
gem 'database_cleaner'
end
group :test, :development do
gem 'rspec-rails'
gem 'pry'
gem 'factory_girl_rails'
end

Related

Unable to start rails server with any ruby versions

Currently we're using ruby 2.2.3 but I've used rbenv to test different versions and for all of them when I attempt to run rails server, it gives me similar logs:
/Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `require': /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/meta_request-0.7.3/lib/meta_request/railtie.rb:20: syntax error, unexpected '.' (SyntaxError)
Rails.logger&.extend(LogInterceptor)
^
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/meta_request-0.7.3/lib/meta_request.rb:29:in `<top (required)>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `block in require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.17.3/lib/bundler.rb:114:in `require'
from /Users/leon.shimizu/Desktop/Spectrio/apps/engage-ds-cms/app/config/application.rb:16:in `<top (required)>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:79:in `require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:76:in `server'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Here's /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/meta_request-0.7.3/lib/meta_request/railtie.rb before removing the '.' on line 20:
1. # frozen_string_literal: true
2.
3. require 'rails/railtie'
4.
5. module MetaRequest
6. class Railtie < ::Rails::Railtie
7. initializer 'meta_request.inject_middlewares' do |app|
8. app.middleware.use Middlewares::MetaRequestHandler
9.
10. if defined? ActionDispatch::DebugExceptions
11. app.middleware.insert_before ActionDispatch::DebugExceptions, Middlewares::Headers, app.config
12. else
13. app.middleware.use Middlewares::Headers, app.config
14. end
15.
16. app.middleware.use Middlewares::AppRequestHandler
17. end
18.
19. initializer 'meta_request.log_interceptor' do
20. Rails.logger&.extend(LogInterceptor)
21. end
22.
23. initializer 'meta_request.subscribe_to_notifications' do
24. AppNotifications.subscribe
25. end
26. end
27. end
Then I removed the '.' from line 20 and got the following log:
=> Booting Thin
=> Rails 4.1.14.2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
/Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/meta_request-0.7.3/lib/meta_request/railtie.rb:20:in `block in <class:Railtie>': undefined method `&' for #<ActiveSupport::Logger:0x007fdbe355c460> (NoMethodError)
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:30:in `run'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/application.rb:300:in `initialize!'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/railtie.rb:194:in `public_send'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/railtie.rb:194:in `method_missing'
from /Users/leon.shimizu/Desktop/Spectrio/apps/engage-ds-cms/app/config/environment.rb:5:in `<top (required)>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `require'
from /Users/leon.shimizu/Desktop/Spectrio/apps/engage-ds-cms/app/config.ru:3:in `block in <main>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/builder.rb:55:in `initialize'
from /Users/leon.shimizu/Desktop/Spectrio/apps/engage-ds-cms/app/config.ru:in `new'
from /Users/leon.shimizu/Desktop/Spectrio/apps/engage-ds-cms/app/config.ru:in `<main>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/builder.rb:49:in `eval'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/server.rb:199:in `app'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/server.rb:50:in `app'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/server.rb:314:in `wrapped_app'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/server.rb:130:in `log_to_stdout'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/server.rb:67:in `start'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:81:in `block in server'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:76:in `server'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Then I removed the '&' and added the '.' back and got this log:
=> Booting Thin
=> Rails 4.1.14.2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
/Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/airbrake-ruby-2.8.3/lib/airbrake-ruby/notifier.rb:32:in `initialize': :project_id is required (Airbrake::Error)
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/airbrake-ruby-2.8.3/lib/airbrake-ruby.rb:136:in `new'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/airbrake-ruby-2.8.3/lib/airbrake-ruby.rb:136:in `configure'
from /Users/leon.shimizu/Desktop/Spectrio/apps/engage-ds-cms/app/config/initializers/airbrake.rb:1:in `<top (required)>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:241:in `load'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:241:in `block in load'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:241:in `load'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/engine.rb:648:in `block in load_config_initializer'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/notifications.rb:161:in `instrument'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/engine.rb:647:in `load_config_initializer'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/engine.rb:611:in `each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/engine.rb:611:in `block in <class:Engine>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:30:in `run'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:44:in `each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:413:in `call'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/application.rb:300:in `initialize!'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/railtie.rb:194:in `public_send'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/railtie.rb:194:in `method_missing'
from /Users/leon.shimizu/Desktop/Spectrio/apps/engage-ds-cms/app/config/environment.rb:5:in `<top (required)>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.2/lib/active_support/dependencies.rb:247:in `require'
from /Users/leon.shimizu/Desktop/Spectrio/apps/engage-ds-cms/app/config.ru:3:in `block in <main>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/builder.rb:55:in `initialize'
from /Users/leon.shimizu/Desktop/Spectrio/apps/engage-ds-cms/app/config.ru:in `new'
from /Users/leon.shimizu/Desktop/Spectrio/apps/engage-ds-cms/app/config.ru:in `<main>'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/builder.rb:49:in `eval'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/server.rb:199:in `app'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/server.rb:50:in `app'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.5.4/lib/rack/server.rb:314:in `wrapped_app'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/server.rb:130:in `log_to_stdout'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/server.rb:67:in `start'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:81:in `block in server'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:76:in `server'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/leon.shimizu/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.1.14.2/lib/rails/commands.rb:17:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I tried to add the log from when I attempted it with ruby 2.4.6, 2.6.10, and 2.7.2 but I ran out of characters.
Also, I wanted to say that I'm currently debugging and researching these errors but I just wanted to ask to see if anyone has seen similar errors.
Also, if you need any more information about what version of certain gems or anything like that, please let me know and I'll add it.
Gemfile:
source 'https://api.rubygems.org'
##############################
# Rails and DB
##############################
gem 'rails', '4.1.14.2'
gem 'rack', '1.5.4'
gem 'rack-cors', '1.0.2', require: 'rack/cors'
gem "rake", '0.9.2.2'
gem 'mysql2', '0.3.20'
gem 'test-unit', '3.1.5'
gem 'rails-erd'
##############################
# Assets (formerly assets group)
##############################
gem 'coffee-rails', '4.0.0'
gem 'uglifier', '>= 1.0.3'
gem "therubyracer", '0.12.2'
gem 'libv8', '3.16.14.13'
gem "less-rails", "3.0.0"
gem "railsstrap", "3.3.4"
gem "font-awesome-rails", "4.4.0.0"
##############################
# Environment
##############################
gem 'dotenv-rails', :groups => [:development, :test, :production]
##############################
# I18n
##############################
gem 'http_accept_language', '2.0.0'
gem 'i18n-js', '3.0.2'
##############################
# Authentication
##############################
# devise is currently at version 4.3.0, but we can't
# upgrade to anything 4.0+ without upgrading to rails 4.
gem 'devise', '3.5.10'
# token authentication for API.
# current version is 1.0.0. we won't be able to upgrade
# until we can upgrade devise to 4.0.
gem 'devise-token_authenticatable', '0.4.10'
# used for password_regex in devise config.
# could this be moved to a validation callback on the user model
# since we are only using the regex capability?
# also, seems unmaintained. currently only supports up to rails 4.0.
gem 'devise_security_extension', '0.10.0'
gem 'cancan', '1.6.3'
gem 'omniauth', '1.4.2'
gem 'omniauth-facebook', '4.0.0'
gem 'omniauth-twitter', '1.2.1'
gem 'omniauth-google-oauth2', '0.4.1'
gem 'omniauth-auth0'
gem 'doorkeeper', '3.1.0'
##############################
# API and Formatting
##############################
gem 'will_paginate', '~> 3.0'
gem 'wicked_pdf', '0.9.8'
gem 'wkhtmltopdf-binary-edge', '~> 0.12.3.0'
gem 'speechmatics', '0.2.1'
##############################
# Model Behavior
##############################
gem 'actionpack-xml_parser', '1.0.2' # XML parameter parsing
gem 'activerecord-session_store', '1.0.0'
gem 'protected_attributes', '1.0.5'
gem 'rails-observers', '0.1.5'
gem 'sidekiq', '5.0.5'
gem 'sidetiq', '0.7.2'
gem 'ancestry', '2.0.0'
gem 'acts-as-taggable-on', '4.0.0'
gem "audited-activerecord", '4.0.0'
gem 'geocoder', '1.6.1'
gem "rails_config", '0.2.5'
gem 'nokogiri', '1.6.0'
gem 'xml-simple', '1.1.5', :require => 'xmlsimple'
gem "rubyzip", "0.9.9"
gem 'google_timezone', '0.0.5'
# Included in Rails 4
#gem 'strong_parameters', '0.2.3'
gem 'acts_as_commentable', '4.0.2'
gem 'acts_as_list', '0.7.2'
gem 'ransack', '1.8.4'
gem 'ice_cube', '0.14.0'
gem 'simple_enum', '1.6.9' # can switch to active record enum when upgrade to rails 4
##############################
# Uploads
##############################
gem 'aws-sdk', '2.1.20'
gem 'carrierwave', '1.3.2'
gem 'carrierwave-aws', '1.2.0'
gem "mini_magick", "4.9.4"
gem 's3_direct_upload', git: 'https://github.com/waynehoover/s3_direct_upload'
gem 'transloadit', '2.0.1'
##############################
# Caching
##############################
gem 'actionpack-page_caching', '~> 1.2.1'
gem 'redis-rails'
gem 'redis-store', '1.6.0'
gem 'redis-namespace', '1.6.0'
gem 'redmon', '0.0.8', :require => false
##############################
# Cron
##############################
gem 'whenever', "0.8.2", :require => false
##############################
# Monitoring
##############################
gem "airbrake", "7.2.1"
gem "airbrake-ruby", "2.8.3"
gem 'newrelic_rpm', '~> 3.6'
gem "oink", '0.10.1'
##############################
# Logging
##############################
gem 'apachelogregex', '0.1.0'
gem 'log4r', '1.1.9'
##############################
# UI
##############################
gem 'jquery-rails', "2.2.1"
gem "swfobject-rails", "2.0"
gem 'will_paginate-bootstrap', "1.0.1"
gem "browser", "0.8.0"
gem "mobile-fu", "1.3.1"
gem "slim", "1.3.6"
gem "sinatra"
##############################
# EMAIL
##############################
gem "roadie", "3.0.3"
gem "roadie-rails", "1.0.4"
##############################
# Development/Linting
##############################
gem 'rubocop', '0.32.0', require: false
##############################
# Social
##############################
gem 'koala', '2.3.0' # Facebook
gem 'twitter', git: 'https://github.com/sferik/twitter', branch: 'master', ref: '60eb256'
gem 'google-api-client', '0.9'
##############################
# Util
##############################
gem 'json-compare'
gem 'chartkick', '3.0.2'
group :production do
end
group :test do
gem 'factory_bot_rails', require: false
gem 'rspec-rails', '~> 3.5'
gem 'shoulda', '~> 3.5', require: false
gem "fakeredis", :require => "fakeredis/rspec"
gem 'database_cleaner'
gem 'faker'
gem 'timecop'
gem 'test_after_commit', '1.1.0'
gem "rspec_junit_formatter", "~> 0.4.1"
end
group :development do
#gem 'rails4_upgrade', github: 'alindeman/rails4_upgrade'
gem "query_reviewer"
gem "capistrano", "2.15.6"
gem "capistrano-ec2group"
gem "capistrano-sidekiq"
gem "net-ssh", "~> 2.7.0"
gem 'quiet_assets', '~> 1.1.0'
# enables use of rails panel extension https://github.com/dejan/rails_panel
gem 'meta_request'
# allows interactive debugging
gem 'pry-remote'
# file monitoring for tests
gem 'ruby_dep', '~> 1.3.1'
gem 'guard-rspec', '~> 4.7'
gem 'brakeman', require: false
gem 'bullet'
gem "ruby-debug-ide", "~> 0.6.1"
gem "debase", "~> 0.2.2"
end
gem "jwt", "~> 1.5"
gem "httparty", "~> 0.16.2"
gem "puma", "3.12.4"
gem "blazer", "~> 1.9"
gem 'actionpack', '4.1.14.2'
gem 'ffi', '1.9.24'
gem 'activerecord', '4.1.14.2'
gem 'mimemagic', github: 'mimemagicrb/mimemagic', ref: '01f92d86d15d85cfd0f20dabd025dcbd36a8a60f'

`build': undefined method `new' for ExceptionNotifier:Module (NoMethodError) when executing rails s

I just upgraded to Mac OSX Mavericks and to Ruby 1.9.3-p392 and now when I try to run rails s in one of my app I get the following error:
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:43:in `build': undefined method `new' for ExceptionNotifier:Module (NoMethodError)
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `block in build'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `each'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `inject'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `build'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/engine.rb:470:in `app'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/finisher.rb:31:in `block in <module:Finisher>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/titouanvanbelle/Documents/workspace/paymy/config/environment.rb:5:in `<top (required)>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/titouanvanbelle/Documents/workspace/paymy/config.ru:3:in `block in <main>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /Users/titouanvanbelle/Documents/workspace/paymy/config.ru:in `new'
from /Users/titouanvanbelle/Documents/workspace/paymy/config.ru:in `<main>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/titouanvanbelle/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
This is my Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'bcrypt-ruby', "3.0.1"
# Database support:
gem 'pg'
# Use native JSON extension:
gem 'json'
# Use RABL to build API responses:
gem 'rabl'
# HTML parsing for press page
gem 'nokogiri'
# Authentication & authorization:
gem 'omniauth-facebook'
gem 'consul'
gem 'omniauth-identity'
# Pagination
gem 'will_paginate'
gem 'will_paginate-bootstrap'
gem 'foundation-will_paginate'
# Facebook
gem 'koala'
# Utility
gem 'modularity'
gem 'has_defaults'
gem 'andand'
gem 'gibberish'
gem 'state_machine'
gem 'exception_notification'
gem 'edge_rider'
gem 'rest-client'
gem 'haml-rails'
gem 'bootstrap-sass', '~> 2.1.1.0'
gem 'zurb-foundation', '~> 4.1.6'
gem 'compass-rails'
gem 'jquery-rails'
gem 'inherited_resources'
# GUI
gem 'simple_form'
# background processing
gem 'delayed_job_active_record'
# Payment
gem 'king_dtaus'
group :deploy do
# cron
gem 'whenever', require: false
end
# Gems used for development and testing
# and not required in production.
group :development, :test do
gem 'machinist', '<2'
gem 'machinist_callbacks'
gem 'faker'
gem 'rspec-rails'
gem 'cucumber-rails', require: false
gem 'cucumber_factory'
gem 'database_cleaner'
gem 'timecop'
gem 'capybara', '<2'
gem 'spreewald'
gem 'cucumber_spinner'
gem 'launchy'
gem 'rspec_candy'
gem 'pry'
gem 'debugger'
gem 'quiet_assets'
gem 'letter_opener'
gem 'poltergeist'
gem 'guard-rspec'
gem 'guard-cucumber'
gem 'parallel_tests'
end
group :test do
gem 'shoulda-matchers'
end
# Gems used only for assets and not required
# in production environments by default.
# group :assets do
# gem 'sass-rails'
# gem 'coffee-rails'
# gem 'uglifier'
# end
group :assets do
gem 'sass-rails', '~> 3.1'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'execjs'
gem 'therubyracer'
end
group :development do
gem 'better_errors'
gem 'meta_request'
gem 'binding_of_caller'
gem 'ruby-graphviz', '<= 1.0.8'
end
# Sencha theming with compass:
gem 'compass', group: :development
group :deployment do
gem 'capistrano'
gem 'capistrano_colors'
gem 'rvm-capistrano'
end
group :server do
gem 'god'
gem 'daemons'
end
Versions I am using are:
Ruby: ruby-1.9.3-p392
Rails: Rails 3.2.13
Not sure what else to tell you, but just ask. I'll add as much information as I can.
The issue is with "exception_notification" gem, you have had updated to version 4.x.
You must change: YOUR_APP::Application.config.middleware.use ExceptionNotifier
to
YOUR_APP::Application.config.middleware.use ExceptionNotification::Rack
More info: https://github.com/smartinez87/exception_notification#upgrading-to-4x-version

Error with Devise - Cannot run rails s or any devise commands

I've recently added gem 'devise' but all of the sudden I can no longer run rails s or any devise commands without seeing this Error message:
`c:3:in rescue in execute_if_updated': Rails::Application::RoutesReloader#execute_if_updated delegated to updater.execute_if_updated, but updater is nil: #<Rai
s::Application::RoutesReloader:0x276cf60 #paths=["c:/Sites/code/omrails/config/routes.rb"], #route_sets=[#<ActionDispatch::Routing::RouteSet:0x2ab40c0>]> (Runt
meError)
from c:65535:in `execute_if_updated'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0.rc2/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:30:in `instance_exec'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:30:in `run'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:55:in `block in run_initializers'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:54:in `run_initializers'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0.rc2/lib/rails/application.rb:215:in `initialize!'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0.rc2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from c:/Sites/code/omrails/config/environment.rb:5:in `<top (required)>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0.rc2/lib/rails/application.rb:189:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0.rc2/lib/rails/application.rb:189:in `require_environment!'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0.rc2/lib/rails/commands.rb:47:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.0.0.rc2'
gem 'jquery-rails'
gem 'devise', '3.0.0.rc'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'bootstrap-sass', '~> 2.3.2.1'
gem 'pg'
gem 'simple_form', '3.0.0.rc'
gem 'protected_attributes'
gem 'rails_12factor', group: :production
ruby '1.9.3'
group :development, :test do
gem 'sqlite3'
end
group :assets do
gem 'sass-rails', '~> 4.0.0.rc2'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'bootstrap-sass', '~> 2.3.2.1'
end
group :doc do
gem 'sdoc', require: false
end
Routes.rb
Omrails::Application.routes.draw do
devise_for :installs
# You can have the root of your site routed with "root"
get 'about' => 'pages#about'
root :to => 'pages#home'
end
Maybe you can shifting to rails edge.
gem 'rails', github: 'rails/rails'
gem "devise", "~> 3.0.1"
(https://github.com/rails/rails/issues/10559)

Error with Rake DB:Migrate undefined method `confirm_within=' for Devise:Module

I'm getting this error when I try run DB:Rake :
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
Resolved collector.newrelic.com to 204.93.223.153
rake aborted!
undefined method `confirm_within=' for Devise:Module
/Users/jasonvdm/development/rails/config/initializers/devise.rb:66:in `block in <top (required)>'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/devise-2.1.2/lib/devise.rb:247:in `setup'
/Users/jasonvdm/development/rails/config/initializers/devise.rb:3:in `<top (required)>'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `load'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `block in load'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `load'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/railties-3.1.3/lib/rails/engine.rb:556:in `block (2 levels) in <class:Engine>'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/railties-3.1.3/lib/rails/engine.rb:555:in `each'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/railties-3.1.3/lib/rails/engine.rb:555:in `block in <class:Engine>'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/jasonvdm/development/rails/config/environment.rb:5:in `<top (required)>'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/Users/jasonvdm/.rvm/gems/ruby-1.9.3-p194#wheelz/gems/activesupport- 3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
Not sure why i'm getting these errors at all.
This is what it is my gemfile, leaving out some of the end portions that are private.
source 'http://rubygems.org'
gem 'rails', '3.1.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2', '~> 0.3.11'
# gem 'sqlite3'
group :production do
gem 'thin'
gem 'pg'
end
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'
# Bundle the extra gems:
gem 'typus', '~> 3.1.8'
gem "ckeditor-rails", :git => "https://github.com/fesplugas/rails-ckeditor.git" # for typus _text_with_ckeditor.html.erb
gem 'nokogiri'
gem 'aws-s3', :require => 'aws/s3'
gem 'aws-sdk'
gem 'paperclip', '~> 2.5.0'
gem 'devise'
gem 'omniauth-facebook'
gem 'cancan'
gem 'koala'
gem 'rc_rails'
gem 'dynamic_form' # to get back old 'error_messages_on' behavior
gem 'role_model'
gem 'renum'
gem 'geokit', "1.6.0"
gem 'rails3-settings', '~> 1.0.0', :require => 'settings', :git => 'git://github.com/jlaxson/rails-settings'
gem 'acts_as_api'
gem 'twilio-ruby'
gem 'xml-simple', :require => 'xmlsimple'
gem 'braintree', '>= 2.15.0'
gem 'carmen'
gem 'state_machine', :git => 'git://github.com/pluginaweek/state_machine.git'
rest is hidden due to privacy
Help?
Looks like you have an error in config/initializers/devise.rb (line 66). Without seeing that code it seems as though you are calling a method on Devise called confirm_within that was renamed to allow_unconfirmed_access_for in Devise 2.0.
https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0

Heroku deprecation warnings when trying to migrate the database

I have a Rails 3.2 app that I've created and want to deploy it on Heroku.
I created a new session on the cedar stack and pushed up my app to it.
However, when I try to migrate the DB I get deprecation warnings.
I ran the migrate commend with the --trace command and here's what it gave me:
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant SimpleForm
/app/config/initializers/simple_form.rb:2:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/engine.rb:587:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/engine.rb:587:in `block in <class:Engine>'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/application.rb:136:in `initialize!'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/application.rb:103:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/application.rb:103:in `require_environment!'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/application.rb:292:in `block (2 levels) in initialize_tasks'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/bin/rake:19:in `load'
/app/vendor/bundle/ruby/1.9.1/bin/rake:19:in `<main>'
Tasks: TOP => db:migrate => environment
My app works fine locally.
Here's my gem file:
source 'https://rubygems.org'
gem 'rails', '3.2.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :production do
gem 'thin'
gem 'pg'
end
group :development, :test do
gem 'sqlite3'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', '~> 0.9.2'
gem 'bootstrap-sass'
gem 'uglifier', '>= 1.0.3'
gem 'twitter-bootstrap-rails', '2.0.2'
gem 'simple_form'
gem 'fog'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
move the simple_form gem outside your :assets group - mine is under the jquery-rails gem reference then make sure you run this command locally in your console before pushing to heroku:
RAILS_ENV=production bundle exec rake assets:precompile
hope that helps!

Resources