mysql2

Rails 5 and Ruby 2.3.3 Failed to load libmysql.dll

天大地大妈咪最大 提交于 2019-12-10 11:30:04
问题 Getting below error message logged in the console while starting the server for an application created with mysql database. Failed to load libmysql.dll from C:\RailsInstaller\Ruby2.3.0\lib\ruby\gems\2.3.0\gems\mysql2-0.4.7-x86-mingw32\vendor\libmysql.dll Environment Details : Window 7 64 bit Rails 5.0.4 ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32] mysqld Ver 5.7.18 for Win64 on x86_64 (MySQL Community Server (GPL)) Post install message from mysql2 ruby gem received below message

Error installing Mysql2 gem- 10.6 Server

不问归期 提交于 2019-12-10 09:35:38
问题 I'm trying to install the mysql2 gem on 10.6 server and I get an error message I haven't seen: EBuilding native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb checking for rb_thread_blocking_region()... no checking for mysql.h... no checking for mysql/mysql.h... no ----- mysql.h is missing. please check your installation of mysql and try again. --

Error installing mysql2 gem on Debian Squeeze

杀马特。学长 韩版系。学妹 提交于 2019-12-10 03:59:56
问题 I got this "popular" error while installing mysql2 gem on Debian Squeeze: gem install mysql2 Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... no checking for mysql.h... yes checking for errmsg.h... yes checking for mysqld_error.h... yes creating Makefile make gcc -I.

mysql2 gem 0.3.15 gives ASCII-8BIT with encoding set to “utf8”

人走茶凉 提交于 2019-12-10 01:21:26
问题 I am using MySQL 5.1.71 with Rails 4.0.4 running on Ruby 2.0.0-p353 (via rbenv + ruby-build), with mysql2 gem 0.3.15. CentOS 6.5. In database.yml, encoding is set to "utf8" and adapter is "mysql2" for all environments. My tables are all using UTF-8, "DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci". In Ruby, Encoding::default_internal == Encoding::default_external == Encoding::UTF_8 . Any ideas on where else I can look to see why ActiveRecord still hands me ASCII-8BIT strings? I get UTF-8 on my

mysql2 failing bundle install

旧巷老猫 提交于 2019-12-08 06:30:13
问题 I've been hung up on this issue for hours now and nothing I have found previously posted about this issue seems to work. Below is the mysql2 output for when I run bundle install : Fetching mysql2 0.4.5 Installing mysql2 0.4.5 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/MYUSERNAME/Desktop/MY_PROJECT/vendor/ruby/2.4.0/gems/mysql2-0.4.5/ext/mysql2 /Users/MYUSERNAME/.rbenv/versions/2.4.2/bin/ruby -r ./siteconf20180623-40170

mysql2 gem installation fails

杀马特。学长 韩版系。学妹 提交于 2019-12-08 01:10:59
问题 My stack is as follows: CentOS 6.3 Installed MySQL 5.5 (followed steps at http://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/ because yum still has MySQL 5.1 and if I try to yum install any mysql related package, it will of course break as yum will expect 5.1) $> mysql --version mysql Ver 14.14 Distrib 5.5.27, for Linux (x86_64) using readline 5.1 $> ruby --version ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] $> rvm --version rvm 1.14.6 (stable

-Fatal- failed to allocate memory - Rails 3.1 and Mysql2 Gem

笑着哭i 提交于 2019-12-07 06:54:45
问题 I'm having a strange problem with the latest 'mysql2' gem and Rails 3.1 I can run mysql fine from the IRB when I include the gem, but with rails whenever I attempt to save to the database in the console, or even load up the page when the server starts, i get [FATAL] Failure to Allocate Memory . There don't seem to be any mysql logs available, and that is the only error Rails shows. Interestingly enough, when I do start a connection in the Rails console and just run a count query e.g. User

Mysql2::Error (Access denied for user 'root'@'localhost' (using password: NO)):

不羁岁月 提交于 2019-12-07 06:41:22
问题 Just setup a new rails 3.1.3 app using mysql (mysql2 gem) on CentOS 5 server / apache / passenger... I have correctly setup a database and a user for that database and I have added the login and info into my database.yml file... I can generate stuff, and rake db:migrate ok but the "We're sorry, but something went wrong." message is being rendered in the browser and this message is showing up in my production.log file! Started GET "/" for xx.xxx.xx.xxx at 2011-12-29 19:52:35 -0600 Mysql2:

how to solve 'connection is still waiting for a result' error with em_mysql2

别来无恙 提交于 2019-12-07 06:26:03
问题 I'm using activerecord with em_mysql2 under Goliath (eventmachine). The oddest thing is happening with my User model. When I do a POST to /users the first time, it all works just find as expected. When I do a second POST I get an error. Mysql2::Error: This connection is still waiting for a result, try again once you have the result: INSERT INTO `users` (... and so on ...) This doesn't happen for any other of my models or routes. I would assume that if the db connection is in a messed up state

Database not being selected in rails project when attempting to rake db:migrate

痞子三分冷 提交于 2019-12-06 23:47:16
问题 Working with a rails app, having some manner of weird database / rake issues. When I execute: rake db:migrate I am getting the following error: Mysql2::Error: No database selected: SHOW TABLES (See full trace by running task with --trace) The trace isn't revealing much useful information. Can be seen here: http://pastebin.com/WdsguudC The config file looks right, and the user is getting logged in, or I would have gotten some kind of access error. The database exists, the user has correct