** (UndefinedFunctionError) function Bcrypt.Base.gensalt_nif/3
blackode opened this issue · comments
I am using Elixir V 1.5.1
comeonin, "~> 4.0 "
bcrypt_elixir, "~>1.0"
iex(2)> Comeonin.Bcrypt.hashpwsalt("mysecretpass")
[warn] The on_load function for module Elixir.Bcrypt.Base returned {:error,
{:bad_lib,
'NIF \'Elixir.Bcrypt.Base\':hash_nif/2 requires a runtime with dirty scheduler support.'}}
** (UndefinedFunctionError) function Bcrypt.Base.gensalt_nif/3 is undefined (module Bcrypt.Base is not available)
(bcrypt_elixir) Bcrypt.Base.gensalt_nif([75, 149, 80, 213, 166, 174, 2, 77, 251, 164, 174, 209, 246, 97, 80, 189], 12, 98)
(bcrypt_elixir) lib/bcrypt.ex:45: Bcrypt.gen_salt/2
(bcrypt_elixir) lib/bcrypt.ex:78: Bcrypt.hash_pwd_salt/2
iex(2)>
For bcrypt_elixir version 1.0, you need to be using Erlang 20.
Downgrade to bcrypt_elixir version 0.12, and there should be no problem.
Let me know if that works.
@riverrun Thanks for quick response. I am out now. I will let you know after either downgrading bcrypt_elixir
or upgrading the erlang
and testing.
Glad to hear you got it working. I'm just working on improving the error message now.