Ruby, RVM, LLVM and MySQL

后端 未结 6 680
旧巷少年郎
旧巷少年郎 2020-12-07 12:42

I\'m having big trouble in configuring Ruby and MySQL on MacOSX. Just a fact, I\'m new on MacOSX and Ruby On Rails.

So, first I was having problems to install mysql2

6条回答
  •  醉话见心
    2020-12-07 13:15

    Unfortunately, you're trying Rails at a bit of a bad time. There's a lot of transition at the moment, as others have mentioned Xcode 4.2 was recently released and has a new compiler, also Ruby 1.9.3 came out.

    I've been developing Ruby and Rails for some years now, but trying to get up and running again after installing Lion clean this week has been more problematic than in the past.

    First, make sure RVM is up to date (as the issue should be fixed):

    rvm get head
    

    Then try installing like so:

    CC=/usr/bin/gcc-4.2 rvm install 1.9.3 --enable-shared
    

    EDIT:

    Note, working through my own issues I believe the first command probably fixed the problem. The second wouldn't have provided any benefit over:

    rvm install 1.9.3
    

    As on my clean install, /usr/bin/gcc-4.2 doesn't exist.

    Also I wanted to add that I ended up compiling the older GCC manually for those situations where the new compiler fails. I followed this very informative blog post.

提交回复
热议问题