Hi Megan,
  You do indeed need an older version of Faker.  1.3.0 should work nicely.  To 
get that version you want to change your gem file to say:

Old:

gem ‘faker’

New:

gem ‘faker’, ‘1.3.0’ #locked do to rails 3.2 incompatibility of version 1.4+ 


  The problem is that “enforce_available_locales=' is a newer setting.  It 
would be a great pull request for you to fix that with defined? so that it just 
skips that line and is then compatible with Rails 3.2.x again.  I leave that to 
you if you want to do it, but would be happy to help.
Best,
Rob

On July 15, 2014 at 13:11:13 , Megan Byrne ([email protected]) wrote:

Hello all,

So let me first state for the record that I am very new to Rails Development 
and programming in general, so the answer to this may be fairly obvious.  I am 
currently working on some legacy code as a contractor and am running into quite 
a few problems with versions of gems, since prior to now I have only used Rails 
4 and Ruby 2.

Here's the problem:

I'm trying to write a rake task that would be ideal to incorporate the Faker 
gem with.  I've just specified " gem 'faker' " in the gem file and ran Bundle 
install.  Also, started writing the rake task which includes "require 'faker' 
".  But now that I try to run the rials server, I get an error message in 
terminal that starts out like this:

/Users/megaputer/.rvm/gems/ruby-1.9.3-p545/gems/faker-1.4.1/lib/faker.rb:10:in 
`<top (required)>': undefined method `enforce_available_locales=' for 
I18n:Module (NoMethodError)

I'm really not sure how to proceed, I suspect that I need to specify a specific 
version of Faker to work with Rails 3.2.13 and Ruby 1.9.3p545, but I haven't 
been able to find much on my own searching online.

Please Help!

Thanks in advance,

Megan

 


--
--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
---
You received this message because you are subscribed to the Google Groups "SD 
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

-- 
-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
--- 
You received this message because you are subscribed to the Google Groups "SD 
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to