GithubHelp home page GithubHelp logo

xingyif / lvm-rails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from literacyvolunteersofma/lvm-rails

0.0 2.0 0.0 731 KB

Production: https://lvm-db.herokuapp.com/ || Stage: https://lvm-rails.herokuapp.com/

Ruby 69.83% JavaScript 0.46% CSS 1.33% HTML 28.27% Shell 0.12%

lvm-rails's Introduction

README

Build Status Code Climate Coverage Status

Deploy

This is a service learning project for CS4500 Spring 2017.

See the live version here: https://lvm-rails.herokuapp.com/

Instructions detailed for MacOS; however, it can easily be adapted to linux/unix environments

To get started, fork and clone down the repo as defined in the git flow article.

Getting Set Up

This section will walk through the installation of everything you'll need to get up and running. We'll be installing:

  1. Homebrew
  2. RVM
  3. Ruby
  4. Rails

Homebrew

Firstly, make sure you have standard command line tools installed for MacOS:

xcode-select --install

Agree to the prompts and wait until it has finished.

Now, run the following to install Homebrew (taken from the Homebrew front page):

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

RVM, Ruby, and Rails

RVM is a ruby version manager that allows you to easily install and switch between different ruby versions on the fly.

Running the following command will install RVM along with the latest version of ruby and rails:

curl -L https://get.rvm.io | bash -s stable --auto-dotfiles --autolibs=enable --rails

In order to bundle the dependancies for the rails app, you need to install the bundler gem:

gem install bundler

Running Locally

Once you've run through the initial setup, its time to get your local version up and running.

While inside the cloned repo:

bundle install

Note: If you get an error installing Nokogiri, try running the following command:

gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib/

After everything installs we need to run database migrations to setup our local database:

rake db:migrate

Now you're all set to run the rails server:

rails server

Now you're all set to run the rails server:

rails server

The application should be running and accessible at http://localhost:3000!

Explanation of relevant Rake (Ruby Make) Tasks:

rake db:drop

Drop the database.

rake db:create

Create a new database

rake db:migrate

Run all of the migration files in db/migrate in order. This brings the schema.rb file, which describes the database, up to date with the files in the directory.

rake db:seed_fu

Use the files in db/fixtures/ to seed the development database.

rake db:reseed

Drops, creates, migrates, and reseeds the database.

Seeding the database

Run rake db:seed_fu to seed the database with:

  • 5 Affiliates
  • 13 Coordinators
  • 100 Tutors
  • 100 Students
  • 100 Student/Tutor Matches
  • 100 Tutoring Sessions
  • 20 Student Assessments
  • 20 Tags
  • 3 user accounts

Troubleshooting

  • If you get "ActiveRecord::PendingMigrationError", this means that you need to migrate your database; that is, the application is expecting a newer version of your database schema than you have current set up. Simply run:
    rake db:migrate
    

lvm-rails's People

Watchers

 avatar  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.