anchor.diff:        command: bundle exec rake cf:on_first_instance db:migrate && rails s -p $PORT
       </pre>
   
  -<p class="tip"><strong>Sample App Step</strong><br />You can skip this step. The <code>rails_sample_app</code> has no Rake tasks.</p>
  +### Step 2: Create and Bind a Service Instance for a RoR Application ###
   
  -### Step 3: Create and Bind a Service Instance for a RoR Application ###
  -
  -This section describes using the CLI to configure a PostgreSQL managed service instance for an app. <%=vars.dev_console_1%>
  -
  -<%=vars.product_short%> supports two types of service instances:
  -
  -* Managed services integrate with <%=vars.product_short%> through service brokers that offer services and plans and manage the service calls between <%=vars.product_short%> and a service provider.
  -* User-provided service instances enable you to connect your application to pre-provisioned external service instances.
  -
  -For more information on creating and using service instances, refer to the [Services Overview](./../../devguide/services/index.html) topic.
  +This section describes using the CLI to configure a PostgreSQL managed service instance for an app. <%=vars.dev_console_1%> For more information on creating and using service instances, refer to the [Services Overview](./../../devguide/services/index.html) topic.
   
   #### Create a Service Instance ####
   
  
positive.code: 
  If you want to view log activity while the app deploys, launch a new terminal window and run `cf logs [APP-NAME]`.
  
  Once your app deploys, browse to your app URL. Search for the `urls` field in the `App started` block in the output of the `cf push` command. Use the URL to access your app online.
  
  <p class="tip"><strong>Sample App Step</strong><br />
  Run <code>cf push rails_sample_app -n [HOST_NAME]</code>.
  <br /><br />
  Example: <code>cf push rails_sample_app -n jc0825-rails</code>
  <br /><br />
  The example below shows the terminal output of deploying the <code>rails_sample_app</code>. <code>cf push</code> uses the instructions in the manifest file to create the app, create and bind the route, and upload the app. It then binds the app to the <code>rails-postgres</code> service and follows the instructions in the manifest to start one instance of the app with 256M. After the app starts, the output displays the health and status of the app.
  </p>
  
  <pre class="terminal">
  
  	$ cf push rails_sample_app -n jmt2014-rails
  	Using manifest file /Users/pivotal/workspace/rails_sample_app/manifest.yml
  
  	Updating app rails_sample_app in org Cloud-Apps / space development as clouduser@example.com...
  	OK
  
  	Using route jmt2014-rails.<%=vars.app_domain%>
  	Uploading rails_sample_app...
  	Uploading app files from: /Users/pivotal/workspace/rails_sample_app
  	Uploading 445.7K, 217 files
  	OK
  	Binding service rails-postgres to app rails_sample_app in org Cloud-Apps / space development as clouduser@example.com...
  	OK
  
  	Starting app rails_sample_app in org Cloud-Apps / space development as clouduser@example.com...
  	OK
  
  	...
  
  	0 of 1 instances running, 1 starting
  	1 of 1 instances running
  
  	App started
  
  	Showing health and status for app rails_sample_app in org Cloud-Apps / space development as clouduser@example.com...
  	OK
  
  	requested state: started
  	instances: 1/1
  	usage: 256M x 1 instances
  	urls: jmt2014-rails.<%=vars.app_domain%>
  
  	     state     since                    cpu    memory          disk
  	#0   running   2014-08-25 03:32:10 PM   0.0%   68.4M of 256M   73.4M of 1G
  
  </pre>
  
  Let’s access your app online using its URL. In the terminal output, the `urls` field of the `App started` block contains the app URL. This is the `HOST_NAME` you specified with the `-n` flag plus the domain `<%=vars.app_domain%>`. The image shows the resulting webpage:
  
  <%= image_tag("../images/RoR_sample_webpage.png") %>
  
  
  ### Step 8: Test a Deployed App ###
  
  You’ve deployed an app to <%=vars.product_short%>!
  
  Use the `cf` <%=vars.dev_console_2%> to review information and administer your app and your <%=vars.product_short%> account. For example, you could edit the `manifest.yml` to increase the number of app instances from 1 to 3, and redeploy the app with a new app name and host name.
  
  See the [Manage Your Application with the cf CLI](#cli-manage) section for more information. <%=vars.dev_console_4%>
  
  ## <a id='cli-manage'></a>Manage Your Application with the cf CLI ##
  
  Run `cf help` to view a complete list of commands, grouped by task categories, and run `cf help [COMMAND]` for detailed information about a specific command. For more information about using the `cf` CLI, refer to the cf Command Line Interface (CLI) topics, especially the <%=vars.cli_v6%> topic.
  
  
negative.code: 
  <%=vars.GSG_intro_sentence%>
  
  This guide walks you through deploying a Ruby on Rails (RoR) app to <%=vars.product_full%>.
  
  <p class="note"><strong>Note</strong>: Ensure that your RoR app runs locally before continuing with this procedure.</p>
  
  ## <a id='deploy-yourapp'></a>Deploy a RoR Application ##
  
  ### Prerequisites ###
  
  * A Rails 4.x app that runs locally
  * [Bundler](http://bundler.io) configured on your workstation
  * Intermediate to advanced RoR knowledge
  * The [cf Command Line Interface (CLI)](../../devguide/installcf/install-go-cli.html)
  - (**Optional**) Robust production web server for Ruby and RoR apps, such as Unicorn
  
  ### Step 1: Configure Automatically Invoked Rake Tasks for Deployed Applications ###
  
  For <%=vars.product_short%> to automatically invoke a Rake task while an app is deployed, you must:
  
   * include the Rake task in your app, and
   * configure the application start command using the `command` attribute in the application manifest.
  
  The following is an example of how to invoke a Rake database migration task at application startup.
  
  <p class="Note"><strong>Note</strong>: If your application does not require any Rake tasks, skip this step.</p>
  
  1. Create a file with the Rake task name and the extension `.rake`, and store it in the `lib/tasks` directory of your application.
  
  