bcrypt错误:Devy ruby​​ 2.0和rails 4.0 [英] bcrypt error: Devise ruby 2.0 and rails 4.0

查看:194
本文介绍了bcrypt错误:Devy ruby​​ 2.0和rails 4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行我的应用程序时,我不断收到此错误:



C:/ruby-2.0.0-p195-i386-mingw32/lib/ruby/ gems / 2.0.0 / gems / activesupport-4.0.0.rc1
/lib/active_support/dependencies.rb:228:in`require':无法加载这样的文件 - 2
.0 / bcrypt_ext (LoadError)



任何人? - 我尝试使用devise gem进行基本用户身份验证。

解决方案

当我更新到Ruby时,我收到了这个错误Windows上为2.0.0+。我可以通过卸载下载的所有版本的bcrypt 并使用DevKit构建宝石来解决这个问题。

  gem uninstall bcrypt-ruby 

gem install bcrypt-ruby --platform = ruby​​ --no-ri --no-rdoc
pre>

通常做一个软件包更新将下载一个预编译的gem mingw32 extension,在这种情况下看起来不起作用。重新安装bcrypt-ruby的这个解决方法有望在将来不再需要。



此外,我在这里保持Ruby on Rails的更新Windows安装说明(主要是为了我自己的参考)用于在Windows上安装Ruby on Rails。



https:// github。 com / remomueller / documentation / tree / master / windows



您可能遇到的其他一些Windows陷阱也列在那里:



https://github.com /remomueller/documentation/blob/master/windows/190-miscellaneous.md


I keep getting this error when i try to run my app:

C:/ruby-2.0.0-p195-i386-mingw32/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0.rc1 /lib/active_support/dependencies.rb:228:in `require': cannot load such file -- 2 .0/bcrypt_ext (LoadError)

Any takers? - im trying to use the devise gem for basic user authentication..

解决方案

I've gotten this error when I updated to Ruby 2.0.0+ on Windows. I was able to solve it by uninstalling all versions of bcrypt that were downloaded, and building the gem using DevKit.

gem uninstall bcrypt-ruby

gem install bcrypt-ruby --platform=ruby --no-ri --no-rdoc

Usually doing a bundle update will download a precompiled gem mingw32 extension, which in this case appears not to work. This workaround for reinstalling bcrypt-ruby will hopefully not be needed in the future.

Additionally, I keep updated Windows installation instructions for Ruby on Rails here (mostly for my own reference) for installing Ruby on Rails on Windows.

https://github.com/remomueller/documentation/tree/master/windows

Some other Windows pitfalls you may run into are also listed there:

https://github.com/remomueller/documentation/blob/master/windows/190-miscellaneous.md

这篇关于bcrypt错误:Devy ruby​​ 2.0和rails 4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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