问题标签 [bcrypt-ruby]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
843 浏览

ruby-on-rails-3 - Rails 3.2.5 巫术和延迟作业集成以发送电子邮件

我正在开发一个 Rails 3.2.5 应用程序,使用 Sorcery 进行身份验证,使用 delay_job 进行后台处理 [ sorcery (0.7.12)、delayed_job (3.0.3)、delayed_job_active_record (0.3.2) ]。

我的巫术配置如下:

宝石文件

创建帐户时,将作业添加到延迟作业表但出现错误:

这是处理程序:

[编辑] 无法执行 YAML.load 时会引发此错误。但是,奇怪的是,当我尝试在控制台中手动执行此操作时,它会加载任何问题。

0 投票
3 回答
4149 浏览

rubygems - 无法为新的 Rails 安装安装 bcrypt-ruby

我在安装新的 Rails 时遇到以下错误。我运行bundle install并安装了一堆 gem 后,尝试安装 bcrypt-ruby 时出现错误。我正在使用带有 OS X 10.8.2、最新 Ruby (v1.9.3-p194)、新 Rails (v3.2.8) 和标准 Gemfile 的全新 Mac。

安装 activerecord (3.2.8)

安装活动资源 (3.2.8)

使用本机扩展安装 bcrypt-ruby (3.0.1)

Gem::Installer::ExtensionBuildError: 错误: 无法构建 gem 原生扩展。

make 编译 bcrypt_ext.c make: /usr/bin/gcc-4.2: No such file or directory make: * [bcrypt_ext.o] Error 1

Gem 文件将继续安装在 /Users/me/.rvm/gems/ruby-1.9.3-p194@mygemset/gems/bcrypt-ruby-3.0.1 以供检查。结果记录到 /Users/me/.rvm/gems/ruby-1.9.3-p194@mygemset/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out 安装 bcrypt-ruby (3.0 .1),并且 Bundler 无法继续。gem install bcrypt-ruby -v '3.0.1' 在捆绑之前确保成功。

更新:忘了提一下,这不仅是一台带有 Mac OS X 10.8.2 的全新 Mac,而且还包括昨天安装的全新 Xcode 和命令行工具。然后我安装了 RVM 和 brew。

0 投票
2 回答
402 浏览

ruby-on-rails - Error installing bcyrpt-ruby gem bundle

I'm trying to install the Devises gem, running bundle install and then getting this error with bcrypt-ruby which I haven't had before. What can I do?

Okay, so I need to install bcrypt-ruby...

0 投票
1 回答
984 浏览

ruby-on-rails - Cygwin :: bcrypt-ruby - 错误:无法构建 gem 原生扩展

当我尝试安装 bcrypt-ruby gem 时,出现以下错误

我在 Windows 7 32 上有 Cygwin

有人知道该怎么做吗? 我什么都试过了。

0 投票
1 回答
505 浏览

ruby-on-rails-3 - 在树莓派上安装 bcrypt-ruby (rails 3.2.8 using devise)

我很高兴尝试将我的树莓派设置为登台服务器。这是一个使用设备进行身份验证的 Rails 应用程序 3.2.8。

当它捆绑安装失败时

如果我“sudo gem install bcrypt-ruby -v '3.0.1'”那么它安装得很好,但 capistrano 部署总是失败。

有任何想法吗?我宁愿不部署为 sudo,因为这不是它在生产中的工作方式。

0 投票
1 回答
1496 浏览

ruby - 无法在 windows xp 上的 cygwin 下为 bcrypt-ruby gem 构建本机扩展

我正在 Windows XP 上为 Rails 应用程序设置测试代理。

为了强制代理之间的一致性,我通过带有 Cygwin 的 RVM 的 Bundler 安装它。

以下是在项目目录中运行 bundle install 的结果(编辑:请注意,运行 gem install bcrypt-ruby 会产生相同的输出):

安装了 cygwin gcc 包:

和 bcrypt 一样:

进一步研究的结果:

环境

(在我的情况下是 1.9.3-p286)允许 bcrypt-ruby 顺利安装

通过 rvm 安装 1.9.3-p286 并设置

导致相同的(禁止 ruby​​ 版本)错误消息。

在 Mac OS X 上安装可以在众多开发人员站和多个 Mac 代理上顺利运行。

所有这些都表明该错误位于 rvm 与 cygwin 的交集处。

我已经尝试了我能想到的一切。任何帮助将不胜感激。

谢谢

0 投票
1 回答
2683 浏览

ruby-on-rails - bcrypt-ruby gem Gem::Installer::ExtensionBuildError:

再会。我正在尝试建立由其他人从事的项目。
当我运行bundle install它时崩溃并出现错误

sudo gem install bcrypt-ruby -v '3.0.1'

试过了 - 没有变化。
http://rorguide.blogspot.com/2011/02/bundle-install-on-linux-giving-error.html

0 投票
1 回答
974 浏览

ruby-on-rails - BCrypt - “没有要加载的文件 - bcrypt”(Rails)

正如标题所示!以下是相关文件/配置:

任何“需要 bcrypt”都会导致错误。我已经运行捆绑安装。

0 投票
2 回答
1130 浏览

ruby-on-rails - Rails: BCrypt::Errors::InvalidSalt: invalid salt

Loosely following Ryan Bates's How I Test Railscast to implement sending an email confirmation token to users when they sign up.

This is failing (in feature specs and when manually clicking through sign-up process) with:

I've tried reinstalling bcrypt gem (as suggested elsewhere even though it was Devise related and I'm not using Devise): gem uninstall bcrypt-ruby and then gem install bcrypt-ruby but to no avail. ideas?

0 投票
1 回答
916 浏览

authentication - User authentication Bcrypt and Sinatra - LINK - Please help explanation needed

http://www.128bitstudios.com/2011/11/21/authentication-with-sinatra/

Simple and nice Sinatra BCrypt authentication system - I would appreciate an explanation =)

I found this very nice article on a very simple authentication system made for Sinatra together using BCrypt and I think it's great and simple, with an nice continues classic code.

However, I have trouble understanding it, and yes I am a noob. I would really appreciate if some of you could explain at least some of the code to me, and the one I am especially interested in is this part

I guess there isn't anything wrong with the code considering it's written by someone who is much better than me with that kind of stuff, but it could contain errors, but most likely not. Since I am quite new to both Sinatra and the use of BCrypt I would appreciate if someone could explain the procedure and the way it encrypts the password.

All the rest of the code is there when you visit the link, no point pasting it all here.

Also I think if I have understood correctly that the BCryptEngine creates a salt from the user param :password, but I can't understand how it saves the user to the table and all etceteral stuff. Thanks :)