Choose how you will setup your project:
- Setup on my local machine (aka... I already have Ruby on Rails installed)
- Setup in a cloud-based dev environment: Cloud9 (aka... I do NOT have Ruby on Rails installed)
If you don't have Ruby on Rails already installed on your machine, I HIGHLY recommend following the steps for Cloud9 Setup instead!
Do you already have Ruby on Rails successfully installed on your machine?
Only if you already have successfully installed Ruby on Rails on your local machine, follow these steps:
- Git clone this repo onto your local machine.
- In the terminal, type
git clone https://github.com/traumverloren/railspet.git
- Make sure you are in your projects folder or wherever you want to store your projects.
- In the terminal, type
- Navigate into this folder by typing
cd railspet
- Next, type:
bundle install
- Then, type:
bin/rake db:migrate
- Assuming there were no error messages, you are almost there!
- Time for a sanity check.
- In the terminal, type:
bin/rails server
- This will start the rails server so we can preview our app.
- Open a new browser window and go to:
localhost:3000
. You should see the title My Pets. Woohoo! Success! Party time! - To stop the rails server, in the terminal, press the
CTRL
key &c
If these steps were not successful for you, no fear! You can easily set this up on a web-based dev environment, Cloud9... See below!
This is the easiest way to get this project up and running no matter what OS or computer setup you have!
- Go to: c9.io. Setup an account. It's totally free!
- Click on
+ create a new workspace
under workspaces. - In the Create a New Workspace page, fill in the necessary information:
- Fill in the Workspace name with
railspet
- Add a Description if you like.
- Make sure Hosted workspace tab is selected and fill in as follows:
- Make sure
Public
is selected. - Fill in Clone from Git or Mercurial URL with
https://github.com/traumverloren/railspet.git
- Make sure
- Don't worry about selecting anything in Choose a template!
- Click on Create Workspace.
- When the project workspace loads, then click on + sign in the bottom half of the screen and select New Terminal.
- In the terminal window, type:
bundle install
- Note this step might take a minute or 2!
- Hang in there... you are almost done! :-)
- Next in the terminal, type:
bin/rake db:migrate
- And finally, let's preview the app! In the terminal, type:
rails s -p $PORT -b $IP
. - Then, click on Preview on the top toolbar.
- Tada! You should see
My Pets
and be able to add a new pet!
Are you stuck? If you are having issues with the setup, don't fret! Reach out to me or post a message on the RailsGirls-NL meetup page. Also, please come early to the meetup, and we'll help you out before the workshop officially begins!