{"id":19150,"date":"2016-04-18T19:14:16","date_gmt":"2016-04-18T16:14:16","guid":{"rendered":"https:\/\/www.altoros.com\/blog\/?p=19150"},"modified":"2024-08-27T06:32:19","modified_gmt":"2024-08-27T03:32:19","slug":"get-started-with-predix-deploying-a-rails-app-and-binding-services","status":"publish","type":"post","link":"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/","title":{"rendered":"Deploying a Ruby on Rails App and Binding Services with Predix"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#First_steps_in_Predix\" >First steps in Predix<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#Adding_services\" >Adding services<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#Creating_and_binding_service_instances\" >Creating and binding service instances<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#Deploying_the_application_to_Predix\" >Deploying the application to Predix<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#Verifying_the_application\" >Verifying the application<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#About_the_author\" >About the author<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#Further_reading\" >Further reading<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To deploy a Ruby on Rails application, you must have the following:<\/p>\n<ul>\n<li>the Predix platform user account<\/li>\n<li>the <a href=\"https:\/\/github.com\/cloudfoundry\/cli#downloads\" target=\"_blank\" rel=\"noopener noreferrer\">Cloud Foundry CLI<\/a><\/li>\n<\/ul>\n<p>A sample Ruby on Rails application ready to be deployed to GE Predix is available in the <a href=\"https:\/\/github.com\/Altoros\/predix-rails-starter-app\" target=\"_blank\" rel=\"noopener noreferrer\">predix-rails-starter-app<\/a> repository on the Altoros GitHub account.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"First_steps_in_Predix\"><\/span>First steps in Predix<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Most of the time, you\u2019ll interact with the platform through the Cloud Foundry CLI. After installing the package, proceed with logging in to Cloud Foundry by issuing the following command in your terminal:<\/p>\n<pre style=\"padding-left: 30px;\"><code>cf login -a API_ENDPOINT<\/code><\/pre>\n<p>where <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">API_ENDPOINT<\/code> is the URL value that was sent to you in the Predix signup e-mail.<\/p>\n<p>Depending on your Predix registration, the value of <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">API_ENDPOINT<\/code> is one of the following:<\/p>\n<ul>\n<li><code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">https:\/\/api.system.aws-usw02-pr.ice.predix.io<\/code> for Predix Basic<\/li>\n<li><code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">https:\/\/api.system.asv-pr.ice.predix.io<\/code> for Predix Select<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Adding_services\"><\/span>Adding services<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Before deploying your application, make sure to create necessary service instances for it. If a service is available in Predix and you have the required access to that service, you can use it for your application development.<\/p>\n<p>For viewing services and plans available to you, run the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf marketplace<\/code> command or open <a href=\"https:\/\/www.predix.io\/catalog\/\" target=\"_blank\" rel=\"noopener noreferrer\">Catalog<\/a>.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-catalog.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-catalog.png\" alt=\"getting-started-with-predix-catalog\" width=\"640\" class=\"aligncenter size-full wp-image-19247\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Creating_and_binding_service_instances\"><\/span>Creating and binding service instances<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To create a service instance for your application, use the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf create-service<\/code> command:<\/p>\n<pre style=\"padding-left: 30px;\"><code>cf create-service SERVICE PLAN SERVICE_INSTANCE<\/code><\/pre>\n<p>where:<\/p>\n<ul>\n<li><code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">SERVICE<\/code> is the service name.<\/li>\n<li><code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">PLAN<\/code> is the service plan.<\/li>\n<li><code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">SERVICE_INSTANCE<\/code> is the unique name for the service instance.<\/li>\n<\/ul>\n<p>Issue the following command in the terminal to create a PostgreSQL service instance\u2014named <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">rails-postgres<\/code>\u2014for the sample Rails application:<\/p>\n<pre style=\"padding-left: 30px;\"><code>cf create-service postgres shared-nr rails-postgres<\/code><\/pre>\n<p>You can see a newly created service instance by running the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf services<\/code> command or opening the default dev space in the <a href=\"https:\/\/www.predix.io\/console\" target=\"_blank\" rel=\"noopener noreferrer\">Predix console<\/a>.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-rails-postgres.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-rails-postgres.png\" alt=\"getting-started-with-predix-rails-postgres\" width=\"640\" class=\"aligncenter size-full wp-image-19248\" \/><\/a><\/p>\n<p>You have to bind your application to your service instance for integrating the application with the service instance. There are two options on how you can do this:<\/p>\n<ul>\n<li>manually by using the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf bind-service<\/code> command<\/li>\n<li>automatically by providing the list of services needed for an application in the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code> file.<\/li>\n<\/ul>\n<p>To bind your application to the service instance manually, enter the following command (you need to ensure that your application is available in Predix):<\/p>\n<pre style=\"padding-left: 30px;\"><code>cf bind-service APP_NAME SERVICE_INSTANCE<\/code><\/pre>\n<p>where:<\/p>\n<ul>\n<li><code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">APP_NAME<\/code> is the name of the application you want to bind to your service instance.<\/li>\n<li><code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">SERVICE_INSTANCE<\/code> is the name of the service instance you want to bind your application to.<\/li>\n<\/ul>\n<p>Because the number of service instances you want to bind your application to can grow, I find it tedious to bind each service instance manually. You can specify the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">services<\/code> sub-block in the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">applications<\/code> block of the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code> file to bind them automatically. Here\u2019s the excerpt from the <a href=\"https:\/\/github.com\/Altoros\/predix-rails-starter-app\/blob\/master\/manifest.yml\" target=\"_blank\" rel=\"noopener noreferrer\">manifest.yml<\/a> file of <a href=\"https:\/\/github.com\/Altoros\/predix-rails-starter-app\" target=\"_blank\" rel=\"noopener noreferrer\">predix-rails-starter-app<\/a>:<\/p>\n<pre style=\"padding-left: 30px;\"><code>applications:\r\n- name: predix-rails-starter-app\r\n  ...\r\n  services:\r\n    - rails-postgres<\/code><\/pre>\n<p><\/p>\n<p>When you bind your application to a service instance, Cloud Foundry provisions its connection details in the JSON encoded <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">VCAP_SERVICES<\/code> environment variable. So, to get access to the services, you have to parse JSON to get parameters you need. Here\u2019s how it\u2019s done in the <a href=\"https:\/\/github.com\/Altoros\/predix-rails-starter-app\/blob\/master\/config\/database.yml\" target=\"_blank\" rel=\"noopener noreferrer\">config\/database.yml<\/a> file of the Rails starter application:<\/p>\n<pre style=\"padding-left: 30px;\"><code>...\r\nproduction:\r\n  url: &lt;%= JSON.parse(ENV['VCAP_SERVICES']).dig('postgres', 0, 'credentials', 'uri') if Rails.env.production? %&gt;<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Deploying_the_application_to_Predix\"><\/span>Deploying the application to Predix<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Specify the following terminal command to create a local copy of <a href=\"https:\/\/github.com\/Altoros\/predix-rails-starter-app\" target=\"_blank\" rel=\"noopener noreferrer\">predix-rails-starter-app<\/a>:<\/p>\n<pre style=\"padding-left: 30px;\"><code>git clone https:\/\/github.com\/Altoros\/predix-rails-starter-app<\/code><\/pre>\n<p>The newly created directory contains the <a href=\"https:\/\/github.com\/Altoros\/predix-rails-starter-app\/blob\/master\/manifest.yml\" target=\"_blank\" rel=\"noopener noreferrer\">manifest.yml<\/a> file, which assists you with deploying the application.<\/p>\n<p>Go to the application directory and run the following command to deploy the application to Predix:<\/p>\n<pre style=\"padding-left: 30px;\"><code>cf push APP_NAME<\/code><\/pre>\n<p>where <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">APP_NAME<\/code> is an optional application name that you can provide to override the application name specified in <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code>.<\/p>\n<p>To view logs while deploying the application, you can launch a new terminal window and run the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf logs predix-rails-starter-app<\/code> command.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Verifying_the_application\"><\/span>Verifying the application<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Running the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code> command creates a URL route to your application that you can retrieve by issuing the following command:<\/p>\n<pre style=\"padding-left: 30px;\"><code>cf app APP_NAME<\/code><\/pre>\n<p>where <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">APP_NAME<\/code> is the application name.<\/p>\n<p>Verify that the application is running by browsing to the URL generated in the output of the previous command. In this example, navigating to <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">predix-rails-starter-app.run.aws-usw02-pr.ice.predix.io<\/code> verifies that the application is running.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"About_the_author\"><\/span>About the author<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2024\/08\/dennis-dashkevich.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2024\/08\/dennis-dashkevich-150x150.jpg\" width=\"90\" height=\"90\" class=\"alignright size-thumbnail wp-image-67840\" \/><\/a><a href=\"https:\/\/www.linkedin.com\/in\/dennis-dashkevich\/\" rel=\"noopener\" target=\"_blank\">Dzianis Dashkevich<\/a> is a software engineer at Altoros. He specializes in web development, using Ruby and JavaScript as his primary tools. Dzianis is an adherent of extreme programing practices, including pair programming and TDD. You can find him on <a href=\"https:\/\/github.com\/dskecse\" rel=\"noopener\" target=\"_blank\">GitHub<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Further_reading\"><\/span>Further reading<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/deploying-an-asp-net-application-to-ge-predix\/\">Deploying an ASP.NET Application to GE Predix<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/using-predix-mobile-services-to-create-a-cross-platform-app\/\">Using Predix Mobile Services for a Cross-Platform App<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/predix-ga-ge-working-security-mobile-services-automating-ops\/\">Predix GA: GE Is Working on Security, Mobile Services, and Automating Ops<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<hr>\n<p><center><small>The tutorial was created by Dzianis Dashkevich;<br \/>\nedited and published by Victoria Fedzkovich and <a href=\"https:\/\/www.altoros.com\/blog\/author\/alex\/\">Alex Khizhniak<\/a>.<\/small><\/center><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prerequisites<\/p>\n<p>To deploy a Ruby on Rails application, you must have the following:<\/p>\n<p>the Predix platform user account<br \/>\nthe Cloud Foundry CLI<\/p>\n<p>A sample Ruby on Rails application ready to be deployed to GE Predix is available in the predix-rails-starter-app repository on the Altoros GitHub account.<\/p>\n<p>&nbsp;<\/p>\n<p>First steps in Predix<\/p>\n<p>Most of the time, you\u2019ll interact [&#8230;]<\/p>\n","protected":false},"author":24,"featured_media":19247,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[214],"tags":[873,117,647],"class_list":["post-19150","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-cloud-native","tag-iot","tag-predix"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Deploying a Ruby on Rails App and Binding Services with Predix | Altoros<\/title>\n<meta name=\"description\" content=\"This tutorial will be helpful to Ruby developers who are new to Predix, an industrial IoT platform from GE, guiding you through deploying an app binded to services.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deploying a Ruby on Rails App and Binding Services with Predix | Altoros\" \/>\n<meta property=\"og:description\" content=\"Prerequisites To deploy a Ruby on Rails application, you must have the following: the Predix platform user account the Cloud Foundry CLI A sample Ruby on Rails application ready to be deployed to GE Predix is available in the predix-rails-starter-app repository on the Altoros GitHub account. &nbsp; First steps in Predix Most of the time, you\u2019ll interact [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/\" \/>\n<meta property=\"og:site_name\" content=\"Altoros\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-18T16:14:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-27T03:32:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-catalog.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1706\" \/>\n\t<meta property=\"og:image:height\" content=\"914\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Victoria Fedzkovich\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Victoria Fedzkovich\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/\",\"name\":\"Deploying a Ruby on Rails App and Binding Services with Predix | Altoros\",\"isPartOf\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-catalog.png\",\"datePublished\":\"2016-04-18T16:14:16+00:00\",\"dateModified\":\"2024-08-27T03:32:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/c7b416b09612e334a4e0184568906c36\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#primaryimage\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-catalog.png\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-catalog.png\",\"width\":1706,\"height\":914},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.altoros.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deploying a Ruby on Rails App and Binding Services with Predix\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\",\"url\":\"https:\/\/www.altoros.com\/blog\/\",\"name\":\"Altoros\",\"description\":\"Insight\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.altoros.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/c7b416b09612e334a4e0184568906c36\",\"name\":\"Victoria Fedzkovich\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/author-v-f-150x150.jpg\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/author-v-f-150x150.jpg\",\"caption\":\"Victoria Fedzkovich\"},\"description\":\"Victoria Fedzkovich strives for effective technical communication at Altoros. As a professional with 7+ years of experience in technical and scientific writing, she creates content for user guides, manuals, white papers, and technical overviews. Victoria is currently focused on the Cloud Foundry ecosystem and IoT solutions.\",\"url\":\"https:\/\/www.altoros.com\/blog\/author\/viktoryia-fedzkovich\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Deploying a Ruby on Rails App and Binding Services with Predix | Altoros","description":"This tutorial will be helpful to Ruby developers who are new to Predix, an industrial IoT platform from GE, guiding you through deploying an app binded to services.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/","og_locale":"en_US","og_type":"article","og_title":"Deploying a Ruby on Rails App and Binding Services with Predix | Altoros","og_description":"Prerequisites To deploy a Ruby on Rails application, you must have the following: the Predix platform user account the Cloud Foundry CLI A sample Ruby on Rails application ready to be deployed to GE Predix is available in the predix-rails-starter-app repository on the Altoros GitHub account. &nbsp; First steps in Predix Most of the time, you\u2019ll interact [...]","og_url":"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/","og_site_name":"Altoros","article_published_time":"2016-04-18T16:14:16+00:00","article_modified_time":"2024-08-27T03:32:19+00:00","og_image":[{"width":1706,"height":914,"url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-catalog.png","type":"image\/png"}],"author":"Victoria Fedzkovich","twitter_misc":{"Written by":"Victoria Fedzkovich","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/","url":"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/","name":"Deploying a Ruby on Rails App and Binding Services with Predix | Altoros","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#primaryimage"},"image":{"@id":"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-catalog.png","datePublished":"2016-04-18T16:14:16+00:00","dateModified":"2024-08-27T03:32:19+00:00","author":{"@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/c7b416b09612e334a4e0184568906c36"},"breadcrumb":{"@id":"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#primaryimage","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-catalog.png","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2017\/01\/getting-started-with-predix-catalog.png","width":1706,"height":914},{"@type":"BreadcrumbList","@id":"https:\/\/www.altoros.com\/blog\/get-started-with-predix-deploying-a-rails-app-and-binding-services\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.altoros.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Deploying a Ruby on Rails App and Binding Services with Predix"}]},{"@type":"WebSite","@id":"https:\/\/www.altoros.com\/blog\/#website","url":"https:\/\/www.altoros.com\/blog\/","name":"Altoros","description":"Insight","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.altoros.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/c7b416b09612e334a4e0184568906c36","name":"Victoria Fedzkovich","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/author-v-f-150x150.jpg","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/03\/author-v-f-150x150.jpg","caption":"Victoria Fedzkovich"},"description":"Victoria Fedzkovich strives for effective technical communication at Altoros. As a professional with 7+ years of experience in technical and scientific writing, she creates content for user guides, manuals, white papers, and technical overviews. Victoria is currently focused on the Cloud Foundry ecosystem and IoT solutions.","url":"https:\/\/www.altoros.com\/blog\/author\/viktoryia-fedzkovich\/"}]}},"_links":{"self":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/19150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/comments?post=19150"}],"version-history":[{"count":16,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/19150\/revisions"}],"predecessor-version":[{"id":67842,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/19150\/revisions\/67842"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media\/19247"}],"wp:attachment":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media?parent=19150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/categories?post=19150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/tags?post=19150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}