2
我使用rvm ruby 2.1.0運行最新的OSX。 bundle update
後到Rails 4.1.0和3.4.1 authlogic,當我啓動服務器我得到這個錯誤:Rails 4.1.0和authlogic bcrypt問題
authlogic/crypto_providers/bcrypt.rb:1:in `require': cannot load such file -- bcrypt (LoadError)
authlogic-3.4.1/lib/authlogic/crypto_providers/bcrypt.rb:1:in `<top (required)>'
authlogic-3.4.1/lib/authlogic.rb:60:in `require'
authlogic-3.4.1/lib/authlogic.rb:60:in `block in <top (required)>'
authlogic-3.4.1/lib/authlogic.rb:59:in `each'
authlogic-3.4.1/lib/authlogic.rb:59:in `<top (required)>'
bundler-1.5.2/lib/bundler/runtime.rb:76:in `require'
bundler-1.5.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
bundler-1.5.2/lib/bundler/runtime.rb:72:in `each'
bundler-1.5.2/lib/bundler/runtime.rb:72:in `block in require'
bundler-1.5.2/lib/bundler/runtime.rb:61:in `each'
bundler-1.5.2/lib/bundler/runtime.rb:61:in `require'
bundler-1.5.2/lib/bundler.rb:131:in `require'
application.rb:7:in `<top (required)>'
railties-4.1.0/lib/rails/commands/commands_tasks.rb:79:in `require'
railties-4.1.0/lib/rails/commands/commands_tasks.rb:79:in `block in server'
railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
感謝,1。沒有工作(還是一樣的錯誤),2.沒有 – antpaw
你能告訴我什麼是'Authlogic :: CryptoProviders :: SHA512 '在User.rb中做?如果我不添加它會發生什麼? – antpaw
你應該嘗試刪除它。 Authlogic默認使用SCrypt,但沒有將其作爲依賴項。因此你必須在你的gemfile中包含scrypt。如果您不想切換到sCrypt,請使用'c.crypto_provider = Authlogic :: CryptoProviders :: Sha512'行。閱讀這裏[這裏](https://github.com/binarylogic/authlogic/issues/400#issuecomment-36611907)獲取更多信息 –