Thanks to visit codestin.com
Credit goes to github.com

Skip to content

David-Dashboard/web

Repository files navigation

Teknologkåren LTH

This is the repository containing the code for the Rails application acting as a CMS system for Teknologkåren at LTH

Development setup

Pre-setup

  1. Use a Linux/OSX environment, if developing on Windows use vagrant and follow the instructions below to easily set up a vm.
  2. Install the development requirements
  3. PostgreSQL as Database manager
  4. ImageMagick
  5. NodeJS, Rails uses a execjs runtime to precompile assets
  6. Ruby - It is good to use an environment manager to handle different versions, - rbenv works good, - ruby build allows installing of different ruby versions.

Setup

  • run bin/setup to download and install gems, setup database and add some development data,
  • run rails s to start the server,
  • rails c gives access to the rails console.

Notes

Most configuration is stored in either config/application.rb or config/enviroments/production.rb Configuration for the mailer is located in config/enviroments/production.rb Credentials are stored in environment variables and accessed in the secrets.yml file

The site is currently hosted on Heroku, and is started using the Procfile. CoffeeScript is used for some behavior instead of JavaScript, and SCSS is used to make CSS more organized and efficient.

Vagrant (for Windows)

#!sh
  vagrant up
  vagrant ssh
  cd /vagrant
  bin/bundle install --without production
  bin/rake db:create db:migrate
  TRUSTED_IP=`netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10` bin/rails s

The reasons for using rails s with TRUSTED_IP is to make sure better_errors is working as it should on the Vagrant machine. If better_errors doesn't work try using: TRUSTED_IP=0.0.0.0/0 rails s

About

Website of The student union at Lund Universiy, Facutly of engineering (TLTH)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors