Skip to content

Instantly share code, notes, and snippets.

@morr
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save morr/8841465 to your computer and use it in GitHub Desktop.

Select an option

Save morr/8841465 to your computer and use it in GitHub Desktop.
настройка osx для работы с rails проектом
# запустить 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
@morr
Copy link
Copy Markdown
Author

morr commented Aug 18, 2014

восстановление из бекапа psql --set ON_ERROR_STOP=on uptimus_production < PostgreSQL.sql

@hbda
Copy link
Copy Markdown

hbda commented Nov 18, 2014

сделать бекап на продакшене

/usr/bin/zsh -i -c "source /home/uptimus/.rvm/scripts/rvm && backup perform --trigger uptimus"

@pandamako
Copy link
Copy Markdown

что бы поставить rmagic надо поставить brew install imagemagick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment