没有这样的文件加载 - bcrypt_ext(via devise) [英] no such file to load -- bcrypt_ext (via devise)

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

问题描述

我在rails 3上的devise(当前gem)中使用数据库身份验证,当尝试使用username / password登录时,我会收到以下错误。

 不要加载这样的文件 -  bcrypt_ext 

加载以下文件时发生此错误:
bcrypt
bcrypt_ext

我以前已经成功安装了bcrypt-ruby-2.1.2gem。



任何想法?我也试图给bundler的git repo地址和提取主,但它不能解决问题。

解决方案

我有这个问题也是。当我安装宝石,输出告诉我

 构建本机扩展。这可能需要一段时间... 
成功安装bcrypt-ruby-3.0.1

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



我手动进入并运行

  cd [路径到您的宝石文件夹] /gems/bcrypt-ruby-2.1.4/ext/ mri 
ruby​​ extconf.rb
make
sudo make install

这对我来说是个窍门。


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

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

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

解决方案

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

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.

I manually went in and ran

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

This did the trick for me.

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

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