简体   繁体   English

如何使用mysql配置活动记录

[英]how to configure active record with mysql

I have this error: 我有这个错误:

126: No se puede encontrar el módulo especificado. 126:没有任何规定 - C:/Ruby193/lib/ruby/gems/ 1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError) -C:/ Ruby193 / lib / ruby​​ / gems / 1.9.1 / gems / mysql2-0.3.11-x86-mingw32 / lib / mysql2 / 1.9 / mysql2.so(LoadError)

mysql2.so it's there... mysql2.so它在那里...

this is my source: 这是我的来源:


require 'rubygems'
require 'active_record'
require 'mysql2'
gem 'mysql2'

ActiveRecord::Base.establish_connection ({


:adapter => "mysql2",
  :host => "localhost",
  :username => "root",
  :password => "Gerard66.",
  :database => "students"})

Can anybody help me? 有谁能够帮助我? I'm new on this 我是新来的

maybe not right of your mysql2 install. 也许不适合您的mysql2安装。 you can look at this article: http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/ 您可以查看此文章: http : //blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM