Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Change instructions for installing mysql ruby bindings.

#2385

If you don't have the mysql ruby bindings installed, you get the following error:

!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.

The problem with telling people to install the gem, is that the latest version of the gem is old (2.7.0) and known to leak memory:

version 2.7.4

* BUG: Mysql::Stmt#execute memory leak.

This patch would change the message to the following:

!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the ruby mysql bindings from http://www.tmtm.org/en/mysql/ruby/ and try again.

Somebody will probably suggest creating an updated gem, but installing bindings from a gem is a really bad idea anyway. -It gives you the impression that you can have multiple versions of the binding, which is probably not the case, installing one will overwrite the existing binding, but it will still look like you have both gems installed. -It gives you the impression that you can remove the binding by uninstalling the gem, I'm not sure if this is actually possible or not, but I know the current version of the mysql gem does NOT work this way.

Reported by Joseph Palermo · March 31st, 2009 @ 06:05 PM

State: invalid
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Chad Woolley
    Chad Woolley

    +1 for changing the message to not point to the bad gem.

    March 31st, 2009 @ 06:18 PM

  2. Zach Brock
  3. Roland Moriz
    Roland Moriz

    So in the meantime the gem was updated on rubygems and looks to be maintained again.

    I think this issue is resolved now:

    Users without any mysql extension installed need an easy to follow instruction how to install mysql support:
    This happens only when no mysql gem is available, right? So there's no version missmatch.

    I really don't see your "can have only one binding installed at the same time" issue here.
    Sure, it's a limitation but it's not relevant when the message is shown because no mysql extension is installed at all?

    Or am I wrong?

    Besides that: What if the tmtm.org site goes down? It's a single point of failiure and a maintenance mess to care about external URLs imho.

    -1

    April 11th, 2010 @ 02:30 AM

  4. Joseph Palermo
    Joseph Palermo

    Yes, the fact there there is a good very of the gem mostly resolves this issue.

    Using gems to install binary bindings is still not a good idea because even though you are requiring one version of the gem, you may actually be getting another. This could be a very bad thing in a shared environment (you could end up using a bad version of the library even though you are requiring the correct one). This is somewhat mitigated by the fact that the mysql gem isn't updated very often.

    Everybody else seems to be ok with installing binary libraries through gems, so I'm willing to throw up my arms on this one. Telling users to use the gem is certainly the easiest thing for them, even though it may not be the correct thing. Explaining the issue to new users would be nice, but it would probably just confuse most of them.

    I guess the ideal solution would be to fix the mysql gem such that it does a check on activation to make sure the required gem version matches the library version that actually got loaded and throw an error if they do not match.

    April 11th, 2010 @ 03:03 AM

  5. Ryan Bigg
    Ryan Bigg
    • State changed from new to invalid

    No longer applicable, the mysql gem works for all purposes I have seen.

    April 11th, 2010 @ 03:04 AM