Proper Mac dev. environment with Rails and PHP
I've made a mess out of my MAMP setup. I used it all the time for WordPress and Drupal work, but now I want to try and learn Rails. Afte开发者_如何学Cr trying to get Rails installed, I now have 2 versions of MySQL competing with each other—and of course neither works anymore.
So: I'm wondering what the 'proper' way is to set this up so that they play nicely together.
Advice on setting up a 'proper' Mac OS development environment for PHP and Rails extremely welcome.
Thanks
Terry
Using Homebrew and RVM is the only way I recommend setting up a Rails environment on OS X these days. Homebrew gives you a really easy way to install and upgrade applications like MySQL, and RVM makes installing and working with Ruby a breeze. As far as working with PHP and Apache, you should be able to use the Homebrew MySQL install with the existing MAMP setup, as long as you turn off MAMP's MySQL server.
The only other thing you may need to do is install Apple's Xcode developer tools in order to compile the various packages.
Like someone wrote in the comments I will take the VM approach anytime. Just run a linux distribution in a virtual machine with all the modules you need. You can even run/ test different environments. Easy to setup/ upgrade/ replace and you don't have to fiddle around your working os.
I run osx (working environment) and a debian server installation in a virtual box as my webserver (running apache, php, mysql, rails). I switched over from a MAMP configuration and it saved me alot of stress and work (Think about upgrading different MAMP components, really is a pain sometimes)
精彩评论