[rspec-users] having some issues with factory_girl and bundler...

Carmen Díaz Echauri cdechauri at gmail.com
Mon Sep 27 16:11:03 EDT 2010

Hi All

Need some brilliants minds here :)

I'm using Rails 2.3.8 & ruby 1.8 (I know, I know... )
I've move my gems from .gems to Bundler, but I'm having some issues with
Factory_girl when I rake spec
"uninitialized constant Factory"

I'm following the instructions from http://gembundler.com/rails23.html.
- grab all config.gem and place them into Gemfile
- bundle install
- check  Gemfile.lock in my repository .. etc

 I even tried with a new dummy app from scratch and got the samething...
/script/console test
Loading test environment (Rails 2.3.8)

>> Factory
NameError: uninitialized constant Factory
    from (irb):1
>> require 'factory_girl'
=> true

My Gemfile looks like this

source :gemcutter
gem "rails", "2.3.8"
gem "memcached-northscale"
gem "uuidtools",  ">= 1.0.2"
gem "json",  ">= 1.2.4"
gem "nokogiri",  ">= 1.4.0"
gem "tzinfo",  ">=0.3.5"
gem "SystemTimer", ">=1.1.3"
gem "will_paginate", ">= 2.3.11"
gem "taf2-curb", ">="
gem "pg"
gem "hoptoad_notifier"
gem "treetop"
gem "term-ansicolor"
gem "diff-lcs"

group :development, :test do
  gem "factory_girl", :require => 'factory  Note: last tried... Placing it
outside of the groups, throw the same error...
  gem "rspec"
  gem "rspec-rails", ">= 1.3.2"
  gem "webrat", ">=0.5.3"
  gem "ruby-debug"

Any ideas? Suggestions?
BTW Samething is happening with will_paginate

Thanks a lot for your help.  You guys rock!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100927/1a991fe5/attachment.html>

More information about the rspec-users mailing list