Coder Social home page Coder Social logo

ou-pacs-at / salsa Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 174.82 MB

SALSA Syllabus Editor

License: Other

Shell 0.06% Ruby 9.34% JavaScript 9.00% CoffeeScript 0.03% CSS 3.92% HTML 65.65% SCSS 11.94% Less 0.06%
ruby rails salsa ou pacs academic-technology at syllabus-management

salsa's Introduction

Salsa

Styled and Accessible Learning Service Agreements

Visit syllabustool.com for more information

Setting up a Ruby on Rails development environment (Mac OS X 10.10)

Install Homebrew

First, we need to install Homebrew. Homebrew allows us to install and compile software packages easily from source.

Homebrew comes with a very simple install script. When it asks you to install XCode CommandLine Tools, say yes.

Open Terminal and run the following command:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installing Ruby

Now that we have Homebrew installed, we can use it to install Ruby.

We're going to use rbenv to install and manage our Ruby versions. https://github.com/sstephenson/rbenv

To do this, run the following commands in your Terminal:

brew install rbenv ruby-build

# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile

# Install Ruby
rbenv install 2.0.0-p481
rbenv global 2.0.0-p481
ruby -v

Configuring Git

We'll be using Git for our version control system so we're going to set it up to match our Github account. If you don't already have a Github account, register for free here: https://github.com/

Replace the example name and email address in the following steps with the ones you used for your Github account.

git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "[email protected]"
ssh-keygen -t rsa -C "[email protected]"

#example
git config --global color.ui true
git config --global user.name "idbygeorge"
git config --global user.email "[email protected]"
ssh-keygen -t rsa -C "[email protected]"

The next step is to take the newly generated SSH key and add it to your Github account. You want to copy and paste the output of the following command:

cat ~/.ssh/id_rsa.pub

Login to GitHub. Click on the gear symbol (upper right-hand corner and select Settings. On the left-hand "Person settings" navigation, click on "SSH Keys". Click "Add SSH Key". Give the key a Title and Paste the public key into your GitHub account.

Once you've done this, you can check and see if it worked:

You should get a message like this:

Hi User! You've successfully authenticated, but GitHub does not provide shell access.

Installing Rails

Installing Rails is as simple as running the following command in your Terminal:

gem install rails -v 4.0.0

Rails is now installed, but in order for us to use the rails executable, we need to tell rbenv to see it:

rbenv rehash

And now we can verify Rails is installed:

rails -v

should return

Rails 4.0.0

You can install PostgreSQL server and client from Homebrew:

brew update
brew doctor
brew install postgresql

Once this command is finished, it gives you a couple commands to run. Follow the instructions and run them:

# To have launchd start postgresql at login:
ln -sfv /usr/local/opt/postgresql/*plist ~/Library/LaunchAgents

# Then to load postgresql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
By default the postgresql user is your current OS X username with no password. For example, my OS X user is named chris so I can login to postgresql with that username.

Development Installation Notes OS X

Requires Ruby 1.9+, Rails 4.0.0

(2.0.0-p481 works with the debugger gem, the latest didn't)

Clone repository

git clone https://github.com/idbygeorge/salsa.git
cd salsa

Install postgres database using Homebrew

brew update
brew doctor
brew install postgresql

Copy config/database.yml.default paste to config/database.yml, change as necessary.

Should look like:

development:
  adapter: postgresql
  encoding: unicode
  database: salsa_development
  pool: 5
  username: [by default OS X username]
  password:
  host: localhost

test:
  adapter: sqlite3
  encoding: unicode
  database: salsa_test
  pool: 5
  username: salsa
  password:
  host: localhost

production:
  adapter: postgresql
  encoding: unicode
  database: salsa_production
  pool: 5
  username: [by default OS X username]
  password:

Copy config/config.yml.default paste to config/config.yml, change as necessary.

bundle install
bundle exec rake db:create db:migrate

To run the server, from the project root type:

rails server

Goto http://localhost:3000 (ctrl + c shutsdown the server)

Production Notes

  • OS: Ubuntu 12.04
  • Web server: nginx, unicorn
  • Database: PostgreSQL

Deploy through Capistrano

Copy config/deploy/production.rb.default paste to config/deploy/production.rb, change as necessary.

cap production deploy

salsa's People

Contributors

codingfoo avatar duniken avatar idbygeorge avatar john-pope avatar llamapope avatar megan-popetech avatar oxtralite avatar pacsat avatar wapoillion avatar will-pope avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.