{"id":229,"date":"2009-03-18T07:19:03","date_gmt":"2009-03-18T06:19:03","guid":{"rendered":"http:\/\/flaven.fr\/?p=229"},"modified":"2013-09-28T05:36:09","modified_gmt":"2013-09-28T03:36:09","slug":"installer-l-environnement-ruby-on-rails-sur-pc-via-instantrails","status":"publish","type":"post","link":"https:\/\/flaven.fr\/2009\/03\/installer-l-environnement-ruby-on-rails-sur-pc-via-instantrails\/","title":{"rendered":"Installer l&#8217;environnement Ruby On Rails sur PC via InstantRails"},"content":{"rendered":"<p><!-- Installer l\u2019environnement Ruby On Rails sur PC via InstantRails --><br \/>\nLa r\u00e9ponse du berger \u00e0 la berg\u00e8re, on a vu dans un article pr\u00e9c\u00e9dent comment installer avec un \u00ab one click installer \u00bb l\u2019environnement Ruby on Rails sur un Mac via locomotive. Il existe l\u2019\u00e9quivalent sur PC,  cet \u00e9quivalent se nomme Instant Rails. Il est identique \u00e0 EasyPHP dans son installation, les concepteurs du projet ne s\u2019en cachent d\u2019ailleurs pas. A noter, parmi ces concepteur Curt Hibbs, auteur du tr\u00e8s fameux article publi\u00e9 chez O\u2019reilly \u00ab Rolling with Ruby on Rails \u00bb et de nombreux ouvrages d\u2019\u00e9vang\u00e9lisation sur RoR.<!--more--><\/p>\n<p>Quelques-uns des composants inclus dans la distribution de Instant Rails 2.0<br \/>\nIl est \u00e0 noter qu\u2019Instant Rails est astucieusement livr\u00e9 avec PHP et phpMyAdmin pour les personnes, nombreuses qui viennent du PHP et souhaitent s\u2019initier \u00e0 l\u2019environnement RoR.<br \/>\nEnfin, derni\u00e8re remarque, l\u2019application est livr\u00e9e avec deux exemples : une application de blog nomm\u00e9 typo et l\u2019exemple Cookbook qui est repris dans l\u2019article cit\u00e9 plus haut. Instant Rails est donc un vrai outil p\u00e9dagogique d\u2019initiation \u00e0 RoR.<\/p>\n<ul>\n<li> [Instant Rails Manager] 2.0<\/li>\n<li>[Ruby 1.8.6] (from the [One-Click Ruby Installer] 1.8.6-26) <\/li>\n<li>[Ruby on Rails] 2.0.2<\/li>\n<li>[Apache] 1.3.33 <\/li>\n<li>[MySQL] 5.0.27 <\/li>\n<li>[MySQL\/Ruby] 2.7.3 (native driver) <\/li>\n<li>[Mongrel] 1.1.2 <\/li>\n<li>[phpMyAdmin] 2.10.0.2<\/li>\n<li> Cookbook app from [ONLamp.com article] <\/li>\n<li>[Typo] 2.6.0  Ancillary Instant Rails Components<\/li>\n<li>[PHP] 4.3.10<\/li>\n<\/ul>\n<h2>Cr\u00e9er son environnement RoR avec InstantRails sur PC<\/h2>\n<p>Il faut aller t\u00e9l\u00e9charger l&#8217;application  <a href=\"http:\/\/instantrails.rubyforge.org\/wiki\/wiki.pl\">http:\/\/instantrails.rubyforge.org\/wiki\/wiki.pl<\/a><br \/> Le site est en anglais mais il y a quelques tutoriaux pour vous aider \u00e0 vous retrouver pour l&#8217;installation.<\/p>\n<h4>Lancement de l&#8217;application<\/h4>\n<p>Une fois install\u00e9, vous pouvez lancer l&#8217;application et vous allez voir appara\u00eetre la console InstantRails.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_1.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<h4>Configuration de l&#8217;application<\/h4>\n<p>Vous pouvez acc\u00e9der \u00e0 la console pour g\u00e9rer vos applications Rails ou la configuration des \u00e9l\u00e9ments de InstantRails.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_2.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_3.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<h4>Cr\u00e9er une application rails sous InstantRails<\/h4>\n<p>En choisissant &#8220;Rails Application&#8221; puis &#8220;Manage Rails Application&#8221;, une console MS-DOS s&#8217;ouvre directement dans le r\u00e9pertoire o\u00f9 il est install\u00e9 par d\u00e9faut.<br \/>\n<code>C:InstantRails-2.0-win<\/code>. Via la commande <code>cd rails_apps<\/code>, vous acc\u00e9dez au r\u00e9pertoire dans lequel vous allez cr\u00e9er l&#8217;application rails.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_5.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<p>En lan\u00e7ant la commande &#8220;rails myapplication&#8221;, vous allez cr\u00e9er le r\u00e9pertoire de l&#8217;application visible \u00e0 cette adresse <code>C:InstantRails-2.0-winrails_appsmyapplication<\/code>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_6.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><br \/>\nUne fois cr\u00e9\u00e9, vous pouvez vous rendre dans le r\u00e9pertoire en tapant <code>cd myapplication<\/code>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_10.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<p>Puis <code>dir<\/code> pour afficher le contenu du r\u00e9pertoire <code>myapplication<\/code><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_7.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<h4>D\u00e9marrer l&#8217;application myapplication<\/h4>\n<p>Via la console InstantRails, vous s\u00e9lectionnez en cochant &#8220;myapplication&#8221; puis &#8220;Start with Mongrel&#8221;. Ce qui \u00e9quivaut aux commandes suivantes si vous \u00eates dans le r\u00e9pertoire de l&#8217;application <code>myapplication<\/code> <code>script\/server<\/code> ou <code>ruby script\/server<\/code><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_8.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_8_b.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<p>Le serveur Mongrel va faire tourner l&#8217;application sur le port 3000. Vous devez parfois autoriser Mongrel dans le firewall Windows comme sur la capture d&#8217;\u00e9cran.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_9.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<p>Vous pouvez donc acc\u00e9dez \u00e0 votre application \u00e0 l&#8217;adresse suivante <code>http:\/\/127.0.0.1:3000\/<\/code>, la page traditionnelle de RoR s&#8217;affiche, vous y \u00eates !<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_13.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<h4>Cr\u00e9er son premier controller<\/h4>\n<p>En \u00e9tant dans le r\u00e9pertoire <code>myapplication<\/code>, vous pouvez lancer \u00e0 partir le console d&#8217;autre commande plus orient\u00e9 RoR par exemple la cr\u00e9ation de votre premier controller nomm\u00e9 index. <code>ruby script\/generate controller index<\/code><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_13_bis.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<p>Ce controller index sera accessible \u00e0 <code>http:\/\/127.0.0.1:3000\/index\/<\/code><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_14.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<h4>Eteindre InstantRails<\/h4>\n<p>Par un clic droit sur l&#8217;ic\u00f4ne InstantRails dans votre barre de t\u00e2ches, vous acc\u00e9dez au menu contextuel \u00e0 la commande <code>Stop Servers<\/code> pour \u00e9teindre le serveur.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_15.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n<p>Ensuite en s\u00e9lectionnant <code>Exit<\/code> vus sortez d\u00e9finitivement de l&#8217;application InstantRails.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_16.jpg\" width=\"400\" height=\"250\" class=\"size-full wp-image-47 aligncenter\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>La r\u00e9ponse du berger \u00e0 la berg\u00e8re, on a vu dans un article pr\u00e9c\u00e9dent comment installer avec un \u00ab one click installer \u00bb l\u2019environnement Ruby&hellip; <\/p>\n<p class=\"text-center\"><a href=\"https:\/\/flaven.fr\/2009\/03\/installer-l-environnement-ruby-on-rails-sur-pc-via-instantrails\/\" class=\"more-link\">Continue reading &rarr; <span class=\"screen-reader-text\">Installer l&#8217;environnement Ruby On Rails sur PC via InstantRails<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":9590,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bf_ai_meta_description":"Instant Rails simplifie l'installation de l'environnement Ruby on Rails sur PC. D\u00e9couvrez les outils inclus et les r\u00e9sultats attendus.","bf_ai_og_title":"Installer Rails sur PC","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3444,3449],"tags":[110,111,94,95],"class_list":["post-229","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming-databases","category-tutorials-how-to","tag-instantrails","tag-pc","tag-ror","tag-ruby"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3Vuhl-3H","jetpack_featured_media_url":"https:\/\/flaven.fr\/wp-content\/uploads\/2009\/03\/install_instantrails_pc_1_g_bf.jpg","_links":{"self":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/comments?post=229"}],"version-history":[{"count":1,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/229\/revisions"}],"predecessor-version":[{"id":9591,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/posts\/229\/revisions\/9591"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media\/9590"}],"wp:attachment":[{"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/media?parent=229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/categories?post=229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flaven.fr\/happy-api\/wp\/v2\/tags?post=229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}