Forum: Ruby on Rails no such file to load -- mysql

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1bc365516a64f5d3644d4e7771c9e803?d=identicon&s=25 Subbu (Guest)
on 2009-02-07 18:23
(Received via mailing list)
Hello all,

This seems to be a regular problem. But I couldn't find a solution
that worked for me. I am getting the following error when I do rake
db:create:
--------------------
!!! The bundled mysql.rb driver has been removed from Rails 2.2.
Please install the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load -- mysql
--------------------
My first action was to install mysql. I did that with:

sudo gem install mysql -- --with-mysql-config=`which mysql_config`

but that didn't solve the issue. Then I tried the following:

sudo env ARCHFLAGS="-arch i386" gem install -V mysql -- --with-mysql-
config=`which mysql_config`

sudo env ARCHFLAGS="-arch i686" gem install -V mysql -- --with-mysql-
config=`which mysql_config`

Even they don't solve the issue even though all 3 of the above
installed mysql properly. My 'gem list' shows:
mysql (2.7.3, 2.7)

which means I have mysql installed. (or am I wrong?)

There is a workaround here (posts 2 & 3):
http://groups.google.com/group/rubyonrails-talk/br...

but they suggest tweaking the ruby mysql version. I plan to use mysql
in production. So I want to install the C version of mysql.

There is another solution here:

but it's a window solution (they provide a DLL file).

Any help?

-subbu
3728fc43d9b02b9167f5bdda9626a775?d=identicon&s=25 Johalf Farina (Guest)
on 2009-02-08 06:01
(Received via mailing list)
Install libdbd-mysql-ruby1.8

On Sat, Feb 7, 2009 at 3:22 PM, Subbu <subramani.athikunte@gmail.com>
wrote:

> no such file to load -- mysql
> sudo env ARCHFLAGS="-arch i686" gem install -V mysql -- --with-mysql-
> 
http://groups.google.com/group/rubyonrails-talk/br...
> -subbu
> >
>


--
Johalf Farina
fande.elance.com
www.fande.com.br
http://twitter.com/johalf
http://www.linkedin.com/in/johalf
Phone +55 51 81146026
3728fc43d9b02b9167f5bdda9626a775?d=identicon&s=25 Johalf Farina (Guest)
on 2009-02-08 06:02
(Received via mailing list)
Sorry  is this libmysql-ruby1.8

On Sat, Feb 7, 2009 at 3:40 PM, Johalf Farina
<johalffarina@gmail.com>wrote:

>> db:create:
>> but that didn't solve the issue. Then I tried the following:
>>
>>
> Johalf Farina
> fande.elance.com
> www.fande.com.br
> http://twitter.com/johalf
> http://www.linkedin.com/in/johalf
> Phone +55 51 81146026
>



--
Johalf Farina
fande.elance.com
www.fande.com.br
http://twitter.com/johalf
http://www.linkedin.com/in/johalf
Phone +55 51 81146026
1bc365516a64f5d3644d4e7771c9e803?d=identicon&s=25 Subbu (Guest)
on 2009-02-08 09:51
(Received via mailing list)
There is no gem with this name. I installed dbd-mysql-0.4.2 but still
doesn't work.
5ef4574f5758553933588e50866989a6?d=identicon&s=25 shaan (Guest)
on 2009-02-08 21:11
(Received via mailing list)
What OS are u on?
On linux, (I read from Johalf's email), you need to install libmysql-
ruby1.8 package. This is not a ruby gem but a ubuntu .deb or
redhad .rpm package.
On Cygwin+windows, you need to build mysql from source, which may take
1bc365516a64f5d3644d4e7771c9e803?d=identicon&s=25 Subbu (Guest)
on 2009-02-09 03:33
(Received via mailing list)
I am on Mac OSX 10.4
1bc365516a64f5d3644d4e7771c9e803?d=identicon&s=25 Subbu (Guest)
on 2009-02-09 07:39
(Received via mailing list)
Here is the other workaround link. Missed in the first post:
http://forums.aptana.com/viewtopic.php?f=20&t=7563
8ef10364b778cef5daf235e5994a3a2c?d=identicon&s=25 zaqwery (Guest)
on 2009-02-18 09:19
(Received via mailing list)
Hello!
I've got same problem! Can't continue working with Rails!
I have OSX 10.5.6. Mysql 5.0.67, Latest Ruby , Rubygems, Rails 2.2.2,
and mysl gem 2.7 installed in this way
sudo env ARCHFLAGS="-arch i386" gem install mysql --  --with-mysql-
dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib   --with-
mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/
mysql/bin/mysql_config

when I do rake db:migrate

!! The bundled mysql.rb driver has been removed from Rails 2.2. Please
install the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load -- mysql

I've been googling for 3 days and none of the solutions work for me.
I've reinstalled mysql ,ruby and rails several times.... got same
error. Please help!
Thanks beforehand
8ef10364b778cef5daf235e5994a3a2c?d=identicon&s=25 zaqwery (Guest)
on 2009-02-18 09:19
(Received via mailing list)
I have same problem. I've installed MySQL 5.0.67. Rails 2.2.2.
RubyGems and especially this mysql gem 2.7 (#   sudo env ARCHFLAGS="-
arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/
bin/mysql_config) I'm on MacOS 10.5.6.
When I do rake db:migrate:
!!! The bundled mysql.rb driver has been removed from Rails 2.2.
Please install the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load -- mysql

Have been Googling for 2 days - none of the solutions work.
Reinstalled Ruby Gems and Rails twice already - same error.
Please assist me. Thanks beforehand!
5b4cb770ee6df79bd690ee9ef64b82ed?d=identicon&s=25 Na Li (amish)
on 2010-02-12 02:37
Adding to the list of stuck people. I'm on Ubuntu 9.10.
C0ea9352796c6fb494428a48f662e212?d=identicon&s=25 庄杰 (Guest)
on 2010-02-12 11:15
(Received via mailing list)
install mysqlå•Š
5b4cb770ee6df79bd690ee9ef64b82ed?d=identicon&s=25 Na Li (amish)
on 2010-02-12 20:10
Attachment: gemOut.txt (2 KB)
庄杰 wrote:
> install mysqlå•Š

Installing mysql doesn't fix it. That's the problem. I've attached the
output from installing mysql, in case there's a clue there.

thanks,

-nate
This topic is locked and can not be replied to.