On Sep 27, 4:11 pm, Carmen Díaz Echauri <cdecha...@gmail.com> wrote:
> 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 fromhttp://gembundler.com/rails23.html.
> Basically:
> - 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
> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependen 
> cies.rb:443:in
> `load_missing_constant'
>     from
> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependen 
> cies.rb:80:in
> `const_missing'
>     from
> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependen 
> cies.rb:92:in
> `const_missing'
>     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", ">=0.3.5.0"
> 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"
> end
>
> Any ideas? Suggestions?
> BTW Samething is happening with will_paginate
>
> Thanks a lot for your help.  You guys rock!
>
> --
> Carmen
>
> _______________________________________________
> rspec-users mailing list
> rspec-us...@rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users

Try:

gem 'factory_girl_rails'
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to