3

I am quite new to ruby and ruby on rails so I hope someone can suggest me a solution to this problem. When I run bundle exec db:migrate it returns an error like this:

/Library/Ruby/Gems/1.8/gems/dm-core-1.0.0/lib/dm-core.rb:22: warning: already initialized constant Mash (eval): [BUG] Segmentation fault ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]

I suspect multiple require happens here, which may have something to do with ruby version compatibilities(Correct me if I am wrong). Has anyone seen a similar problem like this?Im using rubygem 1.8.17, rails 3.0.7, bundler 1.0.22 and no rvm. Thanks

kasperite
  • 2,460
  • 1
  • 15
  • 17
  • It seems that you are requiring two DataMapper mappers at once. What happens when you require only one mapper? – Samy Dindane May 31 '12 at 23:05
  • Hiya, if you get a segmentation fault: "its usually because of your native gem compilation problem" **or** can be other reason; you can try 2 things to start with: **1)** Try rebuilding your gems including your data-mapper gem **2)** reinstalling the ruby which is not that hard like this: http://blog.phusion.nl/2012/05/09/how-to-fix-the-ruby-1-9-httpsbundler-segmentation-fault-on-os-x-lion/ ; Hope this helps and if it does let me know I will set it as answer! Cheers! – Tats_innit May 31 '12 at 23:11
  • I went for 2nd solution and fixed it. Got some tip from here as well: [link](http://stackoverflow.com/questions/6786983/how-do-i-get-gem-install-to-work-on-os-x-lion-with-ruby-1-8-7-without-seg-faul). Thanks dude – kasperite Jun 05 '12 at 22:20

2 Answers2

3
bundle exec rake db:migrate

Can you try the command above?

beck03076
  • 3,268
  • 2
  • 27
  • 37
  • Hi @beck03076, yes it should have "rake" command there, I miss typed it, the problem still occurs though thanks – kasperite May 31 '12 at 23:11
0

I was having a similar problem and the following link answered it for me. I know the title appears to be talking about something else entirely, but take a look.

Why can't I install Rails on Lion using RVM?

Best of luck!

Community
  • 1
  • 1
Eytan
  • 1,825
  • 17
  • 24