Undefined method `unloadable' when upgrade to rails 7 - ruby-on-rails

I have a controller SocketController inherit WebsocketRails::BaseController
class SocketController < WebsocketRails::BaseController
before_action :authenticate_user!
end
After upgrade rails version to 7.0.4
When I run rails s got this error
How to fix it, please!!
Failure/Error:
class SocketController < WebsocketRails::BaseController
before_action :authenticate_user!
NoMethodError:
undefined method `unloadable' for WebsocketRails::BaseController:Class
unloadable controller
^^^^^^^^^^
# ./vendor/bundle/ruby/3.1.0/gems/websocket-rails-0.7.0/lib/websocket_rails/base_controller.rb:45:in `inherited'
# ./app/controllers/socket_controller.rb:1:in `<top (required)>'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:30:in `require'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:30:in `require'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/helpers.rb:135:in `const_get'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/helpers.rb:135:in `cget'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/eager_load.rb:169:in `block in actual_eager_load_dir'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/helpers.rb:40:in `block in ls'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/helpers.rb:25:in `each'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/helpers.rb:25:in `ls'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/eager_load.rb:164:in `actual_eager_load_dir'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/eager_load.rb:17:in `block (2 levels) in eager_load'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/eager_load.rb:16:in `each'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/eager_load.rb:16:in `block in eager_load'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/eager_load.rb:10:in `synchronize'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader/eager_load.rb:10:in `eager_load'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader.rb:296:in `block in eager_load_all'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader.rb:294:in `each'
# ./vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/loader.rb:294:in `eager_load_all'
# ./vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/application/finisher.rb:74:in `block in <module:Finisher>'
# ./vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/initializable.rb:32:in `instance_exec'
# ./vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/initializable.rb:32:in `run'
# ./vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/initializable.rb:61:in `block in run_initializers'
# ./vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/initializable.rb:60:in `run_initializers'
# ./vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/application.rb:372:in `initialize!'
# ./config/environment.rb:5:in `<top (required)>'
I think:
Could it be that 1 gem version or 1 configuration is not suitable, causing it to fail?

I am not sure what is that for, your controller is reloadable because it is in app/controllers, like any other Ruby file in those directories.
That gem has not had activity for years. I'd suggest that you reopen WebsocketRails::BaseController in an initializer, define a dummy unloadable class method in it that does nothing, and see if your controllers reload as expected.

Related

Factorybot doesn't recognize any attributes—"method missing" errors

I recently upgraded a bunch of gems, and since then I can't run rails server, console, or rspec.
Here's the error log I see:
NoMethodError:
undefined method 'name' in 'book' factory
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/definition_proxy.rb:97:in `method_missing'
# ./spec/factories/books.rb:3:in `block (2 levels) in <top (required)>'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/syntax/default.rb:18:in `instance_eval'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/syntax/default.rb:18:in `factory'
# ./spec/factories/books.rb:2:in `block in <top (required)>'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/syntax/default.rb:49:in `instance_eval'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/syntax/default.rb:49:in `run'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/syntax/default.rb:7:in `define'
# ./spec/factories/books.rb:1:in `<top (required)>'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:20:in `block (2 levels) in find_definitions'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:19:in `each'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:19:in `block in find_definitions'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:15:in `each'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/find_definitions.rb:15:in `find_definitions'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot-5.0.2/lib/factory_bot/reload.rb:6:in `reload'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot_rails-5.0.2/lib/factory_bot_rails/reloader.rb:25:in `block in build_reloader'
# /Users/regan/.rvm/gems/ruby-2.6.3/gems/factory_bot_rails-5.0.2/lib/factory_bot_rails/reloader.rb:35:in `block in register_reloader'
# ./config/environment.rb:5:in `<top (required)>'
# ./spec/rails_helper.rb:3:in `require'
# ./spec/rails_helper.rb:3:in `<top (required)>'
# ./spec/controllers/api/v1/songs_controller_spec.rb:1:in `require'
# ./spec/controllers/api/v1/songs_controller_spec.rb:1:in `<top (required)>'
Part of the upgrade included upgrading rails to 5.2.3, which forced me to remove this line from new_framework_defaults.rb file:
# Do not halt callback chains when a callback returns false. Previous versions had true.
ActiveSupport.halt_callback_chains_on_return_false = false
I'm guessing this has something to do with it?
Edit: The factory code is below. This exact code was working 100% before upgrading the gems:
FactoryBot.define do
factory :book do
name "my songbook"
end
end
FactoryBot changed its syntax. It now expects a block when assigning values – even static values – to variables. Change your code to this:
FactoryBot.define do
factory :book do
name { "my songbook" }
end
end
See Defining Factories in their docs.

Should a Rails app load its .env file when its tests run?

Should my app be calling Dotenv.load when its running its test suite?
Without calling Dotenv.load while running my test suite, rspec fails with an error about missing an environment key. I have pasted the error and its stack trace below.
$ rspec
An error occurred while loading ./spec/requests/users/create_spec.rb.
Failure/Error: require File.expand_path('../../config/environment', __FILE__)
KeyError:
key not found: "REDIS_URL"
# (erb):11:in `fetch'
# (erb):11:in `<main>'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/application.rb:233:in `config_for'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actioncable-5.1.4/lib/action_cable/engine.rb:31:in `block (2 levels) in <class:Engine>'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:69:in `instance_eval'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `each'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actioncable-5.1.4/lib/action_cable/server/base.rb:85:in `<module:Server>'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actioncable-5.1.4/lib/action_cable/server/base.rb:4:in `<module:ActionCable>'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actioncable-5.1.4/lib/action_cable/server/base.rb:3:in `<top (required)>'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actioncable-5.1.4/lib/action_cable.rb:44:in `server'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actioncable-5.1.4/lib/action_cable/engine.rb:46:in `block (3 levels) in <class:Engine>'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:426:in `instance_exec'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:426:in `eval_block'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:443:in `block in clear!'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:443:in `each'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:443:in `clear!'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:50:in `block in clear!'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:48:in `each'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:48:in `clear!'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:17:in `reload!'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:41:in `block in updater'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/activesupport-5.1.4/lib/active_support/file_update_checker.rb:81:in `execute'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:42:in `updater'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:31:in `execute_if_updated'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/application/finisher.rb:128:in `block in <module:Finisher>'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `instance_exec'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `run'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/initializable.rb:59:in `block in run_initializers'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/initializable.rb:58:in `run_initializers'
# /Users/robskrob/.rvm/gems/ruby-2.4.1/gems/railties-5.1.4/lib/rails/application.rb:353:in `initialize!'
# ./config/environment.rb:5:in `<top (required)>'
# ./spec/rails_helper.rb:4:in `require'
# ./spec/rails_helper.rb:4:in `<top (required)>'
# ./spec/requests/users/create_spec.rb:1:in `require'
# ./spec/requests/users/create_spec.rb:1:in `<top (required)>'
Outside of a Rails app you want to do the following:
require 'dotenv/tasks'
task start: [:dotenv] do
# this Rake tasks depends on the dotenv loading task
puts 'hi'
end
Inside a Rails app:
Since you're actually in a Rails app, I would make sure you're using dotenv-rails in your Gemfile, instead of just dotenv. The former will auto run the dotenv stuff as part of the Rails startup routine

Intermittent build failures of Ruby app with MongoDB 3.4 on Travis CI

We have been using the default MongoDB version in our Travis builds, which is 3.2. After upgrading to MongoDB 3.4 (3.4.10) we have started seeing intermittent build failures:
An error occurred while loading ./spec/controllers/users_controller_spec.rb.
Failure/Error: require File.expand_path("../../config/environment", __FILE__)
Mongo::Error::OperationFailure:
Didn't find RecordId in WiredTigerRecordStore (28556)
# ./vendor/bundle/ruby/2.3.0/gems/mongo-2.4.3/lib/mongo/operation/result.rb:256:in `validate!'
# ./vendor/bundle/ruby/2.3.0/gems/mongo-2.4.3/lib/mongo/operation/write/write_command_enabled.rb:57:in `execute_write_command'
# ./vendor/bundle/ruby/2.3.0/gems/mongo-2.4.3/lib/mongo/operation/write/write_command_enabled.rb:41:in `execute'
# ./vendor/bundle/ruby/2.3.0/gems/mongo-2.4.3/lib/mongo/index/view.rb:159:in `create_many'
# ./vendor/bundle/ruby/2.3.0/gems/mongo-2.4.3/lib/mongo/index/view.rb:130:in `create_one'
# ./vendor/bundle/ruby/2.3.0/gems/mongoid-6.2.1/lib/mongoid/indexable.rb:38:in `block in create_indexes'
# ./vendor/bundle/ruby/2.3.0/gems/mongoid-6.2.1/lib/mongoid/indexable.rb:31:in `each'
# ./vendor/bundle/ruby/2.3.0/gems/mongoid-6.2.1/lib/mongoid/indexable.rb:31:in `create_indexes'
# ./config/application.rb:60:in `block (2 levels) in <class:Application>'
# ./config/application.rb:60:in `each'
# ./config/application.rb:60:in `block in <class:Application>'
# ./vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:67:in `block in execute_hook'
# ./vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
# ./vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
# ./vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
# ./vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `each'
# ./vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
# ./vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/finisher.rb:73:in `block in <module:Finisher>'
# ./vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `instance_exec'
# ./vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `run'
# ./vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:59:in `block in run_initializers'
# ./vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:58:in `run_initializers'
# ./vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:353:in `initialize!'
# ./config/environment.rb:5:in `<top (required)>'
# ./spec/rails_helper.rb:13:in `require'
# ./spec/rails_helper.rb:13:in `<top (required)>'
# ./spec/controllers/users_controller_spec.rb:1:in `require'
# ./spec/controllers/users_controller_spec.rb:1:in `<top (required)>'
In our application.rb (line number 60) we make sure that we create all the relevant MongoDB indexes:
User.create_indexes
Versions
MongoDB: 3.4.10
Ruby: 2.3.5 (MRI)
Rails: 5.1.4
Mongoid: 6.2.1 (mongo 2.3.4)
Travis build environment: Trusty (sudo-less)
Any ideas as to what might be causing this?

WickedPdf and Rails 5.1.4: can't instantiate

I want to generate a PDF in a ruby service used by a Rails 5.1.4 app. It fails kind of quickly.
class PdfRenderer
require 'wicked_pdf'
def self.generate
WickedPdf.new.pdf_from_string('<h1>Hello There!</h1>')
end
end
When I call PdfRenderer.generate in my rspec tests, I get that error:
NoMethodError Exception: undefined method `pdf_from_string' for nil:NilClass
I can't instantiate the WickedPdf class. When I call WickedPdf.new in byebug, I get nil.
The stacktrace:
NoMethodError:
undefined method `pdf_from_string' for nil:NilClass
# ./app/services/pdf_renderer.rb:25:in `generate'
# ./spec/services/pdf_renderer_spec.rb:40:in `block (2 levels) in <top (required)>'
# /usr/local/bundle/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call'
# /usr/local/bundle/gems/spring-2.0.2/lib/spring/command_wrapper.rb:38:in `call'
# /usr/local/bundle/gems/spring-2.0.2/lib/spring/application.rb:201:in `block in serve'
# /usr/local/bundle/gems/spring-2.0.2/lib/spring/application.rb:171:in `fork'
# /usr/local/bundle/gems/spring-2.0.2/lib/spring/application.rb:171:in `serve'
# /usr/local/bundle/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
# /usr/local/bundle/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
# /usr/local/bundle/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
# /usr/local/bundle/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
# -e:1:in `<main>'

undefined method `deliveries' for ActionMailer::Base:Class

I started randomly getting the following stack trace in my project on this repo when running tests. My buddy forked and cloned and he doesn't get the error. I also have other projects that call the deliveries method and they have no problems. I have tried deleting the file and re cloning and it still doesn't work. I honestly have no idea where to start. Any help would be greatly appreciated.
Failure/Error: Unable to find matching line from backtrace
NoMethodError:
undefined method `deliveries' for ActionMailer::Base:Class
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/actionmailer-4.1.1/lib/action_mailer/base.rb:553:in `method_missing'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/actionmailer-4.1.1/lib/action_mailer/test_case.rb:59:in `initialize_test_deliveries'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-rails-3.0.1/lib/rspec/rails/adapters.rb:109:in `block (2 levels) in setup'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:294:in `instance_exec'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:294:in `instance_exec'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/hooks.rb:349:in `run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/hooks.rb:410:in `block in run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/hooks.rb:410:in `each'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/hooks.rb:410:in `run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/hooks.rb:485:in `run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:340:in `run_before_example'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:147:in `block in run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:210:in `call'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:210:in `block (2 levels) in <class:Procsy>'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-rails-3.0.1/lib/rspec/rails/adapters.rb:68:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:294:in `instance_exec'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:294:in `instance_exec'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/hooks.rb:430:in `block (2 levels) in run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:210:in `call'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:210:in `block (2 levels) in <class:Procsy>'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/hooks.rb:432:in `run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/hooks.rb:485:in `run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:303:in `with_around_example_hooks'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example.rb:145:in `run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example_group.rb:494:in `block in run_examples'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example_group.rb:490:in `map'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example_group.rb:490:in `run_examples'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example_group.rb:457:in `run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example_group.rb:458:in `block in run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example_group.rb:458:in `map'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/example_group.rb:458:in `run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:112:in `block (2 levels) in run_specs'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:112:in `map'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:112:in `block in run_specs'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/reporter.rb:54:in `report'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:108:in `run_specs'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:86:in `run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:70:in `run'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:38:in `invoke'
# /Users/Evan/.rvm/gems/ruby-2.1.1/gems/rspec-core-3.0.2/exe/rspec:4:in `<top (required)>'
# /Users/Evan/.rvm/gems/ruby-2.1.1/bin/rspec:23:in `load'
# /Users/Evan/.rvm/gems/ruby-2.1.1/bin/rspec:23:in `<main>'
# /Users/Evan/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
# /Users/Evan/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
Apparently the problem was my gemset. I am not sure how it happened because it was seemingly in the middle of writing code in a test but I installed a new gemset and all is good. Thanks for anyone who took the time to read this and or edit my post.

Resources