The New York Interschool Club Directory is an open source project built to connect
students with clubs and events within the consortium.
We recommend testing and developing using AWS Cloud9. The documentation below assumes you are working in that environment.
Step 1: Install the dependencies located in the project's Gemfile:
$ bundle install
Step 2: Start the MySQL server:
$ sudo service mysql start
Step 3: Enter the MySQL CLI (after you setup your user in Step 4, we recommend using those credentials to access the CLI):
$ mysql -u root -p
Step 4: Create a MySQL user (don't forget to change
mysql> CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
Step 5: Create a MySQL database:
mysql> CREATE DATABASE database_name;
Step 6: Link your user to your MySQL database (don't forget to change
password to match your configuration in Step 4):
mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';
Step 7: Refresh your MySQL privileges:
mysql> FLUSH PRIVILEGES;
Step 7: Configure the application for your MySQL database. Edit the database.yml file located in the
config directory (don't forget to change
MYSQL_PASSWORD to match your configuration in Steps 4 and 5):
20 development: 21 <<: *default 22 database: MYSQL_DATABASE 23 host: <%= ENV['IP'] %> 24 username: MYSQL_USERNAME 25 password: MYSQL_PASSWORD
Step 8: Migrate the database:
$ rake db:migrate
Step 9: Start the Rails application:
$ rails s -b $IP -p $PORT
NOTE: Whenever you start the application, make sure your MySQL database is running.
$ rake routes
Learn more about routes.
Create a new Controller:
$ rails g controller User
Learn more about generating a controller.
Create a new Model:
$ rails g model Post title:string body:text
Learn more about generating a model.
Create a new migration:
$ rails g migration add_user_id_to_comments user_id:reference
Learn more about running a migration.
Current Version: Beta v0.1.0 (pre-release)
- Sebastian Rodriguez '19 – The Browning School
- Aaron Grill – The Browning School
- Melodie Ting – The Browning School
Have an idea for a new feature? Want to help maintain the software? Contact your school's Computer Science Department Chair or Dean of Students to learn how to contribute. We encourage and depend on student and faculty participation. You must be affiliated the New York Interschool to contribute.