Mike Li
Mike Li

Reputation: 3406

LoadError when using heroku db:push

When i use "heroku db:push" to transfer my local data to heroku,i got this error message:

Sequel::AdapterNotFound -> LoadError: no such file to load -- sequel/adapters/mysql2

I already install the mysql2 gem, and i am using rvm with ruby 1.9.2 in Mac OS X Snow Leopard.

Upvotes: 3

Views: 2316

Answers (4)

tmaximini
tmaximini

Reputation: 8503

might be old news, but make sure you are a) in the projects root folder and b) in the correct rvm gemset!

Upvotes: 0

gvaswani
gvaswani

Reputation: 161

Taps is still not compatible with sequel 3.15 which has mysql2 support. So mysql2 adapter won't work heroku db:pull or db:push commands. But I got it working by using the old mysql adapter. i was facing problems because my mysql adapter wasn't configured properly. If you are on 64 bit macOSX. Try uninstalling mysql adapter and reinstalling it using: sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Hope it helps.

Upvotes: 0

vidaha
vidaha

Reputation: 1

I'm able to use the original "mysql" gem still with rails3 instead of "mysql2" to get around this problem.

Upvotes: 0

Jeremy Evans
Jeremy Evans

Reputation: 12139

Are you using the most current version of Sequel? mysql2 support wasn't added until 3.15.0.

Upvotes: 1

Related Questions