Project

General

Profile

Actions

Defect #10566

closed

The bundled mysql.rb driver has been removed from Rails 2.2

Added by Nicolas Sebrecht over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hi all!

I can't get current redmine master to work with ruby 1.9.

Error:

> RAILS_ENV=production  rake db:drop
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
Couldn't drop redmine19 : #<LoadError: cannot load such file -- mysql>

Additional informations

I tried to install both mysql and mysql2 gems with and without option --with-mysql-config=/usr/bin/mysql_config but it still fails.

The database is not hosted on the same system but mysql libraries and client are installed (mysql command-line works fine):

> dpkg --get-selections |grep mysql
libdbd-mysql-perl                               install
libmysqlclient-dev                              install
libmysqlclient16                                install
mysql-client-5.1                                install
mysql-client-core-5.1                           install
mysql-common                                    install
mysql-server-5.1                                deinstall
php5-mysql                                      deinstall
> gem list

*** LOCAL GEMS ***

actionmailer (2.3.14)
actionpack (2.3.14)
activerecord (2.3.14)
activeresource (2.3.14)
activesupport (2.3.14)
bundler (1.1.3, 1.1.1)
coderay (1.0.5)
daemon_controller (1.0.0)
fastthread (1.0.7)
i18n (0.4.2)
mysql (2.8.1)
mysql2 (0.2.18)
net-ldap (0.3.1)
passenger (3.0.11)
pg (0.9.0)
rack (1.4.1, 1.1.3)
rails (2.3.14)
rake (0.9.2.2, 0.9.2)
rmagick (2.13.1)
ruby-openid (2.1.8)
sqlite3 (1.3.5)
tzinfo (0.3.32)
> rvm info
ruby-1.9.3-p125:

  system:
    uname:       "Linux web-ruby 3.0.0-16-server #29-Ubuntu SMP Tue Feb 14 13:08:12 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux" 
    bash:        "/bin/bash => GNU bash, version 4.2.10(1)-release (x86_64-pc-linux-gnu)" 
    zsh:         "/usr/bin/zsh => zsh 4.3.11 (x86_64-unknown-linux-gnu)" 

  rvm:
    version:      "rvm 1.11.3 () by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]" 
    updated:      "4 hours 43 minutes 5 seconds ago" 

  ruby:
    interpreter:  "ruby" 
    version:      "1.9.3p125" 
    date:         "2012-02-16" 
    platform:     "x86_64-linux" 
    patchlevel:   "2012-02-16 revision 34643" 
    full_version: "ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]" 

[...]
Actions #1

Updated by Nicolas Sebrecht over 12 years ago

  • Status changed from New to Resolved

Very nice! This is exactly what I was missing. Thank you Jean-Philippe!

commit 986388bd5ca1cc67bfeface3ac3399bc374d600f
Author: jplang <jplang@e93f8b46-1217-0410-a6f0-8f06a7374b81>
Date:   Sat Apr 14 06:51:16 2012 +0000

    Note about the mysql2 adapter in database.yml.example.

    git-svn-id: svn://rubyforge.org/var/svn/redmine/trunk@9409 e93f8b46-1217-0410-a6f0-8f06a7374b81

diff --git a/config/database.yml.example b/config/database.yml.example
index b558ec2..2133780 100644
--- a/config/database.yml.example
+++ b/config/database.yml.example
@@ -1,4 +1,6 @@
-# MySQL (default setup).
+# Default setup is given for MySQL with ruby1.8. If you're running Redmine
+# with MySQL and ruby1.9, replace the adapter name with `mysql2`.
+# Examples for PostgreSQL and SQLite3 can be found at the end.

 production:
   adapter: mysql
Actions #2

Updated by Etienne Massip over 12 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid
Actions

Also available in: Atom PDF