-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird crash with Faker 1.8.3 #982
Comments
Still present in 1.8.4 |
EDIT: macOs v10.12.5 and ruby 2.3.3. And reverting to 1.7.3 didn't fix it for me. |
I dug some more, correct me if this is a separate issue from Viamin's, but this old issue rails/rails#3488 suggests adding psych directly into the Gemfile. I did this and faker works at whatever version again. @viamin does this fix the issue for you or am I experiencing something different? |
I already had psych in my Gemfile (because of rails/rails#3488) when I hit this issue. |
@viamin's issue may well be caused by a Ruby bug which shows up as faker > 1.8.0 uses That Ruby issue is fixed in ruby/ruby@a14cb8a so you could try compiling a Ruby from trunk to see if it solves the issue. I believe the Ruby fix is scheduled to be backported for the next 2.2, 2.3 and 2.4 releases |
Thanks for the info, @owst! |
I can confirm this too :) |
I can also reproduce this issue, but we're using Ruby For now, I'm adding this to my spec helper as a workaround while the ruby bug fix is not published: Faker::Config.random = Random.new |
This bug should be closed now as 3 new Ruby versions had been released, see https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-4-2-released/. https://bugs.ruby-lang.org/issues/13753 is closed too Ruby 2.4.2 and 2.3.5 does'nt segfault any more. I personnaly did'nt try 2.2.8. |
Thanks, @yld! |
FWIW, beware the "innocuous" point update from 2.4.1 to 2.4.2 There is a breaking change in syntax... |
On OS X 10.12.5 with ruby 2.4.1 I'm seeing this crash when rendering a rails email preview:
It's called in my code like this:
FactoryGirl.attributes_for(:incoming, from: "#{Faker::Name.name} <#{Faker::Internet.email}>")
But calling
Faker::Name.name
in the rails console does not reproduce this.Rolling back to faker 1.7.3 clears up the crash.
The text was updated successfully, but these errors were encountered: