Skip to content

Instantly share code, notes, and snippets.

@dacook
Last active May 29, 2020 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacook/10d4acff9a9ad63603713cd98be7d41b to your computer and use it in GitHub Desktop.
Save dacook/10d4acff9a9ad63603713cd98be7d41b to your computer and use it in GitHub Desktop.
bundle

ERROR :(

ERROR:  Error installing mysql2:
  ERROR: Failed to build gem native extension.

eg:

current directory: /Users/dcook/.rvm/gems/ruby-2.3.7@fairfood/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR="
compiling client.c
client.c:439:3: error: use of undeclared identifier 'my_bool'
  my_bool res = mysql_read_query_result(client);
  ^
client.c:441:19: error: use of undeclared identifier 'res'
  return (void *)(res == 0 ? Qtrue : Qfalse);
                  ^

 An error occurred while installing mysql2 (0.3.21), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.21' --source 'https://rubygems.org/'` succeeds before
bundling.

I can build a version of mysql2 v0.5 successfully, but activerecord explicitly requires v0.3:

LoadError: Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (can't activate mysql2 (~> 0.3.10), already activated mysql2-0.5.3. Make sure all dependencies are added to Gemfile.)

Will this help? https://stackoverflow.com/questions/1857861/libmysqlclient15-dev-on-macs

  • tried reinstall mysql with homebrew, no luck
  • tried adding mysql-client to PATH, no luck
  • ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment