从应用程序中删除 Devise 时出现问题
我最初使用 Devise 来处理应用程序上的身份验证,但当我切换到无密码、完全 OpenID/OAuth 身份验证系统时,我决定删除 Devise。
我首先“销毁”模型、视图,从 Gemfile 中删除 gem,删除初始化程序文件 (config/initializers/devise.rb) 和我找到的语言环境文件 (config/locales/devise.en.yml)
我已经查看了堆栈和源代码(全部用 GREP 编辑),但找不到任何设计参考。
问题是现在我的应用程序不断向我返回此错误:
No such file or directory - /home/develop/0523a/fivetalk/config/locales/devise.en.yml
有人知道问题出在哪里吗?
这是堆栈
activesupport (3.0.3) lib/active_support/file_update_checker.rb:25:in `stat'
activesupport (3.0.3) lib/active_support/file_update_checker.rb:25:in `updated_at'
activesupport (3.0.3) lib/active_support/file_update_checker.rb:25:in `map'
activesupport (3.0.3) lib/active_support/file_update_checker.rb:25:in `updated_at'
activesupport (3.0.3) lib/active_support/file_update_checker.rb:29:in `execute_if_updated'
activesupport (3.0.3) lib/active_support/i18n_railtie.rb:23:in `_callback_before_5'
activesupport (3.0.3) lib/active_support/callbacks.rb:414:in `_run_prepare_callbacks'
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:45:in `call'
activesupport (3.0.3) lib/active_support/callbacks.rb:415:in `_run_call_callbacks'
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.1) lib/rack/sendfile.rb:107:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/show_exceptions.rb:46:in `call'
railties (3.0.3) lib/rails/rack/logger.rb:13:in `call'
rack (1.2.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `synchronize'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:in `call'
railties (3.0.3) lib/rails/application.rb:168:in `call'
railties (3.0.3) lib/rails/application.rb:77:in `send'
railties (3.0.3) lib/rails/application.rb:77:in `method_missing'
rack (1.2.1) lib/rack/content_length.rb:13:in `call'
rack (1.2.1) lib/rack/handler/webrick.rb:52:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.2.1) lib/rack/handler/webrick.rb:13:in `run'
rack (1.2.1) lib/rack/server.rb:213:in `start'
railties (3.0.3) lib/rails/commands/server.rb:65:in `start'
railties (3.0.3) lib/rails/commands.rb:30
railties (3.0.3) lib/rails/commands.rb:27:in `tap'
railties (3.0.3) lib/rails/commands.rb:27
script/rails:6:in `require'
script/rails:6
I was initially using Devise to handle authentication on my application but as I'm switching to a password-less, completely OpenID/OAuth authentication system, I decided to remove Devise.
I started by "destroy"ing the models,views, removed the gem from the Gemfile, removed the initializer file (config/initializers/devise.rb) and a locale file I found (config/locales/devise.en.yml)
I've look through the stack and the source code (GREP'ed it all) and couldn't find any reference to devise.
The problem is that now my application keeps returning me this error:
No such file or directory - /home/develop/0523a/fivetalk/config/locales/devise.en.yml
Does anyone have an idea of where the problem is?
Here's the stack
activesupport (3.0.3) lib/active_support/file_update_checker.rb:25:in `stat'
activesupport (3.0.3) lib/active_support/file_update_checker.rb:25:in `updated_at'
activesupport (3.0.3) lib/active_support/file_update_checker.rb:25:in `map'
activesupport (3.0.3) lib/active_support/file_update_checker.rb:25:in `updated_at'
activesupport (3.0.3) lib/active_support/file_update_checker.rb:29:in `execute_if_updated'
activesupport (3.0.3) lib/active_support/i18n_railtie.rb:23:in `_callback_before_5'
activesupport (3.0.3) lib/active_support/callbacks.rb:414:in `_run_prepare_callbacks'
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:45:in `call'
activesupport (3.0.3) lib/active_support/callbacks.rb:415:in `_run_call_callbacks'
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.1) lib/rack/sendfile.rb:107:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/show_exceptions.rb:46:in `call'
railties (3.0.3) lib/rails/rack/logger.rb:13:in `call'
rack (1.2.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `synchronize'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:in `call'
railties (3.0.3) lib/rails/application.rb:168:in `call'
railties (3.0.3) lib/rails/application.rb:77:in `send'
railties (3.0.3) lib/rails/application.rb:77:in `method_missing'
rack (1.2.1) lib/rack/content_length.rb:13:in `call'
rack (1.2.1) lib/rack/handler/webrick.rb:52:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.2.1) lib/rack/handler/webrick.rb:13:in `run'
rack (1.2.1) lib/rack/server.rb:213:in `start'
railties (3.0.3) lib/rails/commands/server.rb:65:in `start'
railties (3.0.3) lib/rails/commands.rb:30
railties (3.0.3) lib/rails/commands.rb:27:in `tap'
railties (3.0.3) lib/rails/commands.rb:27
script/rails:6:in `require'
script/rails:6
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
(超级延迟)
我必须按照问题中描述的步骤进行操作,之后我需要重新启动服务器,但我没有完成。这就是问题的解决方案。以防其他人看到此内容而不阅读评论。
(super delayed)
I had to follow the steps described in the question, and after that I needed to restart the server, which I hand't done. This was the solution for the problem. Just in case other people see this and don't read the comments.