gpt4 book ai didi

ruby-on-rails - ruby on rails,由于 bcrypt_ext (LoadError),运行服务器不工作

转载 作者:可可西里 更新时间:2023-11-01 11:50:14 26 4
gpt4 key购买 nike

我从 https://github.com/mhartl/rails_tutorial_3rd_edition_gemfiles/blob/master/sample_app/Gemfile 得到了 gem

然后我收到类似

的错误消息
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bcrypt-3.1.7-x86-mingw32/li
b/bcrypt.rb:16:in `require': cannot load such file -- bcrypt_ext (LoadError)
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bcrypt-3.1.7-x
86-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bcrypt-3.1.7-x
86-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:76:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:72:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:72:in `block in require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:61:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:61:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/
lib/bundler.rb:133:in `require'
from C:/Projects/Mailbox/mailboxer-app/config/application.rb:14:in `<top
(required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.4
/lib/rails/commands/commands_tasks.rb:79:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.4
/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.4
/lib/rails/commands/commands_tasks.rb:76:in `tap'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.4
/lib/rails/commands/commands_tasks.rb:76:in `server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.4
/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.4
/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

最佳答案

此问题是 Windows 特有的,已在 bcrypt-ruby issue: 72 中解决.

将你的 Gemfile 更新为:

gem 'bcrypt-ruby', '3.1.1.rc1', :require => 'bcrypt'

然后

bundle install

关于ruby-on-rails - ruby on rails,由于 bcrypt_ext (LoadError),运行服务器不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31531349/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com