0

i have tried to connect my aptana rails application to mysql. but an error message shows that llibmysql is missing. help me please

here is my steps, please do let me know if i missed anything.

1- open aptana and created new rail project 2- aptana automatically created all folders,

 $ bundle install

3- then i have configured the database.yml as

  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: blog_development
  pool: 5
  username: root
  password: root
  host: localhost

4- added mysql2 in gem file 5- downloded mysql-connector-c-noinstall-6.0.2-win32.zip and extracted this in to the desktop

5- $ gem install mysql --platform=ruby -- --with-mysql-dir=D:\Software-backup\mysqlconnecter

6- then again bundle install 7- then rake db:create

but seems error message here is the error message

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.

        c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb --with-mysql-dir=C:UsersasusDesktopabc
checking for main() in -llibmysql... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

i dont know how to resolve this..please help..

thanks

Well Wisher
  • 1,825
  • 1
  • 15
  • 20

1 Answers1

1

I had the same problem and what I did was to copy the file libmysql.dll (which you get by extracting the connector that you downloaded) into the folder bin inside my Ruby installation folder. In your case you should copy libmysql.dll into C:/RailsInstaller/Ruby1.9.3/bin.

akhanubis
  • 4,202
  • 1
  • 27
  • 19