1

I'm a front end developer. I'm going to collaborate on some RoR jobs with some other developers, and I'm new to the "svn/git terminal/RoR" way of developing.

I'm getting behind on work trying to figure out how to configure my machine with rails 3 and gems and it's just becoming a mess!

So if anyone out there is available to ichat/screenshare and can just get my machine to a functioning point, that would be awesome.

I've installed RVM, macports, and fink.

Specifically mysql2 is totally dodging an install. When I run 'rails server' I get

Could not find gem 'mysql2 (>= 0, runtime)' in any of the gem sources listed in your Gemfile. Try running bundle install.

I run the bundle install, then a bundle update. No change

ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /Users/cyrilcelestine/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb * 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

apaderno
  • 28,547
  • 16
  • 75
  • 90
user388069
  • 155
  • 1
  • 1
  • 10
  • I did not down-vote this (I hate it when people down-vote w/o comment - it really grinds my gears), but this site is more aimed at Q&A versus do it for me. Perhaps if you re-word your question, include how you've installed the components you're having trouble with, detailed error messages, etc... - maybe the community can help. – Brian Dec 08 '10 at 23:34
  • Also, try running `gem install mysql2`, that may give more information... – Brian Dec 08 '10 at 23:36
  • Thanks, just hoping to catch a break. Been trying gem install mysql2 also followed hivelogic on how to install. Ahh, I don't know what to do. – user388069 Dec 08 '10 at 23:42
  • Any errors when you do `gem install mysql2`? If so, post them in your question. – Brian Dec 08 '10 at 23:50

2 Answers2

1

i don't know that you're going to find anyone to volunteer and set your machine up, though if you're willing to pay for time I'm sure someone would be willing to help you.

In the short-term, I'd stay away from fink and macports in favor of homebrew (https://github.com/mxcl/homebrew). Most likely what you're running into is an incompletely installed mysql2 gem because of missing development headers. That's just a guess, but its consistent with your question.

Keith Gaddis
  • 4,113
  • 23
  • 20
  • +1 for Homebrew. Budget time to read the docs! Don't skip any steps. If you follow the directions, it will work. – jdl Dec 08 '10 at 23:56
1

Here's the steps I use when starting out with a new Snow Leopard system:

  1. Install the latest OS X developer tools (install w/out iPhone tools)
  2. Install the 64-bit MySQL dmg package w/ default settings
  3. Run env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
  4. Bundle install

Note: If you want to use RVM (and I recommend you do), You will need to run the following to install Ruby 1.8.7:

  1. rvm_archflags="-arch x86_64"
  2. rvm install 1.8.7
Peter Brown
  • 50,956
  • 18
  • 113
  • 146