Questions tagged [mysql2]

The Mysql2 gem is meant to serve the extremely common use-case of connecting, querying and iterating on results.

The mysql2 gem is an interface for accessing MySQL databases from Ruby. This gem is an incompatible improvement over the original mysql gem.

Links:

907 questions
0
votes
2 answers

install Mysql2 -v '0.3.14' for rails 4 error

i want some help to install Mysql2 -v '0.3.14' for rails 4 on windows 7 always after run the command `gem install mysql2 -v '0.3.14' i always get the error c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb checking for ruby/thread.h...…
Astm
  • 1,519
  • 2
  • 22
  • 30
0
votes
0 answers

mysql2 gem installation problems failed to build gem native extension

so I've followed the instructions for a windows user here: Error installing mysql2: Failed to build gem native extension yet i'm still getting an error. Here is what I'm typing (because i'm using mysql 5.6) Here is a screen caption because i can't…
angyxpoo
  • 193
  • 2
  • 5
  • 16
0
votes
1 answer

How to Install gem mysql2 on Windows 8

I've spent a lot of time to fix this error and to understand it. Everytime I install ruby on rails on Windows I get the same problem. When I'm going to install the mysql2 gem I get the error below: Gem::Installer::ExtensionBuildError: ERROR: Failed…
kamusett
  • 1,403
  • 1
  • 12
  • 22
0
votes
1 answer

Retrieving multiple datasets using the Sequel gem

I'm using the Sequel gem in the most basic manner possible - connecting to a local database and extracting the results. The one catch is that my code relies on me being able to execute multiple query statements at once (splitting them up is not an…
user2490003
  • 10,706
  • 17
  • 79
  • 155
0
votes
1 answer

Unable to start Webrick

I'm following the tutorial from lynda.com and I'm trying to start the Webrick server. I'm on Windows 8, I had some trouble installing the mysql2 gem. This is the output when i type 'rails…
0
votes
1 answer

one to many relationship ruby on rails

So I made changes to my changes to subject.rb file here class CreateSubjects < ActiveRecord::Migration def up create_table :subjects do |t| t.string "name" t.integer "position" t.boolean "visible", :default =>false …
0
votes
1 answer

How can I get mysql2 to install?

I'm completely new to rails development and have been struggling with installing mysql2 with the past month. I'm have windows 8.1 64 bit, ruby 2.0.0p535 64bit, rails 4.0.2, and I have mysql2 (0.3.14) 64bit. The errors that I am getting from cmd are…
thad
  • 167
  • 1
  • 4
  • 16
0
votes
1 answer

Mysql2 installation on Mac

I am having problem installing mysql2 on my Mac osX maverick. Please look at the response that I got in return Muhammeds-MacBook-Pro:second_app muhammedz786$ gem install mysql2 --platform=ruby -- '--with-mysql-dir="C:\mysql-connector\"' Building…
0
votes
1 answer

how to implement api in rails application

In my rails application i want to use lite coins api calls. please let me know how to use this api in rails application. I have implemented for bit coins i got this code: from this i am getting the bit coins current value: <% response =…
user2931445
  • 19
  • 1
  • 6
0
votes
1 answer

How to create/maintain ID field in Sequel Pro via Ruby and mysql2

In Sequel Pro, created a table using this statement: CREATE TABLE dogs( id INT PRIMARY KEY AUTO_INCREMENT, name TEXT, color TEXT ); Since the id value is being created by MySQL, I would like to set/create/maintain the id field in ruby so that…
Uzzar
  • 705
  • 1
  • 12
  • 24
0
votes
1 answer

mysql2 adapter issue: libruby.so.1.8: cannot open shared object file: No such file or directory

I note that there have been many other similar questions, but my context seems to be different. Error The following is the error I am getting, trying to run/restart a Rails Application (Redmine). Redmine was running fine, but there have been some…
Natkeeran
  • 1,719
  • 6
  • 29
  • 52
0
votes
1 answer

Can't connect to remote mysql database ruby on rails

I have the following problem: I'm trying to connect to a mysql database on my remote host. I use the following ruby code client = Mysql2::Client.new(:host => HOST, :username => USER, :password => PASS) But what I am getting is: …
jenia
  • 55
  • 6
0
votes
1 answer

Rails 4 - Using MySQL2 gem getting "Table doesnt exist " error

Im trying to delete a table and truncate it using the following variations of code. All of the following versions give me the same error. Code: puts "Clearing Database Table: program_slots" ProgramSlot.destroy_all …
banditKing
  • 9,405
  • 28
  • 100
  • 157
0
votes
1 answer

Ruby: install mysql2

Windows 7 32bits Hi everyone, how can I install mysql2 properly in windows 7 I have this error: c:\dev\mysql2>gem install mysql2-0.3.13.gem --no-ri --no-rdoc -- --with-mysql-di r=c:\mysql-connector-c-noinstall-6.0.2-win32 This could take a…
G20map
  • 77
  • 1
  • 2
  • 9
0
votes
1 answer

Internal Server Error can't convert String into Integer (in Rails)

I am getting this error when i run my app after running a migration in which i dropped a column and added 2 new columns. I am getting this error Internal Server Error can't convert String into Integer on every view/page of my app? I am new to…
user2603796