开发者

Ruby on Rails SQLite3::NotADatabaseException (file is encrypted or is not a database)

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:inuser_from_remember_token' app/helpers/sessions_helper.rb:18:in current_user' app/helpers/sessions_helper.rb:23:insigned_in?' app/controllers/pages_controller.rb:9:in `home'

Rendered /Us开发者_Python百科ers/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


Its may be due to the permissions, you are using salt & permissions on your database.sqlite3 is messed up


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜