gpt4 book ai didi

ruby-on-rails - 由于 ruby​​ 2.0 和 rails 3.2 的 Authlogic,Rails 服务器和控制台无法启动

转载 作者:太空宇宙 更新时间:2023-11-03 17:23:24 27 4
gpt4 key购买 nike

我有 ruby​​ 版本 2.0.0p451 和 rails 版本 3.2.13。我运行了 bundle install 并安装了所有的 gem。当我尝试 rails s 命令时,出现以下错误:

问题似乎与 authlogic 有关。我卸载了它,服务器启动正常。有什么想法吗?

   /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- scrypt (LoadError)
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/lib/ruby/gems/2.0.0/bundler/gems/authlogic-f19ff3a9eb88/lib/authlogic/crypto_providers/scrypt.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/lib/ruby/gems/2.0.0/bundler/gems/authlogic-f19ff3a9eb88/lib/authlogic.rb:60:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/bundler/gems/authlogic-f19ff3a9eb88/lib/authlogic.rb:59:in `each'
from /usr/local/lib/ruby/gems/2.0.0/bundler/gems/authlogic-f19ff3a9eb88/lib/authlogic.rb:59:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.1/lib/bundler/runtime.rb:76:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.1/lib/bundler/runtime.rb:72:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.1/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.1/lib/bundler/runtime.rb:61:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.1/lib/bundler/runtime.rb:61:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.6.1/lib/bundler.rb:132:in `require'
from /home/superq/quizot/config/application.rb:7:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

当我尝试打开控制台时,这是我得到的:

/usr/local/lib/ruby/2.0.0/irb/completion.rb:9:in `require': cannot load such file -- readline (LoadError)
from /usr/local/lib/ruby/2.0.0/irb/completion.rb:9:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands/console.rb:3:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands/console.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:38:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:38:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

我已经卸载了 ruby​​、rails 并安装了几次。似乎没有任何效果。有什么想法吗?

我只有一个 Rails 应用程序,永远不需要在这台机器上安装另一个 Rails 应用程序。安装的所有 gem 仅用于此应用程序。它工作正常,但我的硬盘驱动器崩溃了,现在我正尝试在新硬盘驱动器上设置相同的应用程序。

最佳答案

在更新到 authlogic-3.4.1 时出现与 scrypt 和 bcrypt 相同的错误

我的解决方案是将 scrypt gem 添加到我的 gemfile 中:

gem 'authlogic', '~> 3.4.1'
gem 'bcrypt', '~> 3.1.7'
gem 'scrypt', '1.2.1'

关于ruby-on-rails - 由于 ruby​​ 2.0 和 rails 3.2 的 Authlogic,Rails 服务器和控制台无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22894172/

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