Ruby on Rails SQLite3 :: NotADatabaseException(文件被加密或不是数据库) [英] Ruby on Rails SQLite3::NotADatabaseException (file is encrypted or is not a database)
问题描述
开始GET/为127.0.0.1在2011-03- 30 02:20:15 -0500
由PagesController处理#home为HTML
在18ms内完成
SQLite3 :: NotADatabaseException(文件被加密或不是数据库):
app / models / user.rb:81:in authenticate_with_salt'
user_from_remember_token'
app / helpers / sessions_helper.rb:79:in
app / helpers / sessions_helper.rb:18:in current_user'
signed_in? '
app / helpers / sessions_helper.rb:23:in
app / controllers / pages_controller.rb:9:在'home'
渲染/Users/ikylim/.rvm/gems/ruby-1.9.2 -p0 / gems / actionpack-3.0.1 / lib / action_dispatch / middleware / templates / rescues / _trace.erb(0.8ms)
渲染/Users/ikylim/.rvm/gems/ruby-1.9.2-p0 /gems/actionpack-3.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb(1.9ms)
呈现/Users/ikylim/.rvm/g拯救/布局(5.2ms)中的ems / ruby-1.9.2-p0 / gems / actionpack-3.0.1 / lib / action_dispatch / middleware / templates / rescues / diagnostics.erb
$ b $有谁体验过这个?我真的无法弄清楚这一点。感谢很多
好的,我通过运行以下方式解决了问题:
$ rake db:reset
这删除了我以前保存的数据库中的所有内容,但至少我的应用程序可以再次工作。我仍然不确定为什么这发生在蓝色之中,所以希望有人可以提供一个答案供将来参考。
I am afraid something really bad happened while I was messing around with my RAILS app. It was working fine, and I am not sure what I did, but I get the following error:
Started GET "/" for 127.0.0.1 at 2011-03-30 02:20:15 -0500 Processing by PagesController#home as HTML Completed in 18ms
SQLite3::NotADatabaseException (file is encrypted or is not a database):
app/models/user.rb:81:in authenticate_with_salt'
app/helpers/sessions_helper.rb:79:in
user_from_remember_token'
app/helpers/sessions_helper.rb:18:in current_user'
app/helpers/sessions_helper.rb:23:in
signed_in?'
app/controllers/pages_controller.rb:9:in `home'
Rendered /Users/ikylim/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.8ms) Rendered /Users/ikylim/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.9ms) Rendered /Users/ikylim/.rvm/gems/ruby-1.9.2-p0/gems/actionpack-3.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (5.2ms)
Anybody experience this? I really can't figure this out. Thanks a lot
Okay, I solved the problem by running:
$ rake db:reset
This deleted everything in the database that I had saved previously, but at least my app works again to work with. I am still unsure why this happened out of the blue, so hopefully somebody could provide an answer for future reference.
这篇关于Ruby on Rails SQLite3 :: NotADatabaseException(文件被加密或不是数据库)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!