I am using rails console in the development environment and I want to use factories. How can I get access to them?
I have tried require \"FactoryGirl\"
require \"FactoryGirl\"
To solve this problem ensure that the factory bot gem is specifed in your Gemfile similar to this
group :development, :test do gem 'factory_bot_rails' end
Then bundle install.
bundle install
This should make FactoryBot class available in the development console.
Hope this helps.