Getting Started with SNIP Server
From Nate's Programming Wiki
Getting Started with SNIP Server
- Download and Install ruby, gem, and rails by following the instructions on http://rubyonrails.org/.
- Download and Install MySQL 5.0 or later from http://www.mysql.com/.
- Checkout the snip-server project from subversion.
- in the db directory, copy the database-example.yml to database.yml and modify it for your local MySQL environment.
Setting up the Database
- First bring up a terminal/command window.
- cd to the snip-server directory where you checked out the project.
- Run the following command to setup the databases and user.
mysql -u root -p < db/database-setup.ddl
- Enter your root password when prompted.
- If that finished without error, then enter this command:
rake db:migrate
- This will create all the necessary tables using the database.yml that you configured.
Starting the rails server
- Make sure you are in the snip-server directory, then from a terminal/command window type:
linux/Mac: script/server windows: ruby script/server
- This should startup the rails server on port 3000, verify by going to the following address http://localhost:3000. You should see the ruby on rails welcome page.
- To see a list of users currently registered, got to http://localhost:3000/users.
That is it you are ready to begin coding or testing against the snip-server. If you have any questions, contact Nate Minshew (nminshew@gmail.com)