could not load sqlite3_adapter

72 views
Skip to first unread message

Angelo Di Maria

unread,
Oct 7, 2015, 2:15:59 PM10/7/15
to opensport
Hello Gerald,
can you suggest me a fix for this problem ... attached an image of problem.

Consider that I'm new of rubygem and this is my first usage of sportdb tool (I've started "downloadAndBuild.sh")

Thanks 
Angelo




Capture.PNG

Gerald Bauer

unread,
Oct 7, 2015, 2:20:16 PM10/7/15
to open...@googlegroups.com
Hello,

Welcome. Benvenuti to football.db. Hard to tell from the
screenshoot - in the future please post the error messages in text.

You might be missing the sqlite3 library / gem, thus, try:

$ gem install sqlite3

And than retry.

Note: The best ("recommended") way to get started is using datafiles e.g.

$ sportdb new en # for example for the english premier league

. Cheers.

Angelo Di Maria

unread,
Oct 9, 2015, 2:01:25 PM10/9/15
to opensport
Hello Gerald,
first of all thank you for your reply.
I've reinstalled sqlite3 gem and launched "sportdb new en" but the error persist:

--
$gem install sqlite3

Successfully installed sqlite3-1.3.10-x86-mingw32
Parsing documentation for sqlite3-1.3.10-x86-mingw32
Done installing documentation for sqlite3 after 1 seconds
1 gem installed

--
$sportdb new en

activerecord-utils/0.4.0 (activerecord/4.2.4) on Ruby 2.2.3 (2015-08-18) [i386-mingw32]
  [TagDb.has_many_tags] adding taggings n tags has_many assocs to model >WorldDb::Model::Country<
  [TagDb.has_many_tags] adding taggings n tags has_many assocs to model >WorldDb::Model::StateBase<
  [TagDb.has_many_tags] adding taggings n tags has_many assocs to model >WorldDb::Model::CityBase<
sportdb-update/0.1.1 on Ruby 2.2.3 (2015-08-18) [i386-mingw32]
sportdb-service/0.4.0 on Ruby 2.2.3 (2015-08-18) [i386-mingw32]
sportdb/1.11.0 on Ruby 2.2.3 (2015-08-18) [i386-mingw32]
sportdb/1.11.0 on Ruby 2.2.3 (2015-08-18) [i386-mingw32]
[info] [builder] add world-dataset 'world.db'
[info] [builder] add football-dataset 'eng-england'
[info] [datafile] dowload
[info] download dataset 'openmundi/world.db'
[info]    to './tmp/openmundi--I--world.db.zip'...
[info] downloading http://github.com/openmundi/world.db/archive/master.zip to ./tmp/openmundi--I--world.db.zip...
[info] download dataset 'openfootball/eng-england'
[info]    to './tmp/openfootball--I--eng-england.zip'...
[info] downloading http://github.com/openfootball/eng-england/archive/master.zip to ./tmp/openfootball--I--eng-england.zip...
working directory: C:/Users/Administrator
Connecting to db using settings: 
{:adapter=>"sqlite3", :database=>"./sport.db"}

*** error: 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.


any other suggestions?

Thanks
Angelo

Gerald Bauer

unread,
Oct 9, 2015, 2:25:27 PM10/9/15
to open...@googlegroups.com
Hello,
That's weird / strange. Looks like the activerecord gem and
sqlite3 gem are installed. Try this little script to test if it works:

test.rb:

require 'sportdb/models'

## Let's create an in-memory SQLite database

DB_CONFIG = {
adapter: 'sqlite3',
database: ':memory:'
}

ActiveRecord::Base.establish_connection( DB_CONFIG )

SportDb.create_all ## create tables (e.g. teams, seasons, etc.)


Try to run it with:

$ ruby ./test.rb

Does it work or do you get the same error? Cheers.
Reply all
Reply to author
Forward
0 new messages