mysql2

mysql2 gem Can't build native extensions

本秂侑毒 提交于 2019-12-19 02:29:25
问题 Our intern's computer is having problems installing the mysql2 gem. We just upgraded his computer from OS X 10.6 to 10.8 (Mountain Lion). I have tried installing mysql through homebrew and through the 64 bit DMG installer. I also tried symlinking to the dev tools (as pointed out here: Not able to install some gems after mountain lion upgrade). We have Xcode (4.4) installed and the command line tools installed. We tried a reboot after installing the command line tools. This is his PATH

rake db:migrate error with mysql2 gem - Library not loaded: libssl.1.0.0.dylib

廉价感情. 提交于 2019-12-18 12:26:21
问题 Getting the following error after running rake db:migrate rake aborted! LoadError: dlopen(/Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle, 9): Library not loaded: libssl.1.0.0.dylib Referenced from: /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle Reason: image not found - /Users/scott/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle /Users/scott/Google

Migration to create table raises Mysql2::Error: Table doesn't exist

邮差的信 提交于 2019-12-18 12:19:07
问题 I wrote a migration with the following: class CreateTableSomeTable < ActiveRecord::Migration[5.1] def change create_table :some_tables do |t| t.references :user, foreign_key: true t.references :author, references: :user, foreign_key: true t.text :summary end end end It is a basic migration that is creating a database table. However: when I run rails db:migrate a very odd error message aborts the migration: Mysql2::Error: Table 'my_database.some_tables' doesn't exist: SHOW FULL FIELDS FROM

Install mysql2 gem on Snow Leopard for Rails 3 with rvm

浪尽此生 提交于 2019-12-17 22:22:17
问题 I have recently upgraded to Rails 3 and created a new application with Rails 3.0.3, but I keep getting an error Macintosh:$ rails server => Booting WEBrick => Rails 3.0.3 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2010-11-28 11:32:47] INFO WEBrick 1.3.1 [2010-11-28 11:32:47] INFO ruby 1.8.7 (2010-04-19) [i686-darwin10.4.0] [2010-11-28 11:32:47] INFO WEBrick::HTTPServer#start: pid=1055 port=3000 Started GET "/" for 127.0.0

Mysql 5.6 headaches on Mac OSX

末鹿安然 提交于 2019-12-17 21:46:28
问题 Several of my colleagues and I have recently upgraded from MySQL 5.5 to MySQL 5.6 using homebrew on our Macs to test locally before upgrading our servers. Since this upgrade, we all have been experiencing intermittent MySQL errors when running our rails code: Lost connection to MySQL server at 'sending authentication information', system error: 32 We have tried re-making our usernames and passwords in our database, and upping the connection timeout, but neither have fixed the problem. The

mysql2 gem fails to compile with MySQL 5.6.12 on OS X with Homebrew

*爱你&永不变心* 提交于 2019-12-17 17:48:31
问题 I updated all the packages I installed with Homebrew. MySQL got upgraded to 5.6.12 (from 5.5.27 or so): $ mysql --version mysql Ver 14.14 Distrib 5.6.12, for osx10.8 (x86_64) using EditLine wrapper and now the mysql2 gem doesn't compile anymore: $ gem install mysql2 Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /Users/pupeno/.rvm/rubies/ruby-1.9.3-p429-perf/bin/ruby extconf.rb checking for rb_thread_blocking

bundle install problem: mysql.h is missing

岁酱吖の 提交于 2019-12-17 17:31:07
问题 in my mac OSX 10.6 32 bit, I can install mysql2 gem quite easily, but not in mini mac 10.6 64bit server. I have installed MySQL 5.5.11 in troublesome server, while in my home mac MySQL 5.5.0.m2 Somehow when I run bundle install, in server it tries to install mysql2.0.3.2 while in home mysql2.0.2.6 Please don't tell me to env ARCHFLAGS="-arch x86_64" sudo gem install mysql2 --version '= 0.2.6' -- --with-mysql-config=/usr/local/mysql/bin/mysql_config I tried that, doesn't work. Included /usr

Error when trying to install app with mysql2 gem

蓝咒 提交于 2019-12-17 10:19:00
问题 Im trying to install an open source rails 3.2.21 application that uses the mysql2 gem, but when i try and run the bundle commant I get the following error: Fetching: mysql2-0.3.18.gem (100%) Building native extensions. This could take a while... p ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /Users/my_username/.rvm/rubies/ruby-2.1.2/bin/ruby -r ./siteconf20150614-72129-orqsb7.rb extconf.rb checking for ruby/thread.h... yes checking for rb_thread_call_without

LEFT OUTER JOIN in Rails 4

北慕城南 提交于 2019-12-17 06:06:39
问题 I have 3 models: class Student < ActiveRecord::Base has_many :student_enrollments, dependent: :destroy has_many :courses, through: :student_enrollments end class Course < ActiveRecord::Base has_many :student_enrollments, dependent: :destroy has_many :students, through: :student_enrollments end class StudentEnrollment < ActiveRecord::Base belongs_to :student belongs_to :course end I wish to query for a list of courses in the Courses table, that do not exist in the StudentEnrollments table that

Ruby MYSQL2 gem installation on windows 7

这一生的挚爱 提交于 2019-12-17 03:24:34
问题 I'm trying to installing the mysql2 gem on windows 7 I downloaded the connector from the mysql site and placed the libmysql.dll in ruby200\bin then do gem install mysql2 These are the results am I being dim here? Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. C:/Ruby200/bin/ruby.exe extconf.rb checking for rb_thread_blocking_region()... yes checking for rb_wait