{"id":899,"date":"2018-03-03T23:56:12","date_gmt":"2018-03-03T23:56:12","guid":{"rendered":"https:\/\/webhostingplus.uk\/hosting\/?p=899"},"modified":"2018-03-05T02:56:02","modified_gmt":"2018-03-05T02:56:02","slug":"how-do-i-set-up-ruby-rails","status":"publish","type":"post","link":"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/","title":{"rendered":"How do I set up Ruby on Rails?"},"content":{"rendered":"<p><a href=\"http:\/\/www.rubyonrails.org\/\" rel=\"noopener\" target=\"_blank\">Ruby on Rails<\/a> is a database-driven website framework designed to be easy for programmers to maintain. <\/p>\n<p>To set it up, you will need a hosting package with:-<\/p>\n<p>&#8211; SSH access<br \/>\n&#8211; 3 MySQL databases (for a standard test, production, live configuration)<\/p>\n<p>The ideal way to install Rails is using our &#8220;setup_rails.sh&#8221; script, which will correctly configure Rails for MySQL and our web servers. <\/p>\n<p>Once you have logged in to SSH, to install Rails at http:\/\/www.yoursite.com\/somedirectory you&#8217;d do: <\/p>\n<p>[yoursite.com@web224 ~]$ \/usr\/local\/bin\/setup_rails.sh somedirectory<br \/>\n[yoursite.com@web224 ~]$ ln -sf `pwd`\/somedirectory\/public public_html\/somedirectory<br \/>\n[yoursite.com@web224 ~]$ <\/p>\n<p>You now need to configure Rails to access your MySQL databases. For this you will need to set up 3 databases (by default) using the Web Hosting Plus Control Panel. Note down the names of these, for example you could choose web224-rubyprod, web224-rubytest, web224-rubylive. <\/p>\n<p>Edit the file somedirectory\/config\/database.yml (NOTE: not database.yaml, as the script will erroneously instruct) and update the database, username and password settings appropriately. <\/p>\n<p>You can now visit http:\/\/www.yoursite.com\/somedirectory to see the welcome page and confirm the installation has succeeded. <\/p>\n<p>If you want to go on to create a sample page, try: <\/p>\n<p>[yoursite.com@web224 ~]$ cd somedirectory<br \/>\n[yoursite.com@web224 somedirectory]$ script\/generate controller welcome<br \/>\n            exists app\/controllers\/<br \/>\n            exists app\/helpers\/<br \/>\n            create app\/views\/welcome<br \/>\n            exists test\/functional\/<br \/>\n            create app\/controllers\/welcome_controller.rb<br \/>\n            create test\/functional\/welcome_controller_test.rb<br \/>\n            create app\/helpers\/welcome_helper.rb<br \/>\n[yoursite.com@web224 somedirectory]$ echo &#8216;<b>Hello<\/b>, World! 1 + 2 = <%= 1+2 %>&#8216; > app\/views\/welcome\/index.rhtml<br \/>\n[yoursite.com@web224 somedirectory]$ <\/p>\n<p>You would then be able to view this at http:\/\/www.yoursite.com\/somedirectory\/welcome . For more information, please see the <a href=\"http:\/\/www.rubyonrails.org\/\" rel=\"noopener\" target=\"_blank\">Ruby on Rails<\/a> web site. <\/p>\n<p>If you want to have your entire site run through Rails (and you&#8217;re certain), then rename your public_html directory, and follow the same procedure above except that instead of &#8220;ln -sf `pwd`\/somedirectory\/public public_html\/somedirectory&#8221; you should write &#8220;ln -sf `pwd`\/somedirectory\/public public_html&#8221;. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ruby on Rails is a database-driven website framework designed to be easy for programmers to maintain. To set it up, you will need a hosting package with:- &#8211; SSH access &#8211; 3 MySQL databases (for a standard test, production, live configuration) The ideal way to install Rails is using our &#8220;setup_rails.sh&#8221; script, which will correctly &#8230; <a title=\"How do I set up Ruby on Rails?\" class=\"read-more\" href=\"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/\" aria-label=\"Read more about How do I set up Ruby on Rails?\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"class_list":["post-899","post","type-post","status-publish","format-standard","hentry","category-ruby-on-rails"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How do I set up Ruby on Rails? - Web Hosting Plus<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How do I set up Ruby on Rails? - Web Hosting Plus\" \/>\n<meta property=\"og:description\" content=\"Ruby on Rails is a database-driven website framework designed to be easy for programmers to maintain. To set it up, you will need a hosting package with:- &#8211; SSH access &#8211; 3 MySQL databases (for a standard test, production, live configuration) The ideal way to install Rails is using our &#8220;setup_rails.sh&#8221; script, which will correctly ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting Plus\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-03T23:56:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-05T02:56:02+00:00\" \/>\n<meta name=\"author\" content=\"webhostingplus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webhostingplus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/how-do-i-set-up-ruby-rails\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/how-do-i-set-up-ruby-rails\\\/\"},\"author\":{\"name\":\"webhostingplus\",\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/#\\\/schema\\\/person\\\/ac818f1a9ee343e82657049f7c97c9dc\"},\"headline\":\"How do I set up Ruby on Rails?\",\"datePublished\":\"2018-03-03T23:56:12+00:00\",\"dateModified\":\"2018-03-05T02:56:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/how-do-i-set-up-ruby-rails\\\/\"},\"wordCount\":356,\"publisher\":{\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/#organization\"},\"articleSection\":[\"Ruby on Rails\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/how-do-i-set-up-ruby-rails\\\/\",\"url\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/how-do-i-set-up-ruby-rails\\\/\",\"name\":\"How do I set up Ruby on Rails? - Web Hosting Plus\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/#website\"},\"datePublished\":\"2018-03-03T23:56:12+00:00\",\"dateModified\":\"2018-03-05T02:56:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/how-do-i-set-up-ruby-rails\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/how-do-i-set-up-ruby-rails\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/how-do-i-set-up-ruby-rails\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How do I set up Ruby on Rails?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/#website\",\"url\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/\",\"name\":\"Web Hosting Plus\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/#organization\",\"name\":\"Web Hosting Plus\",\"url\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/wp-content\\\/uploads\\\/Web-Hosting-Plus-Logo.png\",\"contentUrl\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/wp-content\\\/uploads\\\/Web-Hosting-Plus-Logo.png\",\"width\":339,\"height\":78,\"caption\":\"Web Hosting Plus\"},\"image\":{\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/webhostingplus.uk\\\/hosting\\\/#\\\/schema\\\/person\\\/ac818f1a9ee343e82657049f7c97c9dc\",\"name\":\"webhostingplus\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How do I set up Ruby on Rails? - Web Hosting Plus","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:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/","og_locale":"en_GB","og_type":"article","og_title":"How do I set up Ruby on Rails? - Web Hosting Plus","og_description":"Ruby on Rails is a database-driven website framework designed to be easy for programmers to maintain. To set it up, you will need a hosting package with:- &#8211; SSH access &#8211; 3 MySQL databases (for a standard test, production, live configuration) The ideal way to install Rails is using our &#8220;setup_rails.sh&#8221; script, which will correctly ... Read more","og_url":"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/","og_site_name":"Web Hosting Plus","article_published_time":"2018-03-03T23:56:12+00:00","article_modified_time":"2018-03-05T02:56:02+00:00","author":"webhostingplus","twitter_card":"summary_large_image","twitter_misc":{"Written by":"webhostingplus","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/#article","isPartOf":{"@id":"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/"},"author":{"name":"webhostingplus","@id":"https:\/\/webhostingplus.uk\/hosting\/#\/schema\/person\/ac818f1a9ee343e82657049f7c97c9dc"},"headline":"How do I set up Ruby on Rails?","datePublished":"2018-03-03T23:56:12+00:00","dateModified":"2018-03-05T02:56:02+00:00","mainEntityOfPage":{"@id":"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/"},"wordCount":356,"publisher":{"@id":"https:\/\/webhostingplus.uk\/hosting\/#organization"},"articleSection":["Ruby on Rails"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/","url":"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/","name":"How do I set up Ruby on Rails? - Web Hosting Plus","isPartOf":{"@id":"https:\/\/webhostingplus.uk\/hosting\/#website"},"datePublished":"2018-03-03T23:56:12+00:00","dateModified":"2018-03-05T02:56:02+00:00","breadcrumb":{"@id":"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webhostingplus.uk\/hosting\/how-do-i-set-up-ruby-rails\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webhostingplus.uk\/hosting\/"},{"@type":"ListItem","position":2,"name":"How do I set up Ruby on Rails?"}]},{"@type":"WebSite","@id":"https:\/\/webhostingplus.uk\/hosting\/#website","url":"https:\/\/webhostingplus.uk\/hosting\/","name":"Web Hosting Plus","description":"","publisher":{"@id":"https:\/\/webhostingplus.uk\/hosting\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webhostingplus.uk\/hosting\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/webhostingplus.uk\/hosting\/#organization","name":"Web Hosting Plus","url":"https:\/\/webhostingplus.uk\/hosting\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/webhostingplus.uk\/hosting\/#\/schema\/logo\/image\/","url":"https:\/\/webhostingplus.uk\/hosting\/wp-content\/uploads\/Web-Hosting-Plus-Logo.png","contentUrl":"https:\/\/webhostingplus.uk\/hosting\/wp-content\/uploads\/Web-Hosting-Plus-Logo.png","width":339,"height":78,"caption":"Web Hosting Plus"},"image":{"@id":"https:\/\/webhostingplus.uk\/hosting\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/webhostingplus.uk\/hosting\/#\/schema\/person\/ac818f1a9ee343e82657049f7c97c9dc","name":"webhostingplus"}]}},"_links":{"self":[{"href":"https:\/\/webhostingplus.uk\/hosting\/wp-json\/wp\/v2\/posts\/899","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostingplus.uk\/hosting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostingplus.uk\/hosting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostingplus.uk\/hosting\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostingplus.uk\/hosting\/wp-json\/wp\/v2\/comments?post=899"}],"version-history":[{"count":0,"href":"https:\/\/webhostingplus.uk\/hosting\/wp-json\/wp\/v2\/posts\/899\/revisions"}],"wp:attachment":[{"href":"https:\/\/webhostingplus.uk\/hosting\/wp-json\/wp\/v2\/media?parent=899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostingplus.uk\/hosting\/wp-json\/wp\/v2\/categories?post=899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostingplus.uk\/hosting\/wp-json\/wp\/v2\/tags?post=899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}