mysql2

Segmentation fault when compiling mysql2 with mingw

混江龙づ霸主 提交于 2020-01-02 09:31:34
问题 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:

Rails 3.2.3 MySQL 5.5.1 Mysql2 gem install fails with ld incompatibilities

亡梦爱人 提交于 2020-01-02 07:42:14
问题 I have a clean build system as follows Ubuntu 11.04 Rvm 1.13.5 Ruby 1.9.3p194 Rails 3.2.3 Gem 1.8.24 MySql 5.5.24-1 (installed in /usr/local) I am trying to install the mysql2 gem (0.3.11) and getting the following problem: pal@smurf01:~$ sudo gem install mysql2 [sudo] password for pal: 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.3-p194/bin/ruby extconf.rb checking for rb

how do I perform transactions with ruby mysql2

天大地大妈咪最大 提交于 2020-01-01 11:46:34
问题 I've started using mysql2 gem. I'm trying to figure out a few basic things - one of them is how to explicitly perform transactions (for batch operations, like multiple INSERT/UPDATE queries). In the old ruby-mysql , this was my approach: client = Mysql.real_connect(...) inserts = [ "INSERT INTO ...", "UPDATE .. WHERE id=..", # etc ] client.autocommit(false) inserts.each do |ins| begin client.query(ins) rescue # handle errors or abort entirely end end client.commit I couldn't find much in the

Gem::LoadError for mysql2 gem, but it's already in Gemfile

淺唱寂寞╮ 提交于 2019-12-28 03:23:09
问题 Gem::LoadError Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile This error occurred while loading the following files: active_record/base This is the error I get on running rails server. The mysql2 gem has been added to the Gemfile as well. I've done bundle install , and tried restarting the server but still get the error. 回答1: If you have this error when upgrading to rails 4.2.4 (also with rails 4.1.5) try using this version of mysql2:

Unable to install MySQL2 gem on Windows 7

北城余情 提交于 2019-12-28 02:55:22
问题 I am getting the following error message while installing, let me know if I need to post more details. I followed instructions from the following location: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit I am using ruby 1.9.2p136 (2010-12-25) [i386-mingw32]. Here is what I get: E:\work_desk\trunk>gem install mysql2 -v 0.2.4 Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to

Error installing mysql2: Failed to build gem native extension

耗尽温柔 提交于 2019-12-27 08:46:05
问题 I am having some problems when trying to install mysql2 gem for Rails. When I try to install it by running bundle install or gem install mysql2 it gives me the following error: Error installing mysql2: ERROR: Failed to build gem native extension. How can I fix this and successfully install mysql2 ? 回答1: On Ubuntu/Debian and other distributions using aptitude: sudo apt-get install libmysql-ruby libmysqlclient-dev Package libmysql-ruby has been phased out and replaced by ruby-mysql . This is

Getting the RailsKits SaaS app up and running w/ a mysql2 server

北战南征 提交于 2019-12-24 06:36:03
问题 I'm fairly new to the Rails game; I'm a front-end dev teaching myself to program. I've built a web application and decided to use the RailsKit SaaS kit to handle my registrations and such. I'm having problems just getting the default app up and running, but I'm sure it's due to my lack of knowledge and I think it has to do with getting a mysql server set up (usually I use sqlite3, but that doesn't seem to work w/ this app either). Here's the process and errors that I've come across, and I

RubyMine 3.2 failing to find libmysqlclient.18.dylib on MacOS Lion

别等时光非礼了梦想. 提交于 2019-12-24 01:47:08
问题 Just upgraded to RC1 of RM 3.2 on MacOS Lion and couldn't run the application anymore. Running with rvm. On startup the mysql2 gem reported it couldn't find libmysqlclient.18.dylib on a dlopen. Solved it. Posting the solution here so it will help somebody save some time. Using Apple's Property List Editor create an entry in ~/.MacOS/environment.plist call LD_LIBRARY_PATH and set the value to /usr/local/mysql/lib or whereever your MySQL libraries live. Logout and log back in and RubyMine and

heroku rake db:migrate ERROR “gem install activerecord-mysql-adapter”

雨燕双飞 提交于 2019-12-24 00:53:55
问题 im using Rails 3.2.6 trying to run heroku run rake db:migrate i get the adaptar ERROR rake aborted! Please install the mysql adapter: `gem install activerecord-mysql-adapter` (mysql is not part of the bundle. Add it to Gemfile.) in my database.yml i have development, production, and test set to: adapter: mysql2 this is my gem env ➜ my_app git:(master) gem env RubyGems Environment: - RUBYGEMS VERSION: 1.8.24 - RUBY VERSION: 1.9.3 (2012-11-10 patchlevel 327) [x86_64-darwin11.4.2] - INSTALLATION

Rails3 Mysql2::Error: Unknown column - ActiveRecord::StatementInvalid

倖福魔咒の 提交于 2019-12-23 18:09:44
问题 I'm new to working with databases in Rails at this level, and I've looked for several hours but haven't found a solution to this specific problem. Versions: Rails 3.2.9, Ruby 1.9.3, MySQL 5.5.28 (mysql2 gem 2.9.0), Mac OS 10.7.5 Error: ActiveRecord::StatementInvalid in Action_figures#list Mysql2::Error: Unknown column 'action_figures.position' in 'order clause': SELECT `action_figures`.* FROM `action_figures` ORDER BY action_figures.position ASC Extracted source (around line #14): [list.html