Running the website locally - WULF-USA/Official-Website GitHub Wiki
To view changes to the site locally, do the following to get started:
Download project
Run the following in your terminal (assuming you have git installed):
git clone https://github.com/WULF-USA/Official-Website.git
git checkout YOUR_BRANCH_NAME
Install Ruby
Visit https://rvm.io and follow the instructions for your platform. If you get the RVM is not a function
error, make sure RVM is on your path and restart your computer.
Next, install Ruby. We use 2.4.0
.
rvm install ruby-2.4.0
rvm use ruby-2.4.0
Install dependencies
cd
into the folder that contains the project files and run the following:
export RAILS_ENV=development
bundle install
If you get errors, you may need to install GCC to compile native extensions. See the Ruby documentation on how to do this.
Install services
You will need to install the following services. See each products documentation to see how to install it for your environment.
- Postgres >=9.3
- Redis
- Memcachier
Once they are installed, restart them to ensure they are running properly:
sudo service postgresql restart
sudo service redis-server restart
memcachier -d
Lastly, you will need to add a user and a database that ActiveRecord can use.
psql
CREATE DATABASE "wulfusa";
\password postgres
test
\q
Migrate the database
Any time you reset the database, reinstall postgres, or create a migration, you need to migrate the database schema. Run the following from the project root directory:
rake db:migrate
Set environment variables
TODO: ENV
Run the project
TODO: RUN