From Zero to Rails Hero in 11 Easy Steps (Installing Rails on OS X 10.6.5)

This is the easiest, fastest and best-to-develop-in way to get a rails dev stack up and running on OS X 10.6 (Snow Leopard).

I actually find that it’s pretty easy, if everything is done in the right order.

  1. Install XCode
  2. Install Homebrew
    $ ruby -e "$(curl -fsSL"
  3. Install git using homebrew
    $ brew install git
  4. Install mysql using homebrew
    $ brew install mysql
  5. Install rvm (and follow the instructions to set up bash and don’t forget to open a new terminal window)
    $ bash < <( curl )
  6. Install Ruby Enterprise Edition
    $ rvm install ree
  7. Make REE the default Ruby
    $ rvm use ree --default
  8. Tell rubygems to not install rdocs
    Put the following lines in ~/.gemrc

    install: --no-rdoc --no-ri
    update: --no-rdoc --no-ri
  9. Install Passenger
    $ gem install passenger

    Now follow that up by running the install script (and follow the directions)

    $ ./passenger-install-apache2-module

    At the end of the install process it will give you instructions to add 3 lines to the “Apache configuration file”, but it won’t tell you *where* your apache config file is. It’s at /etc/apache2/httpd.conf

  10. Restart Apache
    At this point, if you’re using 10.6.5, you might do a sudo /etc/apachectl restart and run into the following error:
    /usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argumentTo fix this, edit /usr/sbin/apachectl and change ULIMIT_MAX_FILES to an empty string.

    Now you can restart apache.

  11. Install PassengerPane 1.3

BOOM! Done.

Well, for me, I had to `gem install isolate` and Rubymine and then I was done, but you get the idea. Just load up the Passenger Preference Pane, point at site at a rails project on your hard drive, and load it up in your browser. Assuming your rails app will boot, you should be good to go!

NoSQL: If Only It Was That Easy

The biggest thing in web apps since “rails can’t scale” is this idea that “your rdbms doesn’t scale.” This has gone so far as to be dubbed the coming of age for “nosql” with lots of blog posts and even a meetup. Indeed, there are many promising key-value stores, distributed key-value stores, document oriented dbs, and column oriented db projects on the radar. This is *definitely* a great thing for the web application scene and this level of variety will definitely open doors for organizations large and small in the near and long term.

However, along with these great tools, an attitude that “the rdbms is dead” has popped up, and while that may be true in the long run, in the short term, it’s definitely premature.