sqlite3-1.3.9-x64-mingw32.gemspec 文件中已修改为 s.require_paths= ["lib/sqlite3_native"]
相关的 dll 文件也放入 Ruby 的 Bin 文件之中,而且 Gemfile 文件中的 sqlite3 和 Gemfile.lock 中的版本一致,但是访问网页会抛出错误如下:
Could not load 'active_record/connection_adapters/sqlite3_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql', 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile.
异常链如下:
activesupport (4.1.6) lib/active_support/dependencies.rb:247:in `require'
activesupport (4.1.6) lib/active_support/dependencies.rb:247:in `block in require'
activesupport (4.1.6) lib/active_support/dependencies.rb:232:in `load_dependency'
activesupport (4.1.6) lib/active_support/dependencies.rb:247:in `require'
activerecord (4.1.6) lib/active_record/connection_adapters/sqlite3_adapter.rb:6:in `<top (required)>'
activesupport (4.1.6) lib/active_support/dependencies.rb:247:in `require'
activesupport (4.1.6) lib/active_support/dependencies.rb:247:in `block in require'
activesupport (4.1.6) lib/active_support/dependencies.rb:232:in `load_dependency'
activesupport (4.1.6) lib/active_support/dependencies.rb:247:in `require'
activerecord (4.1.6) lib/active_record/connection_adapters/connection_specification.rb:188:in `spec'
activerecord (4.1.6) lib/active_record/connection_handling.rb:50:in `establish_connection'
activerecord (4.1.6) lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
activesupport (4.1.6) lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
activesupport (4.1.6) lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
activesupport (4.1.6) lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
activesupport (4.1.6) lib/active_support/lazy_load_hooks.rb:44:in `each'
activesupport (4.1.6) lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
activerecord (4.1.6) lib/active_record/base.rb:326:in `<module:ActiveRecord>'
activerecord (4.1.6) lib/active_record/base.rb:23:in `<top (required)>'
activerecord (4.1.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:628:in `rescue in call'
activerecord (4.1.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:619:in `call'
activerecord (4.1.6) lib/active_record/migration.rb:380:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.1.6) lib/active_support/callbacks.rb:82:in `run_callbacks'
actionpack (4.1.6) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.1.6) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.1.6) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.1.6) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.1.6) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.1.6) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.1.6) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.1.6) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.1.6) lib/action_dispatch/middleware/static.rb:64:in `call'
rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
railties (4.1.6) lib/rails/engine.rb:514:in `call'
railties (4.1.6) lib/rails/application.rb:144:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
E:/Tool/Ruby21-x64/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
E:/Tool/Ruby21-x64/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
E:/Tool/Ruby21-x64/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
求解惑~~