mysql2

Use MariaDB instead of MySQL in my Rails project

两盒软妹~` 提交于 2019-12-03 02:36:26
How can I use MariaDB instead of MySQL in my Rails project? When I try to install mysql2 gem it returns error,because mysqlclient was not found. Here some solution , but I didn't found any libmariadbd-dev package on my openSUSE 12.3. jbo5112 It doesn't look like openSUSE has a MariaDB client development package. You must install the libmysqlclient-devel package package. Since MariaDB is tagged as a drop in replacement for MySQL, it would have to support the MySQL clients, though you may lose tiny bits of MariaDB improvements. It appears that the mysql2 gem should function with the MariaDB

Rails error installing mysql2 (mysql2-0.3.20)

人走茶凉 提交于 2019-12-03 01:05:24
I am trying to get a rails project up and running on my local machine. When I do bundle install Fetching mysql2 0.3.20 Installing mysql2 0.3.20 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/mac/.rvm/gems/ruby-2.3.1/gems/mysql2- 0.3.20/ext/mysql2 /Users/mac/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20180707-33936-1toblx7.rb extconf.rb checking for ruby/thread.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... yes checking for rb_thread_blocking_region()... no checking for rb_wait_for_single_fd()... yes

Bundle install installs gems in ./mysql2 folder

一曲冷凌霜 提交于 2019-12-02 23:05:06
I recently upgraded mysql on my machine. As a result I'm attempting to update my mysql2 gem accordingly. In the process of doing that, I run "bundle install", and for some reason all of the gems in my Gemfile are getting installed in a ./mysql2 directory?? ruby-1.9.2-p180 [dev]:project.git$ bundle install NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /Users/al/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:3. NOTE: Gem.source_index is deprecated, use Specification. It will be removed

Why does Rails 3 with Mysql2 Gem ActiveRecord::Base.connection.execute(sql) return Array not Hash?

♀尐吖头ヾ 提交于 2019-12-02 17:43:09
I'm in the process of upgrading an application to Rails 3. I've decided to go with the mysql2 gem. There's some legacy code in the app that makes calls like: results = ActiveRecord::Base.connection.execute(sql) In the 2.3.x version, it used results.each_hash do |row| ... But with gem mysql2, results is type Mysql2::Result , which has only an each method. Checked the docs and they specify results should be a hash keyed on field name. Great! But in fact, it is an Array , not a Hash . When I use the rails console and instantiate my own Mysql2::Client and run the query there, the results are a

ERROR: 'rake/rdoctask' is obsolete and no longer supported

醉酒当歌 提交于 2019-12-01 13:09:29
Out of the blue, I started getting the following error message: (in /Users/me/.rvm/gems/ruby-1.9.3-p125@mysql2/gems/rails-0.9.5) rake aborted! ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead. /Users/me/.rvm/gems/ruby-1.9.3-p125@mysql2/gems/rails-0.9.5/Rakefile:3:in `<top (required)>' When I do rails s (in my development environment terminal - Mac Mountain Lion). This application is in production, so I went to the production environment, did a bundle show, and modified my Gemfile, to harcode the gems versions. Here's what I have now

ERROR: 'rake/rdoctask' is obsolete and no longer supported

有些话、适合烂在心里 提交于 2019-12-01 12:02:58
问题 Out of the blue, I started getting the following error message: (in /Users/me/.rvm/gems/ruby-1.9.3-p125@mysql2/gems/rails-0.9.5) rake aborted! ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead. /Users/me/.rvm/gems/ruby-1.9.3-p125@mysql2/gems/rails-0.9.5/Rakefile:3:in `<top (required)>' When I do rails s (in my development environment terminal - Mac Mountain Lion). This application is in production, so I went to the production

compiler error while installing rubygem 'mysql2' in Ruby 1.9.2 over CentOS 64-bit

二次信任 提交于 2019-12-01 11:30:35
a CentOS 64-bit Server with Ruby 1.8.7 & 1.9.2 {{no RVM, need it without RVM... currently all Ruby1.9.2 binaries are ruby19 and similarly accessible, so no mapping of gem-path or anything of that sort is there}} is giving error while installing gem 'mysql2' ... I have all dependencies installed and all are 64-bit versions ... All error are of kind {./client.h:13: error: redefinition of typedef ‘rb_unblock_function_t’} Could {#warning rubysig.h is obsolete} be a reason for this? Console Capture: #gem19 install mysql2 -v 0.2.7 -- --with-mysql-dir=/usr/bin --with-mysql-config=/usr/bin/mysql

compiler error while installing rubygem 'mysql2' in Ruby 1.9.2 over CentOS 64-bit

ⅰ亾dé卋堺 提交于 2019-12-01 09:59:22
问题 a CentOS 64-bit Server with Ruby 1.8.7 & 1.9.2 {{no RVM, need it without RVM... currently all Ruby1.9.2 binaries are ruby19 and similarly accessible, so no mapping of gem-path or anything of that sort is there}} is giving error while installing gem 'mysql2' ... I have all dependencies installed and all are 64-bit versions ... All error are of kind {./client.h:13: error: redefinition of typedef ‘rb_unblock_function_t’} Could {#warning rubysig.h is obsolete} be a reason for this? Console

Can't get mysql2 gem to work with MAMP2 and RVM on Lion, Rails3 app

送分小仙女□ 提交于 2019-11-30 15:28:40
问题 I am using MAMP2, rvm on OS X Lion and there is no way I can get mysql2 gem to work with my Rails app. I've followed this blog post http://blog.mirotin.net/35/mamp-1-9-5-mysql-5-5-9-and-ruby-mysql2 and this one http://www.pa-ket.com/blog/show/12-osx-ruby-mysql2-gem-python-mysqldb-using-mamp These were the steps: $ cd /tmp $ mv /Users/yourname/Desktop/mysql-5.5.9.tar.gz . $ tar xf mysql-5.5.9.tar.gz $ cd mysql-5.5.9 $ brew install cmake $ cmake . -DMYSQL_UNIX_ADDR=/Applications/MAMP/tmp/mysql

Can't get mysql2 gem to work with MAMP2 and RVM on Lion, Rails3 app

狂风中的少年 提交于 2019-11-30 14:34:31
I am using MAMP2, rvm on OS X Lion and there is no way I can get mysql2 gem to work with my Rails app. I've followed this blog post http://blog.mirotin.net/35/mamp-1-9-5-mysql-5-5-9-and-ruby-mysql2 and this one http://www.pa-ket.com/blog/show/12-osx-ruby-mysql2-gem-python-mysqldb-using-mamp These were the steps: $ cd /tmp $ mv /Users/yourname/Desktop/mysql-5.5.9.tar.gz . $ tar xf mysql-5.5.9.tar.gz $ cd mysql-5.5.9 $ brew install cmake $ cmake . -DMYSQL_UNIX_ADDR=/Applications/MAMP/tmp/mysql/mysql.sock -DCMAKE_INSTALL_PREFIX=/Applications/MAMP/Library This step failed: $ make -j 3 After