Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use Sqlite3 adapter in examples

Two bits of example code use sqlite as an adapter, which doesn't exist.
Using the code verbatim will raise a LoadError exception:

    ActiveRecord::Base.establish_connection(
      "adapter"  => "sqlite",
      "database" => "db.sqlite"
    )
    # => LoadError: Could not load 'active_record/connection_adapters/sqlite_adapter'...

Considering this is code a lot of people new to Rails might be running,
it's especially confusing.

Closes #14367 [ci skip]
  • Loading branch information...
commit 2f19263f21f056de83dc03df7d10cf541e164029 1 parent 71662c8
@orangejulius orangejulius authored carlosantoniodasilva committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/connection_handling.rb
View
4 activerecord/lib/active_record/connection_handling.rb
@@ -15,14 +15,14 @@ module ConnectionHandling
# Example for SQLite database:
#
# ActiveRecord::Base.establish_connection(
- # adapter: "sqlite",
+ # adapter: "sqlite3",
# database: "path/to/dbfile"
# )
#
# Also accepts keys as strings (for parsing from YAML for example):
#
# ActiveRecord::Base.establish_connection(
- # "adapter" => "sqlite",
+ # "adapter" => "sqlite3",
# "database" => "path/to/dbfile"
# )
#
Please sign in to comment.
Something went wrong with that request. Please try again.