开发者

Using DataMapper with Rails 3 , Ruby 1.9.2 and MySQL --> [BUG] cross-thread violation on rb_gc()

as said on the dm-rails gem site (https://github.com/datamapper/dm-rails) i m doing

*rails new project_name -m http ://datamapper.org/templates/rails.rb -d mysql*

the problem is the "-d mysql". everything works in sqlite.

but with mysql i get [BUG] cross-thread violation on rb_gc() (null) Abort trap

I m on Mac snow leopard 10.6.4, ruby 1.9.2 via rvm, rails 3.0.1, dm-rails 1.0.4

heeeelp. its driving me crazy since 3 hours

**UPDATE -- SOLUTION FOUND

I finally got it work and bloged about it**

http://railspath.blogspot.com/2010/11/datamapper-rails-3-and-mysql-in-r开发者_如何学Cvm-on.html


It should not be necessary to use ARCHFLAGS. As the maintainer, I consider every such necessity to be a bug. The preferred way is to have mysql_config available in your PATH. If that is the case, compilation should be successful (if you have MySQL correctly installed that is).

Another potential cause of issue could be that your MySQL install is 32-bit and not 64-bit. You can check that by doing (please use the correct path):

file /path/to/your/bin/mysql

It should output something like:

Mach-O 64-bit executable x86_64


The Error occurs when the "do_mysql" gem hasnt been installed right.

mysql-server should be installed from www.mysql.com

rvm 1.9.2

then without sudo

*env ARCHFLAGS="-arch x86_64" gem install do_mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include*

br m

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜