Last active
August 29, 2015 13:56
-
-
Save morr/8841465 to your computer and use it in GitHub Desktop.
настройка osx для работы с rails проектом
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # запустить app store | |
| # установить xcode из апстора | |
| # в консоли: | |
| # homebrew | |
| ~ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
| ~ brew install curl | |
| ~ brew install libyaml | |
| ~ brew doctor | |
| # исправить все проблемы, о которых сообщил brew-doctor | |
| # ohmyzsh | |
| ~ curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh | |
| # взять конфиг .zshrc отсюда https://github.com/morr/configs | |
| # ctags для vim | |
| ~ brew install ctags | |
| # rvm | |
| ~ \curl -sSL https://get.rvm.io | bash -s stable | |
| ~ rvm pkg install openssl | |
| ~ rvm pkg install readline | |
| # ruby | |
| ~ rvm reinstall ruby-2.1.0 --with-openssl-dir=$rvm_path/usr | |
| # генерация ssh ключа | |
| ~ ssh-keygen -t rsa -C "ВАШ_EMAIL_ТУТ" | |
| # redis | |
| ~ brew install redis | |
| ~ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist | |
| # memcached | |
| ~ brew install memcached | |
| ~ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist | |
| # postgresql | |
| ~ brew install postgresql | |
| ~ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
| ~ psql -d postgres | |
| postgres=# create user uptimus_development with password 'смотри config/database.yml в проекте'; | |
| postgres=# alter user uptimus_development createdb; | |
| postgres=# create user uptimus_test with password 'смотри config/database.yml в проекте'; | |
| postgres=# alter user uptimus_test createdb; | |
| ~ psql -d uptimus_development | |
| postgres=# create extension hstore; | |
| ~ psql -d uptimus_test | |
| postgres=# create extension hstore; | |
| ~ rake db:create | |
| ~ rake db:schema:load | |
| ~ rake db:test:clone | |
| ~ rake db:seed |
Author
сделать бекап на продакшене
/usr/bin/zsh -i -c "source /home/uptimus/.rvm/scripts/rvm && backup perform --trigger uptimus"
что бы поставить rmagic надо поставить brew install imagemagick
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
восстановление из бекапа
psql --set ON_ERROR_STOP=on uptimus_production < PostgreSQL.sql