没有要加载的文件——bcrypt_ext(通过设计) [英] no such file to load -- bcrypt_ext (via devise)

查看:13
本文介绍了没有要加载的文件——bcrypt_ext(通过设计)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 rails 3 上的设计(当前 gem)中使用数据库身份验证,尝试使用用户名/密码登录时出现以下错误.

I'm using database authentication in devise(current gem) on rails 3 and I get the following error when trying to log in with username/password.

no such file to load -- bcrypt_ext 

This error occurred while loading the following files:
   bcrypt
   bcrypt_ext

我之前已经成功安装 bcrypt-ruby-2.1.2" gem.

I have previously "Successfully installed bcrypt-ruby-2.1.2" gem.

有什么想法吗?我也尝试给 bundler git repo 地址并获取 master,但它没有解决问题.

Any ideas? I also tried giving bundler the git repo address and fetching the master, but it doesn't solve the issue.

推荐答案

我也遇到了这个问题.当我安装 gem 时,输出告诉我

I had this problem as well. When I installed the gem, the output told me

Building native extensions.  This could take a while...
Successfully installed bcrypt-ruby-3.0.1

所以我假设它实际上已经构建了本机扩展.但是当我在 .../gems/bcrypt-ruby-2.1.4/ext/mri 中打猎时,我发现它似乎没有构建任何东西.

so I assumed that it had, in fact, built native extensions. But when I went hunting in .../gems/bcrypt-ruby-2.1.4/ext/mri I saw that it not appear to have built anything.

我手动进去跑了

cd [path to your gems folder]/gems/bcrypt-ruby-2.1.4/ext/mri
ruby extconf.rb
make
sudo make install

这对我有用.

这篇关于没有要加载的文件——bcrypt_ext(通过设计)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆