Join Kevin Skoglund for an in-depth discussion in this video Using the exercise files, part of Ruby on Rails 4 Essential Training.
If you are a premium member of the lynda.com training library, you will have access to the exercise files that are used throughout this title. The exercise files for this title are arranged by chapter and by movie and you can find the exercise files that correspond to the movie that you're watching by first looking for the chapter number and then the movie number. In order to make use of the exercise files, you'll also want to make sure that you first install the software, as shown in chapters two and three, which is Ruby, RubyGems, Ruby on Rails, and MySQL.
Once you're confident that you have everything installed, then you will want to copy the folder of exercise files into your web directory or another convenient location. It's always a good idea to make a copy, so that you'll still have the original to refer back to if you make changes. On my Mac, I'm going to put those into my sites directory, which is inside my user directory, and which we created during the installation chapter. I'll open that up, and then, I'll option drag over the exercise files to create a new copy. Now, your files will be the same as mine at the start of the movie, and you'll be able to work right along with me.
Don't forget that you can also use the exercise files, to check your work as you go along. Beginning in chapter six we'll be incorporating a database into our project. An for the exercise files to work, your database needs to match what the files expect. After moving the files to the correct location, you will want to make sure that you have a database created. An if you set a different database password than I did, change your configdatabase.yml file, to use your password instead of mine. Then, go to your command line. And navigate to the root of your application.
From there you can run rake space o t l colon import. To run an import script which will import the data the code needs. That I'll be using in the movie. Emoarding can aslo be useful if you do a lot of experimenting on your own, but then want to get your data back in sync with mine. The script will walk you through the process, with a series of prompts. If in doubt, you should be able to select the default option, for each one of those. Yes, I do want to proceed. I know I will be wiping out existing database data. I could hit Return to except local host as my, host name.
I can hit return to accept simple_cms_development if that's the name of my database and if the username used to connect to the database is simple_cms then I can hit return again. And then the import file path should be inside those exercise files at that location. Inside the database folder inside the file called simple_cms_development.sql. Once you get there you'll want to type in your password. And then it says import complete. Now both your files and your database will be in sync with mine and you'll be ready to follow along with me.
- Why use Ruby on Rails?
- Installing Ruby on Rails on Mac and Windows
- Rendering templates and redirecting requests
- Generating and running database migrations
- Creating, updating, and deleting records
- Understanding association types
- Using layouts, partials, and view helpers
- Incorporating assets using asset pipeline
- Validating form data
- Authenticating users and managing user access
- Architecting RESTful applications
- Debugging and error handing
Skill Level Beginner
1. What Is Ruby on Rails?
2. Installing Ruby on Rails on a Mac
3. Installing Ruby on Rails on a Windows Machine
4. Getting Started
5. Controllers, Views, and Dynamic Content
6. Databases and Migrations
7. Models, ActiveRecord, and ActiveRelation
9. Controllers and CRUD
10. Layouts, Partials, and View Helpers
13. Data Validation
14. User Authentication
15. Improving the Simple CMS
16. REST and RESTful Routes
17. Debugging and Error Handling
18. Introducing More Advanced Topics
Next steps1m 40s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.