120
votes
15answers
86k views

Error installing mysql2: Failed to build gem native extension

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 ...
64
votes
22answers
62k views

Rails, MySQL and Snow Leopard

I upgraded to Snow Leopard using the disc we got at WWDC. Trying to run some of my rails apps now complains about sql (in /Users/coneybeare/Projects/Ambiance/ambiance-server) !!! The bundled ...
22
votes
9answers
27k views

Ruby gem mysql2 install failing

When I try to install the mysql2 gem, it fails with no apparent errors. Does anyone know what to do to work around this so mysql2 installs? I am installing this on OS X. ...
12
votes
5answers
10k views

“193: %1 is not a valid Win32 application” bug with a new Rails Application

I have a new rails application which I have created under Windows 7 by going into a directory and typing "rails newapp". The creation went fine, and when I access the root page, all is well. However, ...
12
votes
13answers
25k views

How to delete duplicate records in mysql database?

What's the best way to delete duplicate records in a mysql database using rails or mysql queries?
8
votes
2answers
4k views

How to store uuid as number?

Based on the answer of question, UUID performance in MySQL, the person who answers suggest to store UUID as a number and not as a string. I'm not so sure how it can be done. Anyone could suggest me ...
5
votes
3answers
6k views

undefined method `eq' for nil:NilClass with rails 3 and ruby enterprise on ubuntu hardy

I am not sure what causes this error but since I came across this issue in passenger and now in the console as well I am thinking maybe the mysql driver is the problem? Everything works as expected on ...
11
votes
6answers
10k views

Cannot install mysql2 gem

I'm unable to install the mysql2 gem in my Windows7 x64 system. I tried using both the 32-bit and 64-bit versions of MySQL server but none got me any further. I installed Ruby 1.8, the development ...
41
votes
12answers
39k views

Create a new Ruby on Rails application using MySQL instead of SQLite

I want to create my Rails application with MySQL, because I like it so much. How can I do that in the latest version of Rails instead of the default SQLite?
31
votes
6answers
19k views

Ruby, Rails: mysql2 gem, does somebody use this gem? Is it stable?

I found mysql2 gem. It works fine with ruby 1.9 and utf8 encoding (as opposed to mysql gem). But I have doubts. Does somebody use this gem in production? What about the performance test? Is it faster ...
29
votes
6answers
19k views

Errors Installing mysql2 gem via the Bundler

I am trying to install the mysql2 gem via the Bundler, but it keeps dying with the following error: ** executing command ...
10
votes
9answers
11k views

Snow Leopard + Ruby 1.9.1 + MySQL Gem = Huge problems

I tried for about 3-4 hours trying to get the mysql gem to install for ruby 1.9.1 on snow leopard. The mysql gem used to work just fine on 1.9.1 before I upgraded to snow leopard. I uninstalled ...
15
votes
3answers
9k views

rails + MySQL on OSX: Library not loaded: libmysqlclient.18.dylib

I'm just starting out with Ruby (and rails). I did the setup according to http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:ruby gems, using rvm. I have everything working well with ...
13
votes
5answers
6k views

Rails select random record

I don't know if I'm just looking in the wrong places here or what, but does active record have a method for retrieving a random object? Something like? @user = User.random Or... well since that ...
8
votes
8answers
30k views

Could not connect: Lost connection to MySQL server at 'reading initial communication packet', system error: 0

I am running a Rails app so now I am trying to remote connect to mysql and I am getting this error Could not connect: Lost connection to MySQL server at 'reading initial communication packet', system ...

1 2 3 4 5 8
15 30 50 per page