Note that there are some explanatory texts on larger screens.

plurals
  1. POuninitialized constant FactoryGirl (NameError)
    primarykey
    data
    text
    <p>when i change in env.rb file under feature/support</p> <pre><code>require 'cucumber/rails' require "#{Rails.root}/spec/factories" </code></pre> <p>and in gemfile source '<a href="https://rubygems.org" rel="nofollow">https://rubygems.org</a>'</p> <pre><code>gem 'rails', '3.2.13' # Bundle edge Rails instead: # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git' gem 'sqlite3' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~&gt; 3.2.3' gem 'coffee-rails', '~&gt; 3.2.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms =&gt; :ruby gem 'uglifier', '&gt;= 1.0.3' end group :test do gem 'cucumber-rails' gem 'capybara' gem 'database_cleaner' gem 'factory_girl_rails', :require =&gt; false end group :development, :test do gem 'rspec-rails' end gem 'jquery-rails' # To use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~&gt; 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 'debugger' </code></pre> <p>in spec/spec_helper.rb</p> <pre><code># This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' require 'factory_girl_rails' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} </code></pre> <p>in spec/factories.rb</p> <pre><code>FactoryGirl.define do factory :user do first_name "John" last_name "Doe" admin false end end uninitialized constant FactoryGirl (NameError) /home/manish/change/test_cucumber/spec/factories.rb:1:in `&lt;top (required)&gt;' /home/manish/change/test_cucumber/features/support/env.rb:8:in `&lt;top (required)&gt;' /home/manish/.rvm/gems/ruby-1.9.3-p392/gems/cucumber-1.3.5/lib/cucumber/rb_support/rb_language.rb:122:in `load' /home/manish/.rvm/gems/ruby-1.9.3-p392/gems/cucumber-1.3.5/lib/cucumber/rb_support/rb_language.rb:122:in `load_code_file' /home/manish/.rvm/gems/ruby-1.9.3-p392/gems/cucumber-1.3.5/lib/cucumber/runtime/support_code.rb:180:in `load_file' /home/manish/.rvm/gems/ruby-1.9.3-p392/gems/cucumber-1.3.5/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!' /home/manish/.rvm/gems/ruby-1.9.3-p392/gems/cucumber-1.3.5/lib/cucumber/runtime/support_code.rb:82:in `each' </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload