New iMac snowleopard : need ruby on rails set up
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 mac开发者_高级运维hine 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
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.
Here's the steps I use when starting out with a new Snow Leopard system:
- Install the latest OS X developer tools (install w/out iPhone tools)
- Install the 64-bit MySQL dmg package w/ default settings
- Run
env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
- 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:
rvm_archflags="-arch x86_64"
rvm install 1.8.7
精彩评论