mysql2 gem v0.4.0 doesn't work #21544

Closed
lesleh opened this Issue Sep 8, 2015 · 9 comments

Comments

Projects
None yet
9 participants
@lesleh

lesleh commented Sep 8, 2015

When creating a new app with rails new myapp --database=mysql, I get an error when attempting to load the app:

Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

Manually specifying the version of mysql2 to be v0.3.20 works fine.

@sodabrew sodabrew referenced this issue in brianmario/mysql2 Sep 8, 2015

Closed

mysql2 0.4.0 Gem::LoadError - fix #675

@sodabrew

This comment has been minimized.

Show comment
Hide comment
@sodabrew

sodabrew Sep 8, 2015

Contributor

I didn't realize the AR adapter was using a squiggly require, so this will cause some confusion because Bundler doesn't know that it needs to hold back the mysql2 version.

@jeremy Thanks for updating the adapter - I left you a few comments on #21536

Contributor

sodabrew commented Sep 8, 2015

I didn't realize the AR adapter was using a squiggly require, so this will cause some confusion because Bundler doesn't know that it needs to hold back the mysql2 version.

@jeremy Thanks for updating the adapter - I left you a few comments on #21536

jeremy added a commit that referenced this issue Sep 8, 2015

@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca Sep 8, 2015

Member

Backported

Member

rafaelfranca commented Sep 8, 2015

Backported

@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca Sep 8, 2015

Member

I mean, next Rails 4.2 will support mysql2 0.4

Member

rafaelfranca commented Sep 8, 2015

I mean, next Rails 4.2 will support mysql2 0.4

xithan added a commit to xithan/wagn that referenced this issue Sep 8, 2015

lock mysql2 gem
latest mysql2 update doesn't work with Rails rails/rails#21544
@jaredbeck

This comment has been minimized.

Show comment
Hide comment
@jaredbeck

jaredbeck Sep 9, 2015

Contributor

.. next Rails 4.2 will support mysql2 0.4

Thanks for backporting! ❤️

Contributor

jaredbeck commented Sep 9, 2015

.. next Rails 4.2 will support mysql2 0.4

Thanks for backporting! ❤️

jaredbeck added a commit to paper-trail-gem/paper_trail that referenced this issue Sep 9, 2015

Temporarily constrain mysql2 gem to ~> 0.3.20
We would prefer to only constrain mysql2 to '~> 0.3',
but a rails bug (rails/rails#21544)
requires us to constrain to '~> 0.3.20' for now.

@jaredbeck jaredbeck referenced this issue in paper-trail-gem/paper_trail Sep 9, 2015

Closed

Moved InstanceMethods module to its own file #613

xithan added a commit to xithan/wagn that referenced this issue Sep 9, 2015

lock mysql2 gem
latest mysql2 update doesn't work with Rails rails/rails#21544
@slicedpan

This comment has been minimized.

Show comment
Hide comment
@slicedpan

slicedpan Sep 10, 2015

Just a suggestion, this issue would have been easier to diagnose if the exception message from Gem::LoadError was not swallowed up by the exception handler when the adapter specific code is required.

Just a suggestion, this issue would have been easier to diagnose if the exception message from Gem::LoadError was not swallowed up by the exception handler when the adapter specific code is required.

@Sega100500

This comment has been minimized.

Show comment
Hide comment
@Sega100500

Sega100500 Sep 11, 2015

@jaredbeck
For Rails 3.2.xxx need use:
gem 'mysql2', '~> 0.3.20' ?

RoR 3.2.xxx no longer supported
And what about RoR 4.0, RoR 4.1 ?

@jaredbeck
For Rails 3.2.xxx need use:
gem 'mysql2', '~> 0.3.20' ?

RoR 3.2.xxx no longer supported
And what about RoR 4.0, RoR 4.1 ?

@kaleemullah360

This comment has been minimized.

Show comment
Hide comment
@kaleemullah360

kaleemullah360 Sep 15, 2015

do
gem 'mysql2', '~> 0.3.18' this gem works with rails version 4.x.x
if install gem 'mysql2', '~> 0.4.0' it produces gem load error

do
gem 'mysql2', '~> 0.3.18' this gem works with rails version 4.x.x
if install gem 'mysql2', '~> 0.4.0' it produces gem load error

tvdeyen pushed a commit to AlchemyCMS/alchemy_cms that referenced this issue Sep 22, 2015

Thomas von Deyen

@NobodysNightmare NobodysNightmare referenced this issue in opf/openproject Sep 23, 2015

Merged

Feature/upgrade db gems #3538

milj added a commit to getkiwicom/alchemy_cms that referenced this issue Sep 24, 2015

theunixbeard added a commit to open-source-affiliate/3rd-party-retargeter that referenced this issue Sep 28, 2015

@saizai

This comment has been minimized.

Show comment
Hide comment
@saizai

saizai Oct 3, 2015

When will this be released?

saizai commented Oct 3, 2015

When will this be released?

saizai added a commit to saizai/MakeYourLaws that referenced this issue Oct 3, 2015

mystix added a commit to mystix/magerecord that referenced this issue Oct 8, 2015

jmuheim pushed a commit to jmuheim/base that referenced this issue Oct 8, 2015

@ronen ronen referenced this issue in SchemaPlus/schema_monkey Oct 9, 2015

Merged

Insert SchemaMonkey as soon as anything is registered. #7

@ronen ronen referenced this issue in SchemaPlus/schema_validations Oct 24, 2015

Merged

Support case_sensitive unique validations #28

@tf tf referenced this issue in codevise/pageflow Oct 24, 2015

Closed

The installation instructions fail for mysql2 #424

awood45 added a commit to aws-samples/todo-app-railsconf that referenced this issue Oct 26, 2015

Merge pull request #1 from gepoggio/mysql2-fix
locked mysql2 version to 0.3.18 to avoid rails/rails#21544

@st0012 st0012 referenced this issue in DatabaseCleaner/database_cleaner Oct 28, 2015

Closed

mysql 0.4.1 throws exception #404

ariejan added a commit to ariejan/firefly that referenced this issue Oct 29, 2015

Constrain mysql2 to 0.3.x
ActiveRecord 4.2.4 does not work with mysql2-0.4.x yet.

rails/rails#21544

ashishkumar added a commit to Go2Study/rails-server that referenced this issue Nov 2, 2015

NicholasAnthony added a commit to NicholasAnthony/LinkShrink that referenced this issue Nov 4, 2015

tvdeyen pushed a commit to AlchemyCMS/alchemy_cms that referenced this issue Nov 19, 2015

Thomas von Deyen

@dklesev dklesev referenced this issue in codevise/pageflow Nov 28, 2015

Closed

NoMethodError #447

jaredbeck added a commit to paper-trail-gem/paper_trail that referenced this issue Dec 21, 2015

Temporarily constrain mysql2 gem to ~> 0.3.20
We would prefer to only constrain mysql2 to '~> 0.3',
but a rails bug (rails/rails#21544)
requires us to constrain to '~> 0.3.20' for now.

@exAspArk exAspArk referenced this issue in igrigorik/em-synchrony Jan 14, 2016

Merged

Add new adapter for ActiveRecord 4.2, fix #198 #200

jaredbeck added a commit to paper-trail-gem/paper_trail that referenced this issue Jan 18, 2016

Temporarily constrain mysql2 gem to ~> 0.3.20
We would prefer to only constrain mysql2 to '~> 0.3',
but a rails bug (rails/rails#21544)
requires us to constrain to '~> 0.3.20' for now.

jaredbeck added a commit to paper-trail-gem/paper_trail that referenced this issue Jan 18, 2016

Temporarily constrain mysql2 gem to ~> 0.3.20
We would prefer to only constrain mysql2 to '~> 0.3',
but a rails bug (rails/rails#21544)
requires us to constrain to '~> 0.3.20' for now.

@jottr jottr referenced this issue in MeinGrundeinkommen/meingrundeinkommen Feb 1, 2016

Closed

Installing mysql2 gem fails on heroku #25

jottr added a commit to MeinGrundeinkommen/meingrundeinkommen that referenced this issue Feb 1, 2016

newrelicbot pushed a commit to newrelic/rpm that referenced this issue Feb 17, 2016

Lock testing mysql2 version for rails4x unit tests
This locks the mysql2 adapter to the same versioning scheme
as listed in the active record source for the deprecated
4.x branches 4.0.x and 4.1.x. This prevents otherwise
incorrect load errors when running the rails40 and rails41
suites. See also: rails/rails#21544

@exAspArk exAspArk referenced this issue in igrigorik/em-synchrony Mar 1, 2016

Merged

Make tests runnable #203

evanrkeller added a commit to evanrkeller/training-benchmarks that referenced this issue Mar 8, 2016

Hold back MySQL Gem version
There is an incompatibility with Rails 4.2 and MySQL 0.4.x as per
rails/rails#21544. Updating Rails should fix
this problem but for now this is the simplest fix.

evanrkeller added a commit to evanrkeller/training-benchmarks that referenced this issue Mar 8, 2016

Hold back MySQL Gem version
There is an incompatibility with Rails 4.2 and MySQL 0.4.x as per
rails/rails#21544. Updating Rails should fix
this problem but for now this is the simplest fix.
@Anle90

This comment has been minimized.

Show comment
Hide comment
@Anle90

Anle90 May 7, 2016

Rails v 4.2.4 error with mysql 0.4. has to use mysql2', '~> 0.3.18 to work

Anle90 commented May 7, 2016

Rails v 4.2.4 error with mysql 0.4. has to use mysql2', '~> 0.3.18 to work

mystix added a commit to mystix/magerecord that referenced this issue Dec 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment