Intermittent InvalidSalt exception

8 views
Skip to first unread message

Khash Sajadi

unread,
Feb 9, 2012, 3:17:52 PM2/9/12
to plataforma...@googlegroups.com
Since upgrading to Ruby 1.9.2 (Rails 3.0.3), our RSpce (2.7.0) tests using FactoryGirl (2.3.2) fail due to BCrypt::Errors::InvalidSalt upon creating of user fixture. Here is what we use for creating fixtures:

Factory.define :user, :class => User do |u|
  u.email 'a...@other.com'
  u.api_key '123456'
  u.password 'password'
end

It used to work fine, but now tests that have the line user = Factory.create(:user) fail randomly with different tests failing in each run.

Any ideas?


Khash Sajadi

unread,
Feb 28, 2012, 8:16:10 AM2/28/12
to plataforma...@googlegroups.com
This was only happening on my Mac box, not the Linux production servers. It seems to be fixed by uninstalling bcrypt-ruby gem (it was 3.0.1) and installing it again (same version). I am still not sure why but the issue is fixed.
Reply all
Reply to author
Forward
0 new messages