concept exec in category rails

This is an excerpt from Manning's book Rails 4 in Action: Revised Edition of Rails 3 in Action.
Because this is your first time running migrations in your Rails application, and because you’re using a SQLite3 database, Rails first creates the database in a new file at db/development.sqlite3 and then creates the purchases table inside that. When you run bundle exec rake db:migrate, it doesn’t just run the change method from the latest migration, but runs any migration that hasn’t yet been run, allowing you to run multiple migrations sequentially.
Your application is, by default, already set up to talk to this new database, so you don’t need to change anything. If you ever wanted to roll back this migration, you’d use bundle exec rake db:rollback, which rolls back the latest migration by running the down method of the migration (or reverses the steps taken in the change method, if possible).
You’ve effectively rewritten a large portion of this feature, which is common practice when implementing such large changes. The assign_role! method will create a new Role record and will be responsible for giving the specified user a role on the specified project. This method is currently undefined, so when you run bundle exec rspec spec/features/viewing_projects_spec.rb, it complains about that:
The output from bundle exec rspec provided a list of the broken features: they’re your chunks. Let’s go through them and fix them, starting with the ticket-creation feature.
Now that spec file should pass, too. Double-check with bundle exec spec/features/hidden_links_spec.rb:
5 examples, 0 failuresThat was fast! All of the failing features are fixed. Well, so you hope. You’ve independently verified them, but run bundle exec rspec to make sure nothing else is broken:
37 examples, 0 failures, 1 pendingThere’s one pending spec from spec/models/role_spec.rb. You can delete this file now, and then when you rerun bundle exec rspec, you’ll see this output: