Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

SQLite connection failing

#99

Something's wrong with SQLite adapter:

In rails edge console:

>> Page.new
ActiveRecord::StatementInvalid: Could not find table 'pages'
	from /usr/home/www/releases/20080502184121/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:29:in `table_structure'

>> Page.find_by_sql "SELECT COUNT(*) FROM pages"
ActiveRecord::StatementInvalid: Could not find table 'pages'

>> ActiveRecord::Base.connection.tables
=> "pages"

while with sqlite3 shell:

sqlite>SELECT COUNT(*) FROM pages;
18

Using sqlite 3.4.0 then 3.5.6 and today's master branch.

No problem with 2.0.2 stable release

Reported by Jérôme · May 3rd, 2008 @ 12:05 PM

State: stale
Milestone: none
Assigned to: Michael Koziarski Michael Koziarski
Importance: none

Activity

  1. Jérôme
    Jérôme

    Since it work with 2.0-stable, could it be an issue with quoted table names ? As far as I can remember there are some recent commits related to that....

    May 3rd, 2008 @ 12:12 PM

  2. Jérôme
    Jérôme
    • Assigned user set to Michael Koziarski

    May 3rd, 2008 @ 12:13 PM

  3. Michael Koziarski
    Michael Koziarski
    • Assigned user cleared.

    The sqlite3 tests pass for me, are they failing for you?

    May 6th, 2008 @ 10:45 AM

  4. Jérôme
    Jérôme
    • Assigned user set to Michael Koziarski

    No they don't. This is really strange as the same app with the same db file and same gems works great on other production servers. I suggest then to close this ticket as I can't reproduce this issue nor find out what may be wrong.

    May 10th, 2008 @ 11:11 AM

  5. Pascal Ehlert
    Pascal Ehlert

    I can reproduce this exact error, using the same configuration but Rails 2.1 stable gem. sqlite3 tests also pass for me.

    It works perfectly on my local machine (OS X Leopard) but no chance on my debian server. The other gem and sqlite versions are the same as for jerome.

    I hope someone finds out how to fix this soon, it is a really annoying issue.

    June 9th, 2008 @ 04:40 PM

  6. Jérôme
    Jérôme

    Got exactly the same db file, with the same sqlite3 libs, same gems, etc. on a OS X box, 2 FreeBSD 6 boxes and 1 FreeBSD7. It just fails on one FreeBSD 6 server. I stopped looking for resolving this issue .. ;(

    June 9th, 2008 @ 06:39 PM

  7. masahji
    masahji

    Yeah it looks like the problem is in activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb.

    I have found a quick work around.

    The "table_info" method for the sqlite_adapter is having it's param over quoted by table_structure. The way I worked around this was to create a file in your rails project named as follows:

    lib/active_record/connection_adapters/sqlite3_adapter.rb

    This file is an exact copy of the gem version of the file:

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb

    except for one line difference:

    $ diff -u /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb lib/active_record/connecti

    on_adapters/sqlite3_adapter.rb

    --- /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb 2008-06-18 12:50:43.000000000 -0700

    +++ lib/active_record/connection_adapters/sqlite3_adapter.rb 2008-06-18 12:47:56.000000000 -0700

    @@ -25,7 +25,7 @@

    module ConnectionAdapters #:nodoc:

    class SQLite3Adapter < SQLiteAdapter # :nodoc:

    def table_structure(table_name)

    • returning structure = @connection.table_info(quote_table_name(table_name)) do
    • returning structure = @connection.table_info(table_name) do

    raise(ActiveRecord::StatementInvalid, "Could not find table '#{table_name}'") if structure.empty?

    end

    end

    Hope this helps.

    June 18th, 2008 @ 09:00 PM

  8. masahji
    masahji

    If that looked confusing just remove line that says:

    returning structure = @connection.table_info(quote_table_name(table_name)) do

    And replace it with:

    returning structure = @connection.table_info(table_name) do

    June 18th, 2008 @ 09:02 PM

  9. mgomez
    mgomez

    Sorry, but it doesn't really help:

    ** Starting Rails with development environment...

    Exiting

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:275:in `load_missing_constant': uninitialized constant ActiveRecord::ConnectionAdapters::SQLiteAdapter (NameError)

    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:467:in `const_missing'

    I saw that your change goes back to ActiveRecord 2.0.2, but the trick must be somewhere else. :(

    June 19th, 2008 @ 03:04 PM

  10. masahji
    masahji

    I am pretty sure this is the problem because it appears as though some of the changes necessary to fix the quoting bug http://dev.rubyonrails.org/ticke... got mixed up. The AbstractAdapter is now by default doing table name quoting. However, someone patched the SQLite3Adapter table_structure method to always to table name quoting when calling @connection.table_info. They must have been under the assumption that AbstractAdapter was not doing table name quoting. Because of this, the SQLite3Adapter does double quoting. We are seeing this as still broken in activerecord-2.1.0.

    Can you paste in more of your stack trace so I can see where this is happening?

    June 19th, 2008 @ 04:55 PM

  11. mgomez
    mgomez

    -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

    Now, this is my error data without changes. Notice that the server starts, but crashes with the first request (I have RBAC):


    Ruby version is not up-to-date; loading cgi_multipart_eof_fix => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails 2.1.0 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server Starting Mongrel listening at 0.0.0.0:3000 Starting Rails with development environment... Rails loaded. Loading any Rails specific GemPlugins Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). Rails signals registered. HUP => reload (without restart). It might not work well. Mongrel 1.1.5 available at 0.0.0.0:3000 ** Use CTRL-C to stop.

    Processing MyclassController#index (for 127.0.0.1 at 2008-06-20 09:21:18) [GET] Session ID: xxx Parameters: {"action"=>"index", "controller"=>"/myclass"}

    ActiveRecord::StatementInvalid (Could not find table 'users'):

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:29:in table_structure'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/object/misc.rb:28:in returning'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:28:in table_structure'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite_adapter.rb:189:in columns'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1145:in columns'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1153:in columns_hash'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1371:in find_one'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1362:in find_from_ids'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:537:in find'

    /vendor/plugins/plugin/lib/active_rbac/acts_as_current_user_container.rb:199:in unpersist'

    /vendor/plugins/plugin/lib/active_rbac/acts_as_current_user_container.rb:142:in current_user'

    /app/controllers/application.rb:34:in `authenticate'
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in send'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in evaluate_method'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:in call'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:430:in call'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:592:in run_before_filters'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:578:in call_filters'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in perform_action_without_benchmark'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in perform_action_without_rescue'

    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    
    

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in perform_action_without_rescue'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in perform_action_without_caching'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in perform_action'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in cache'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in cache'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in perform_action'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in process_without_filters'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in process_without_session_management_support'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in process'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in process'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in handle_request'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in synchronize'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in dispatch_cgi'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in process'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in synchronize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in process'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
    
    

    process_client'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
    
    

    process_client'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
    
    

    initialize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
    
    

    initialize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
    
    

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in each'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
    
    

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
    
    

    gem_original_require'

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require'

    /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
    
    

    gem_original_require'

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    script/server:3
    
    

    SQL (0.007802) SELECT name FROM sqlite_master WHERE type = 'table' AND NOT name = 'sqlite_sequence'

    Processing MyclassController#index (for 127.0.0.1 at 2008-06-20 09:21:19) [GET] Session ID: xxx Parameters: {"action"=>"index", "controller"=>"/myclass"}

    ActionView::TemplateError (Could not find table 'users') on line #20 of usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/templates/rescues/_request_and_response.erb: 17:

    Parameters:

    <%=h request_dump %>
    
    18: 19:

    Show session dump

    20:
    <%= debug(request.session.instance_variable_get("@data")) %>
    21: 22: 23:

    Response

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:29:in table_structure'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/object/misc.rb:28:in returning'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:28:in table_structure'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite_adapter.rb:189:in columns'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1145:in columns'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1219:in inspect'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/debug_helper.rb:26:in debug'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/templates/rescues/_request_and_response.erb:20:in _run_erb_47usr47lib47ruby47gems47146847gems47actionpack45246146047lib47action_controller47templates47rescues47_request_and_response46erb'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in execute'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in render_template'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in render_file'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/templates/rescues/diagnostics.erb:11:in _run_erb_47usr47lib47ruby47gems47146847gems47actionpack45246146047lib47action_controller47templates47rescues47diagnostics46erb'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in execute'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in render_template'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in render_file'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:181:in rescue_action_locally'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:125:in rescue_action'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:203:in perform_action_without_caching'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in perform_action'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in cache'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in cache'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in perform_action'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in process_without_filters'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in process_without_session_management_support'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in process'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in process'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in handle_request'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in synchronize'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in dispatch_cgi'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in
    
    

    process'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in
    
    

    synchronize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in
    
    

    process'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
    
    

    process_client'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
    
    

    process_client'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
    
    

    initialize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
    
    

    initialize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
    
    

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in each'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
    
    

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
    
    

    gem_original_require'

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require'

    /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
    
    

    gem_original_require'

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    script/server:3
    
    

    SQL (0.007231) SELECT name FROM sqlite_master WHERE type = 'table' AND NOT name = 'sqlite_sequence'

    /!\ FAILSAFE /!\ Fri Jun 20 09:21:19 +0200 2008 Status: 500 Internal Server Error

    ActionView::TemplateError (Could not find table 'users') on line #20 of usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/templates/rescues/_request_and_response.erb: 17:

    Parameters:

    <%=h request_dump %>
    
    18: 19:

    Show session dump

    20:
    <%= debug(request.session.instance_variable_get("@data")) %>
    21: 22: 23:

    Response

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:29:in table_structure'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/object/misc.rb:28:in returning'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:28:in table_structure'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite_adapter.rb:189:in columns'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1145:in columns'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1219:in inspect'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/debug_helper.rb:26:in debug'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/templates/rescues/_request_and_response.erb:20:in _run_erb_47usr47lib47ruby47gems47146847gems47actionpack45246146047lib47action_controller47templates47rescues47_request_and_response46erb'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in execute'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in render_template'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in render_file'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/templates/rescues/diagnostics.erb:11:in _run_erb_47usr47lib47ruby47gems47146847gems47actionpack45246146047lib47action_controller47templates47rescues47diagnostics46erb'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in execute'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in render_template'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in render_file'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:181:in rescue_action_locally'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:125:in rescue_action'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:203:in perform_action_without_caching'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in perform_action'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in cache'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in cache'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in perform_action'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in process_without_filters'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in process_without_session_management_support'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in process'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in process'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in handle_request'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in synchronize'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in dispatch_cgi'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in
    
    

    process'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in
    
    

    synchronize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in
    
    

    process'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
    
    

    process_client'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
    
    

    process_client'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
    
    

    initialize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
    
    

    initialize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
    
    

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in each'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
    
    

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
    
    

    gem_original_require'

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require'

    /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
    
    

    gem_original_require'

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    script/server:3
    
    
    On line [#20](/projects/8994/tickets/20 "Ticket #20") of
    
    

    usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/templates/rescues/_request_and_response.erb

    17: <p><b>Parameters</b>: <pre><%=h request_dump %></pre></p>
    18:
    19: <p><a href="#"
    
    

    onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump

    20: <div id="session_dump" style="display:none"><%=
    
    

    debug(request.session.instance_variable_get("@data")) %>

    21:
    22:
    23: <h2 style="margin-top: 30px">Response</h2>
    
    

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:29:in table_structure'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/object/misc.rb:28:in returning'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:28:in table_structure'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite_adapter.rb:189:in columns'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1145:in columns'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1219:in inspect'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/debug_helper.rb:26:in debug'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/templates/rescues/_request_and_response.erb:20:in _run_erb_47usr47lib47ruby47gems47146847gems47actionpack45246146047lib47action_controller47templates47rescues47_request_and_response46erb'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in execute'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in render_template'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in render_file'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/templates/rescues/diagnostics.erb:11:in _run_erb_47usr47lib47ruby47gems47146847gems47actionpack45246146047lib47action_controller47templates47rescues47diagnostics46erb'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in execute'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in render'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in render_template'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in render_file'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:181:in rescue_action_locally'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:125:in rescue_action'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:203:in perform_action_without_caching'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in perform_action'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in cache'

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in cache'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in perform_action'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in send'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in process_without_filters'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in process_without_session_management_support'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in process'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in process'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in handle_request'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in synchronize'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in dispatch_cgi'

    /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in dispatch'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in
    
    

    process'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in
    
    

    synchronize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in
    
    

    process'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
    
    

    process_client'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
    
    

    process_client'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
    
    

    initialize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
    
    

    initialize'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
    
    

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in each'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
    
    

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in run'

    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in load'

    /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
    
    

    gem_original_require'

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in'

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require'

    /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
    
    

    gem_original_require'

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    script/server:3
    
    

    And this, when I use your hack, the server does not even start:


    Ruby version is not up-to-date; loading cgi_multipart_eof_fix => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails 2.1.0 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:275:in load_missing_constant': uninitialized constant ActiveRecord::ConnectionAdapters::SQLiteAdapter (NameError)

        from
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:467:in const_missing'

        from
    
    

    /home/mgomez/www/myapp/lib/active_record/connection_adapters/sqlite_adapter.rb:26

        from
    
    

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require'

        from
    
    

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in require'

        from
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require'

        from
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in new_constants_in'

        from
    
    

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in require'

        from
    
    

    /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb:1

         ... 39 levels...
        from
    
    

    /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39

        from
    
    

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require'

        from
    
    

    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in require'

        from script/server:3
    
    

    Exiting


    Hope that this helps.

    June 20th, 2008 @ 08:40 AM

  12. masahji
    masahji

    I see the problem. I think you didn't implement the work around properly. It looks like you patched the file sqlite_adapter.rb instead of sqlite3_adapter. Follow the following steps and you should ready to go.

    FIRST remove that sqlite_adapter patch that you did.

    $ cd /home/mgomez/www/myapp

    $ mkdir -p lib/active_record/connection_adapters

    $ cp /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/sqlite3_adapter.rb lib/active_record/connection_adapters

    Then edit the file lib/active_record/connection_adapters/sqlite3_adapter.rb and modify the line that shows:

    returning structure = @connection.table_info(...

    to say:

    returning structure = @connection.table_info(table_name) do

    That should do it. Let me know if you have any problems.

    June 20th, 2008 @ 05:39 PM

  13. mgomez
    mgomez

    You were right. It is now working for me too.

    Thank you very much indeed.

    I suppose that your patch should make it into the core.

    June 23rd, 2008 @ 08:16 AM

  14. Michael Koziarski
    Michael Koziarski

    Attach a patch for us following the guidelines at:

    http://rails.lighthouseapp.com/p...

    and we'll get it in.

    June 23rd, 2008 @ 09:10 AM

  15. Juozas
    Juozas
    • Tag set to activerecord, edge, patch, sqlite

    masahji,

    your suggested fix works. thank you a ton.

    June 29th, 2008 @ 01:47 AM

  16. Craig Buchek
    Craig Buchek

    Included patch in format requested. Not sure how to add a test for this, though. Any guidance on that would be appreciated.

    July 29th, 2008 @ 05:05 PM

  17. Michael Koziarski
    Michael Koziarski

    I get test errors when I apply this:

    /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/errors.rb:94:in `check': near "-": syntax error (SQLite3::SQLException)
    	from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/statement.rb:71:in `initialize'
    	from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:184:in `new'
    	from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:184:in `prepare'
    	from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/database.rb:232:in `execute2'
    	from /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.1/lib/sqlite3/pragmas.rb:249:in `table_info'
    	from ./test/cases/../../lib/active_record/connection_adapters/sqlite3_adapter.rb:28:in `table_structure'
    	from ./test/cases/../../lib/active_record/connection_adapters/sqlite_adapter.rb:189:in `columns'
    	from ./test/cases/../../lib/active_record/base.rb:1173:in `columns'
    	 ... 17 levels...
    	from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
    	from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
    	from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/test/unit.rb:278
    	from /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb:5
    

    July 29th, 2008 @ 08:54 PM

  18. Craig Buchek
    Craig Buchek

    I tried sqlite3-ruby 1.2.1 and 1.2.2 -- both have the same issues. The root problem MIGHT actually be in that gem's table_info routine in lib/sqlite3/pragmas.rb -- I would think that quoting should really happen there.

    It took a bit of effort to figure out how to get the tests to run. Without any patch, 2 tests fail when I run rake test_sqlite3 in the activerecord directory. With this 2nd patch, the same 2 tests fail for me, but the initial error reported should be gone.

    Please try this patch and see if it helps the initial problem.

    July 30th, 2008 @ 06:05 AM

  19. Michael Koziarski
    Michael Koziarski
    • State changed from new to stale

    August 31st, 2008 @ 06:33 PM

  20. Hadley Wickham
    Hadley Wickham

    I'm still experiencing this problem with ActiveRecord 2.2.2 and sqlite3-ruby 1.2.4.

    March 14th, 2009 @ 07:44 PM

  21. Craig Buchek
    Craig Buchek

    I think I finally found the root of the problem. I was still having the problem in Debian 4.0 with Rails 2.3.2 and sqlite3-ruby 1.2.4.

    The problem is that sqlite3-ruby is not quoting the PRAMGA SQL statement correctly. I went into the table_info() definition in $GEM_HOME/gems/sqlite3-ruby-1.2.4/lib/sqlite3/pragmas.rb and put single quotes around '#{table}' in the call to execute2().

    This doesn't make ActiveRecord pass all the test_sqlite3 tests, but it does eliminate all the errors I've been seeing with SQLite3 on Rails on Debian.

    April 29th, 2009 @ 09:07 PM

  22. Jonah Burke
    Jonah Burke

    I thought I was still running into this problem, but it turned out that Rails was loading a 'sqlite3' that was in the load path instead of the gem. I fixed the problem by activating the gem with this line in environment.rb:

    gem 'sqlite3-ruby'

    Could be that others who are reporting this issue in current versions are in fact loading an old version of sqlite3-ruby, like I was.

    September 17th, 2009 @ 02:32 AM