- Make sure to install Xcode 7.x (7.0.1 at the time of this writing) via the Mac App Store
- Install El Capitan via Mac App store
- Ensure Xcode command line tools are installed
xcode-select --install
- Clicked install to get tools
Brew
I use home brew to manage most software needed for development. A few fixes are needed for El Capitan. Run brew doctor and fix the issues:
brew doctor
These are the commands I ran:
sudo chown -R $(whoami):admin /usr/local
echo export PATH='/usr/local/sbin:$PATH' >> ~/.bash_profile
brew update
brew install gpg
The first one is important to fix permissions due to changes in the new OS. The last one was from a recommendation on this post.
MySQL
If you use MySQL in your development, you will likely run into the following error when trying to start rails:
=> ~/web_app/ bundle exec rails s
/Users/Nick/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/rails-5414adf39362/activesupport/lib/active_support/dependencies.rb:251:in 'require': dlopen(/Users/Nick/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mysql2-0.3.13/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from: /Users/Nick/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mysql2-0.3.13/lib/mysql2/mysql2.bundle
from script/rails:6:in 'require'
from script/rails:6:in '<main>'
Resolution
- Uninstalled mysql 5.6
- Warning: this will delete ALL MySQL databases on your machine, be sure to take backups or follow a different process if you need to keep your data
- Shut down current running instance (kill the process if needed)
- Remove files:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/var/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/MySQL*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /private/var/db/receipts/*mysql*
- Installed MySQL 5.6 via home brew
- Confirmed brew was going to install 5.6.26 via
brew info mysql
(which fortunately was exactly the version I needed). If you need an earlier version, there will likely be a few more steps needed.
- Confirmed brew was going to install 5.6.26 via
Update: you will likely need to force the version now, as Brew has moved on to a newer version (if, you need to nail down 5.6 that is):
brew tap homebrew/versions
brew install mysql56
Otherwise to get the latest stable version:
brew install mysql
Followed command to start automatically and right away:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
At this point Rails booted successfully! (It just didn't have the database or users, so run your bootstrap commands to seed your database.)
Java - for rubymine, etc
- Run
java
, which prompts with a dialog that has a button "More Info" which takes you to a website where you can accept the license and download the Java .dmg file.- You need the JDK, not the JRE, if you intend to run java command-line based tools.
- Once downloaded, open the .dmg (for me it was jdk-8u60-macosx-x64.dmg) and install, then restart iTerm.