我试图将我的aptana rails应用程序连接到mysql。但是错误消息显示缺少llibmysql。 请帮帮我
这是我的步骤,如果我错过任何事情,请告诉我。
1- open aptana并创建了新的铁路项目 2- aptana自动创建所有文件夹,
$ bundle install
3-然后我将database.yml配置为
adapter: mysql2
encoding: utf8
reconnect: false
database: blog_development
pool: 5
username: root
password: root
host: localhost
4-在gem文件中添加了mysql2 5-下载mysql-connector-c-noinstall-6.0.2-win32.zip并将其解压缩到桌面
5-
$ gem install mysql --platform=ruby -- --with-mysql-dir=D:\Software-backup\mysqlconnecter
但似乎是错误消息 这是错误消息
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.
我不知道如何解决这个问题..请帮助..
感谢
答案 0 :(得分:1)
我遇到了同样的问题,我所做的是将文件libmysql.dll(通过解压缩你下载的连接器)复制到我的Ruby安装文件夹中的文件夹bin中。在您的情况下,您应该将libmysql.dll复制到C:/RailsInstaller/Ruby1.9.3/bin。