[Rails] SQLite adaptor problem

Nolan J. Darilek nolan at thewordnerd.info
Thu Dec 2 23:18:52 GMT 2004


Recently I wrote an authentication controller, and it worked on RAILS
0.8. I didn't work on the site for a few weeks, though, and now my
authentication controller fails when used with the latest version of
Rails and ActiveRecord, both the latest stable versions and the 12-01
beta gems. Here is the error I receive:

ActiveRecord::StatementInvalid in Authentication#signup

unable to open database file: BEGIN

/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.1.0.200412010045/lib/active_record/connection_adapters/abstract_adapter.rb:342:in `log'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.1.0.200412010045/lib/active_record/connection_adapters/sqlite_adapter.rb:50:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.1.0.200412010045/lib/active_record/connection_adapters/sqlite_adapter.rb:67:in `begin_db_transaction'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.1.0.200412010045/lib/active_record/connection_adapters/abstract_adapter.rb:284:in `transaction'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.1.0.200412010045/lib/active_record/transactions.rb:86:in `transaction'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.1.0.200412010045/lib/active_record/transactions.rb:100:in `transaction'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.1.0.200412010045/lib/active_record/transactions.rb:115:in `save'
/home/nolan/whatssofunny/publicapp/controllers/authentication_controller.rb:27:in `signup'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_controller/base.rb:592:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_controller/base.rb:592:in `perform_action_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_controller/filters.rb:236:in `perform_action_without_benchmark'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_controller/benchmarking.rb:30:in `perform_action_without_rescue'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_controller/benchmarking.rb:30:in `measure'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_controller/benchmarking.rb:30:in `perform_action_without_rescue'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_controller/rescue.rb:68:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_controller/base.rb:276:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-0.9.5.200412010045/lib/action_controller/base.rb:249:in `process'
/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.5.200412010045/lib/dispatcher.rb:37:in `dispatch'

AuthenticationController:27 is a call to Member.save.

I'm sure the configuration is right and that I'm pointing at a valid
database because immediately before I received this error I got a
"Trying to write to read-only database," which went away when I fixed
the permissions on the file.

Any thoughts on what might be going on? What additional information
can I offer to help track this down?


More information about the Rails mailing list