There are 3 main components to the installation process for developers:
- Install Homebrew or Linuxbrew
- Install RVM and rubies
- Install project dependencies
- Setup the Rails application
- Setup the Ember application
Homebrew and Linuxbrew are package managers for Unix-based operating systems. They make setting up development environments and installing required packages super easy, including dependency management. They'll also allow us to use standardized insturctions for the rest of the install process.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
We use RVM, Ruby Version Manager, to keep track of the current Ruby version. We try to operate on the latest stable version of Ruby, so this should generally work for you.
\curl -sSL https://get.rvm.io | bash -s stable --autolibs=homebrew
Git is a version-control system for source code.
brew install git
brew install yarn
Postgres is a relational datastore.
brew install postgres
Rails is the backend framework we're using to persist, manage, and query data. It uses Postgres as the primary datastore.
Inside the server directory, install Rails:
- Install bundler
gem install bundler
- Install the gems for the project
bundle install
Ember is the client-side framework we're using to create the user interface and manage data in browser.
Inside the client directory, install Ember:
- Install ember-cli
yarn global add ember-cli
- Install node modules
yarn install
- Install bower components
bower install
Awesome, you should be all set up and ready to go now!
Rails binds to localhost:3000
.
rake db:setup
If this doesn't work, do gem install rake
first.
rails s
If this doesn't work, do gem install rails
first.
We're going to proxy Ember's server side hits to Rails. This makes config much easier!
Ember binds to localhost:4200
.
ember serve --proxy http://localhost:3000
Don't hesistate to let us know if you have any questions or concerns!