Skip to content

Instantly share code, notes, and snippets.

@doncruse
Forked from pengwynn/Rails 3 Environment
Created April 5, 2011 23:05
Show Gist options
  • Select an option

  • Save doncruse/904770 to your computer and use it in GitHub Desktop.

Select an option

Save doncruse/904770 to your computer and use it in GitHub Desktop.

Revisions

  1. doncruse revised this gist Apr 6, 2011. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions Rails 3 Environment
    Original file line number Diff line number Diff line change
    @@ -72,11 +72,10 @@ sudo apachectl restart

    # MySQL (if you like, or choose postgresql)
    brew install mysql
    mysql_install_db
    # I ran into an error when I ran this...
    # solution was to first run this: ./bin/my_print_defaults
    unset TMPDIR
    mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
    cp /usr/local/Cellar/mysql/5.1.49/com.mysql.mysqld.plist ~/Library/LaunchAgents
    mysql.server start
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    mysql_secure_installation
    # Follow instructions

  2. doncruse revised this gist Apr 6, 2011. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion Rails 3 Environment
    Original file line number Diff line number Diff line change
    @@ -72,8 +72,13 @@ sudo apachectl restart

    # MySQL (if you like, or choose postgresql)
    brew install mysql
    mysql_install_db
    # I ran into an error when I ran this...
    # solution was to first run this: ./bin/my_print_defaults
    cp /usr/local/Cellar/mysql/5.1.49/com.mysql.mysqld.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    mysql.server start
    mysql_secure_installation
    # Follow instructions

    # Postgresql (if you prefer, instead of mysql)
    brew install postgresql
  3. doncruse revised this gist Apr 5, 2011. 1 changed file with 51 additions and 33 deletions.
    84 changes: 51 additions & 33 deletions Rails 3 Environment
    Original file line number Diff line number Diff line change
    @@ -1,65 +1,83 @@
    # 2010-10-01
    # 2011-04-05
    #
    # Mac OS X 10.6.3
    # Homebrew 0.7
    # Xcode 3.2.4
    # Git 1.7.3.1
    # RVM 1.0.12
    # Mac OS X 10.6.7
    # Homebrew 0.8
    # Xcode 4.0.1
    # Git 1.7.4.3
    # Ruby 1.9.2, 1.8.7
    # Rails 3.0.0
    # Passenger 3.0.0.pre4
    # MySQL 5.1.49
    # Memcached 1.4.5
    # ImageMagick 6.6.4-5
    # Rails 3.0.5
    # RVM 1.5.2
    # Passenger 3.0.6
    # MySQL 5.5.10
    # Memcached
    # ImageMagick

    # Make sure you have Snow Leopard
    # updated to include the Mac App Store

    # Install Snow Leopard.
    # Xcode
    # If you're a paid Mac or iOS developer, then get your free copy.
    # Otherwise, it's $4.99 through the Mac App Store. That's a 4.5GB download,
    # so make some other plans while that downloads.
    # You need XCode first because it contains the compilers and other
    # development tools necessary for some of these other steps to work.

    # Dotfiles
    # open Terminal.app
    echo "$(curl -fsS https://gist.github.com/raw/606100/.profile)" > ~/.profile
    echo "$(curl -fsS https://gist.github.com/raw/606087/.bashrc)" > ~/.bashrc
    echo "$(curl -fsS https://gist.github.com/raw/606102/.bash_profile)" > ~/.bash_profile
    echo "$(curl -fsS https://gist.github.com/raw/606107/.gitignore)" > ~/.gitignore
    echo "$(curl -fsS https://gist.github.com/raw/606105/.rvmrc)" > ~/.rvmrc
    # Close Terminal window.

    # Homebrew
    ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)"

    # Xcode
    # Download Xcode from developer.apple.com because the version on the DVD is
    # buggy and doesn't agree with RVM. It's a 3 GB download, so take a break or
    # set up some of your personal interface preferences.

    # Software Update
    # You'll have to do it a few times to get back up to speed.
    # Homebrew (package manager that gives you the "brew" command used next)
    ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"

    # Git
    brew install git
    brew update
    brew upgrade

    # RVM
    # RVM (ruby version manager -- you definitely want this)
    bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

    # If it's your first install of RVM, you need to edit your bashrc file again
    # Open Terminal.app
    # Use a text editor (vim or the like) to open .bashrc
    # Add this at the end --- substituting your own login name as appropriate: [[ -s "/Users/YOUR_NAME_HERE/.rvm/scripts/rvm" ]] && source
    "/Users/YOUR_NAME_HERE/.rvm/scripts/rvm"
    # Now close the terminal app & restart, to reload this configuration file

    # Now install rubies into RVM, choosing the modern 1.9.2 as the default
    # (These first two commands take more time than you might expect.)
    rvm install 1.8.7
    rvm install 1.9.2
    rvm 1.9.2 --default

    # Rails
    gem install rails
    # Rails - installs rails and all of its dependencies, skipping the doc files
    gem install rails --no-rdoc --no-ri

    # Passenger
    #### From here down is optional
    ##

    # Passenger (so rails apps on the local machine behave more like most servers)
    gem install passenger
    passenger-install-apache2-module
    # Follow instructions.
    # You'll be prompted by the installer to make some edits to the Apache config file, # which should be at /etc/apache2/httpd.conf on a Mac. You'll need sudo rights to
    # make edits to that file, so if you're using vim as your editor, invoke it as
    # sudo vim /etc/apache2/httpd.conf

    sudo apachectl restart

    # MySQL
    # MySQL (if you like, or choose postgresql)
    brew install mysql
    mysql_install_db
    cp /usr/local/Cellar/mysql/5.1.49/com.mysql.mysqld.plist ~/Library/LaunchAgents
    mysql.server start
    mysql_secure_installation
    # Follow instructions.
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

    # Postgresql (if you prefer, instead of mysql)
    brew install postgresql
    # then follow the suggestions for how to configure it

    # Memcached
    brew install memcached
    @@ -68,4 +86,4 @@ cp /usr/local/Cellar/memcached/1.4.5/com.danga.memcached.plist ~/Library/LaunchA
    # ImageMagick
    brew install imagemagick

    # Reboot.
    # Reboot.
  4. @pengwynn pengwynn revised this gist Mar 15, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Rails 3 Environment
    Original file line number Diff line number Diff line change
    @@ -48,7 +48,7 @@ rvm 1.9.2 --default
    gem install rails

    # Passenger
    gem install passenger --pre
    gem install passenger
    passenger-install-apache2-module
    # Follow instructions.
    sudo apachectl restart
  5. @pengwynn pengwynn revised this gist Mar 13, 2011. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions Rails 3 Environment
    Original file line number Diff line number Diff line change
    @@ -15,11 +15,11 @@
    # Install Snow Leopard.

    # Dotfiles
    echo "$(curl -fsS http://gist.github.com/raw/606100/.profile)" > ~/.profile
    echo "$(curl -fsS http://gist.github.com/raw/606087/.bashrc)" > ~/.bashrc
    echo "$(curl -fsS http://gist.github.com/raw/606102/.bash_profile)" > ~/.bash_profile
    echo "$(curl -fsS http://gist.github.com/raw/606107/.gitignore)" > ~/.gitignore
    echo "$(curl -fsS http://gist.github.com/raw/606105/.rvmrc)" > ~/.rvmrc
    echo "$(curl -fsS https://gist.github.com/raw/606100/.profile)" > ~/.profile
    echo "$(curl -fsS https://gist.github.com/raw/606087/.bashrc)" > ~/.bashrc
    echo "$(curl -fsS https://gist.github.com/raw/606102/.bash_profile)" > ~/.bash_profile
    echo "$(curl -fsS https://gist.github.com/raw/606107/.gitignore)" > ~/.gitignore
    echo "$(curl -fsS https://gist.github.com/raw/606105/.rvmrc)" > ~/.rvmrc
    # Close Terminal window.

    # Homebrew
  6. @laserlemon laserlemon revised this gist Oct 1, 2010. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Rails 3 Environment
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@
    # Git 1.7.3.1
    # RVM 1.0.12
    # Ruby 1.9.2, 1.8.7
    # Rails 3.0.0
    # Passenger 3.0.0.pre4
    # MySQL 5.1.49
    # Memcached 1.4.5
  7. @laserlemon laserlemon created this gist Oct 1, 2010.
    70 changes: 70 additions & 0 deletions Rails 3 Environment
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,70 @@
    # 2010-10-01
    #
    # Mac OS X 10.6.3
    # Homebrew 0.7
    # Xcode 3.2.4
    # Git 1.7.3.1
    # RVM 1.0.12
    # Ruby 1.9.2, 1.8.7
    # Passenger 3.0.0.pre4
    # MySQL 5.1.49
    # Memcached 1.4.5
    # ImageMagick 6.6.4-5

    # Install Snow Leopard.

    # Dotfiles
    echo "$(curl -fsS http://gist.github.com/raw/606100/.profile)" > ~/.profile
    echo "$(curl -fsS http://gist.github.com/raw/606087/.bashrc)" > ~/.bashrc
    echo "$(curl -fsS http://gist.github.com/raw/606102/.bash_profile)" > ~/.bash_profile
    echo "$(curl -fsS http://gist.github.com/raw/606107/.gitignore)" > ~/.gitignore
    echo "$(curl -fsS http://gist.github.com/raw/606105/.rvmrc)" > ~/.rvmrc
    # Close Terminal window.

    # Homebrew
    ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)"

    # Xcode
    # Download Xcode from developer.apple.com because the version on the DVD is
    # buggy and doesn't agree with RVM. It's a 3 GB download, so take a break or
    # set up some of your personal interface preferences.

    # Software Update
    # You'll have to do it a few times to get back up to speed.

    # Git
    brew install git
    brew update
    brew upgrade

    # RVM
    bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
    rvm install 1.8.7
    rvm install 1.9.2
    rvm 1.9.2 --default

    # Rails
    gem install rails

    # Passenger
    gem install passenger --pre
    passenger-install-apache2-module
    # Follow instructions.
    sudo apachectl restart

    # MySQL
    brew install mysql
    mysql_install_db
    cp /usr/local/Cellar/mysql/5.1.49/com.mysql.mysqld.plist ~/Library/LaunchAgents
    mysql.server start
    mysql_secure_installation
    # Follow instructions.

    # Memcached
    brew install memcached
    cp /usr/local/Cellar/memcached/1.4.5/com.danga.memcached.plist ~/Library/LaunchAgents

    # ImageMagick
    brew install imagemagick

    # Reboot.