mysql2

Ruby on Rails 4.1.8 Gem::LoadError for mysql2 gem

寵の児 提交于 2021-01-29 05:51:50
问题 I picked up a 4 year old project written in Ruby 2.1.3 and Rails 4.1.8 . Very few of the gems were versioned but I've managed to get the project running locally by installing mysql2 0.3.20 as suggested in multiple other threads. Doing this required me to (on MacOS) downgrade openssl and mysql with brew install mysql@57 and brew install openssl@10 . I could then install mysql2 with by passing the correct libraries to it: gem install mysql2 -v 0.3.20 -- --with-mysql-config=/usr/local/opt/mysql

Ruby on Rails 4.1.8 Gem::LoadError for mysql2 gem

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-29 05:49:20
问题 I picked up a 4 year old project written in Ruby 2.1.3 and Rails 4.1.8 . Very few of the gems were versioned but I've managed to get the project running locally by installing mysql2 0.3.20 as suggested in multiple other threads. Doing this required me to (on MacOS) downgrade openssl and mysql with brew install mysql@57 and brew install openssl@10 . I could then install mysql2 with by passing the correct libraries to it: gem install mysql2 -v 0.3.20 -- --with-mysql-config=/usr/local/opt/mysql

libmysqlclient.so.18: cannot open shared object file: No such file or directory

五迷三道 提交于 2020-07-10 01:47:12
问题 I'm currently trying to AWS Lambda a Ruby application. I was having issues installing mysql2 , when I ran bundle install I was getting the following error: An error occurred while installing mysql2 (0.5.2), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.5.2' --source 'https://rubygems.org/'` succeeds before bundling I came across a Stackoverflow post to create a Docker container to load the dependencies, here is the post. Cannot load file mysql2 on AWS Lambda I followed

mysql not respecting wait_timeout setting in my.cnf

≯℡__Kan透↙ 提交于 2020-02-02 09:36:55
问题 I've set a wait_timeout in my.cnf and restarted the server, but the time on idle connections continues to grow larger than the default 100s I set. Any ideas why this is happening? PS: I'm running ubuntu 12.04 and Mysql Server 5.5. Using Rails 3 with the mysql2 gem. mysql> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY TIME DESC LIMIT 20; +------+------------------+-------------------------------------+--------------------------+---------+------+-------+------+ | ID | USER | HOST | DB |

mysql not respecting wait_timeout setting in my.cnf

无人久伴 提交于 2020-02-02 09:33:07
问题 I've set a wait_timeout in my.cnf and restarted the server, but the time on idle connections continues to grow larger than the default 100s I set. Any ideas why this is happening? PS: I'm running ubuntu 12.04 and Mysql Server 5.5. Using Rails 3 with the mysql2 gem. mysql> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY TIME DESC LIMIT 20; +------+------------------+-------------------------------------+--------------------------+---------+------+-------+------+ | ID | USER | HOST | DB |

MySQL2 gem won't install

一笑奈何 提交于 2020-01-22 10:45:47
问题 I have been trying to install Gitlab on my Ubuntu 12.04 server for a long time, and all goes well until I run bundle install . It says it is unable to install MySQL2 but gives no reason or corrective action. home/gitlab/gitlab$ sudo -u gitlab -H bundle install --deployment --without development test postgres Fetching gem metadata from http://rubygems.org/....... Fetching gem metadata from http://rubygems.org/.. Using rake (10.0.1) Using i18n (0.6.1) Using multi_json (1.3.7) Using

Rails 3.2.2 mysql2 adapter Error

让人想犯罪 __ 提交于 2020-01-14 14:27:06
问题 I've been having trouble getting the mysql2 adapter working with the latest version of rails. I Just generated a new project. Added the following to my gemfile: gem 'mysql2', '< 0.3.7' then of course ran: bundle install I also modified my database.yml file: development: adapter: mysql2 encoding: utf8 database: blog_development username: root password: ********* socket: /tmp/mysql.sock test: adapter: mysql2 encoding: utf8 database: blog_test username: root password: ******** socket: /tmp/mysql

Cannot run migrations due to MySQL error

倾然丶 夕夏残阳落幕 提交于 2020-01-02 12:16:45
问题 I have been trying to get my dev environment setup on OS X for a couple of days now, and I have had a lot of trouble with mysql. I have installed mysql via the dmg file available from the mysql website. This fixed most of the trouble I was having. My current problem is that, when I run "rake db:migrate" I get the following error: rake aborted! undefined method `init' for Mysql:Class I read somewhere that using gem 'mysql2' in the Gemfile and mysql2 as the database adapter might fix the

Segmentation fault when compiling mysql2 with mingw

扶醉桌前 提交于 2020-01-02 09:31:52
问题 When I try to create a Rails server this is what I get. It instantly runs over 500+ lines of code and comes back with this message. This is my first Ruby on Rails project. I am pretty new to coding as well. Would love some help if possible. Thank you! C:/Ruby200-x64/lib/ruby/gems/2.0.0/extensions/x64-mingw32/2.0.0/mysql2-0.3.15/my sql2/mysql2.so: [BUG] Segmentation fault ruby 2.0.0p451 (2014-02-24) [x64-mingw32] 0 enumerator.so 1 C:/Ruby200-x64/lib/ruby/2.0.0/x64-mingw32/enc/encdb.so 2 C: