Skip to content

Instantly share code, notes, and snippets.

@AdamT
Last active June 17, 2018 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamT/ca4aad381e626e9fa53d2de65299eae8 to your computer and use it in GitHub Desktop.
Save AdamT/ca4aad381e626e9fa53d2de65299eae8 to your computer and use it in GitHub Desktop.
Can't require rails_helper from my own ModelFactory
/Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require': cannot load such file -- rails_helper (LoadError)
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require'
from /Users/me/development/apps/project/spec/factories/troublemaker_factory_spec.rb:1:in `<top (required)>' <--------- oops
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:277:in `load'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:277:in `block in load'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:277:in `load'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/factory_bot-4.10.0/lib/factory_bot/find_definitions.rb:20:in `block (2 levels) in find_definitions'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/factory_bot-4.10.0/lib/factory_bot/find_definitions.rb:19:in `each'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/factory_bot-4.10.0/lib/factory_bot/find_definitions.rb:19:in `block in find_definitions'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/factory_bot-4.10.0/lib/factory_bot/find_definitions.rb:15:in `each'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/factory_bot-4.10.0/lib/factory_bot/find_definitions.rb:15:in `find_definitions'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/factory_bot_rails-4.10.0/lib/factory_bot_rails/railtie.rb:21:in `block in <class:Railtie>'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:51:in `each'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/application/finisher.rb:75:in `block in <module:Finisher>'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/initializable.rb:32:in `instance_exec'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/initializable.rb:32:in `run'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/initializable.rb:61:in `block in run_initializers'
from /Users/me/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
from /Users/me/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/me/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/me/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/me/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:347:in `each'
from /Users/me/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:347:in `call'
from /Users/me/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/me/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
from /Users/me/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/initializable.rb:60:in `run_initializers'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/application.rb:361:in `initialize!'
from /Users/me/development/apps/project/config/environment.rb:5:in `<top (required)>'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require'
from config.ru:3:in `block in <main>'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/rack-2.0.5/lib/rack/builder.rb:55:in `instance_eval'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/rack-2.0.5/lib/rack/builder.rb:55:in `initialize'
from config.ru:in `new'
from config.ru:in `<main>'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/rack-2.0.5/lib/rack/builder.rb:49:in `eval'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/rack-2.0.5/lib/rack/builder.rb:49:in `new_from_string'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/rack-2.0.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/rack-2.0.5/lib/rack/server.rb:319:in `build_app_and_options_from_config'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/rack-2.0.5/lib/rack/server.rb:219:in `app'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:27:in `app'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/rack-2.0.5/lib/rack/server.rb:354:in `wrapped_app'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:89:in `log_to_stdout'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:51:in `start'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:147:in `block in perform'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `tap'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in `perform'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/command/base.rb:65:in `perform'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/command.rb:46:in `invoke'
from /Users/me/.rvm/gems/ruby-2.4.1@project/gems/railties-5.2.0/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment