{"id":1340,"date":"2012-01-31T16:28:51","date_gmt":"2012-01-31T07:28:51","guid":{"rendered":"https:\/\/wp-78qb7hnp.pistolfly.jp\/weblog\/2012\/01\/change-path-environment-with-r.html"},"modified":"2018-02-27T14:12:56","modified_gmt":"2018-02-27T05:12:56","slug":"change-path-environment-with-r","status":"publish","type":"post","link":"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html","title":{"rendered":"Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b"},"content":{"rendered":"<p>Capfile\u306b<\/p>\n<pre class=\"prettyprint\">load 'deploy\/assets'\r\n<\/pre>\n<p>\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3001\u30c7\u30d7\u30ed\u30a4\u6642\u306bassets:precompile\u3092\u5b9f\u884c\u3067\u304d\u308b\u304c\u3001assets:precompile\u5b9f\u884c\u6642\u306b\u3001<\/p>\n<pre class=\"command-line\">\/usr\/bin\/env:\r\nruby\r\n: \u305d\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3042\u308a\u307e\u305b\u3093\r\n<\/pre>\n<p>\u3068\u3044\u3046\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u3002<br \/>\nssh\u7d4c\u7531\u3067\u306eshell\u306e\u5b9f\u884c\u6642\u306bPATH\u304c\u901a\u3063\u3066\u3044\u306a\u3044\u306e\u304c\u539f\u56e0\u3068\u601d\u308f\u308c\u308b\u3002<\/p>\n<h3>\u89e3\u6c7a\u65b9\u6cd5<\/h3>\n<p>Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001:default_environment\u3092\u4f7f\u3046\u3002<\/p>\n<pre class=\"prettyprint\">set :default_environment, {\r\n  'PATH' =&gt; \"\/opt\/ruby-enterprise-1.8.7-2011.03\/bin:$PATH\"\r\n}\r\n<\/pre>\n<p><a href=\"http:\/\/www.pastbedti.me\/2011\/06\/change-path-environment-with-rails-and-capistrano\/\" target=\"_blank\">Change PATH environment with Rails and Capistrano - pastbedti.me<\/a><br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/1978797\/how-do-i-configure-capistrano-to-use-my-rvm-version-of-ruby\" target=\"_blank\">How do I configure capistrano to use my rvm version of Ruby - Stack Overflow<\/a><br \/>\n\u30d7\u30ea\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u5834\u5408\u3001config\/environments\/production.rb\u3067\u3001<\/p>\n<pre class=\"prettyprint\">config.assets.compile = false\r\n<\/pre>\n<p>\u306b\u3059\u308b\u304c\u3001assets\u306bapplication.js, application.css\u4ee5\u5916\u306ejs\u3001css\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bconfig.assets.precompile\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u8ffd\u52a0\u3057\u306a\u3044\u3068\u3001smart_phone.css isn't precompiled \u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002<br \/>\nconfig\/environments\/production.rb<\/p>\n<pre class=\"prettyprint\">config.assets.compile = false\r\n# Precompile additional assets (application.js, application.css, and all non-JS\/CSS are already added)\r\nconfig.assets.precompile += %w( smart_phone.css web_app_theme.css )\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Capfile\u306b load 'deploy\/assets' \u3092\u8ffd\u52a0\u3059\u308b\u3068\u3001\u30c7\u30d7\u30ed\u30a4\u6642\u306bassets:precompile\u3092\u5b9f\u884c\u3067\u304d\u308b\u304c\u3001assets:precompile\u5b9f\u884c\u6642\u306b\u3001 \/usr\/bin\/env: ruby  &hellip; <a href=\"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"1340","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[31],"tags":[],"class_list":["post-1340","post","type-post","status-publish","format-standard","hentry","category-ruby-on-rails","ja"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b - Pistolfly<\/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:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b - Pistolfly\" \/>\n<meta property=\"og:description\" content=\"Capfile\u306b load &#039;deploy\/assets&#039; \u3092\u8ffd\u52a0\u3059\u308b\u3068\u3001\u30c7\u30d7\u30ed\u30a4\u6642\u306bassets:precompile\u3092\u5b9f\u884c\u3067\u304d\u308b\u304c\u3001assets:precompile\u5b9f\u884c\u6642\u306b\u3001 \/usr\/bin\/env: ruby &hellip; \u7d9a\u304d\u3092\u8aad\u3080 Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html\" \/>\n<meta property=\"og:site_name\" content=\"Pistolfly\" \/>\n<meta property=\"article:published_time\" content=\"2012-01-31T07:28:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-02-27T05:12:56+00:00\" \/>\n<meta name=\"author\" content=\"Pistolfly\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pistolfly\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2012\\\/01\\\/change-path-environment-with-r.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2012\\\/01\\\/change-path-environment-with-r.html\"},\"author\":{\"name\":\"Pistolfly\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"headline\":\"Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b\",\"datePublished\":\"2012-01-31T07:28:51+00:00\",\"dateModified\":\"2018-02-27T05:12:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2012\\\/01\\\/change-path-environment-with-r.html\"},\"wordCount\":63,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"articleSection\":[\"Ruby on Rails\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2012\\\/01\\\/change-path-environment-with-r.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2012\\\/01\\\/change-path-environment-with-r.html\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2012\\\/01\\\/change-path-environment-with-r.html\",\"name\":\"Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b - Pistolfly\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\"},\"datePublished\":\"2012-01-31T07:28:51+00:00\",\"dateModified\":\"2018-02-27T05:12:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2012\\\/01\\\/change-path-environment-with-r.html#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2012\\\/01\\\/change-path-environment-with-r.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/2012\\\/01\\\/change-path-environment-with-r.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/\",\"name\":\"Pistolfly\",\"description\":\"Developer Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\",\"name\":\"Pistolfly\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"caption\":\"Pistolfly\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\"},\"description\":\"Software Engineer in Tokyo, Japan\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/author\\\/pistolfly\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b - Pistolfly","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.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html","og_locale":"ja_JP","og_type":"article","og_title":"Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b - Pistolfly","og_description":"Capfile\u306b load 'deploy\/assets' \u3092\u8ffd\u52a0\u3059\u308b\u3068\u3001\u30c7\u30d7\u30ed\u30a4\u6642\u306bassets:precompile\u3092\u5b9f\u884c\u3067\u304d\u308b\u304c\u3001assets:precompile\u5b9f\u884c\u6642\u306b\u3001 \/usr\/bin\/env: ruby &hellip; \u7d9a\u304d\u3092\u8aad\u3080 Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b &rarr;","og_url":"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html","og_site_name":"Pistolfly","article_published_time":"2012-01-31T07:28:51+00:00","article_modified_time":"2018-02-27T05:12:56+00:00","author":"Pistolfly","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"Pistolfly","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"1\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html#article","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html"},"author":{"name":"Pistolfly","@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"headline":"Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b","datePublished":"2012-01-31T07:28:51+00:00","dateModified":"2018-02-27T05:12:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html"},"wordCount":63,"commentCount":0,"publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"articleSection":["Ruby on Rails"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html","url":"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html","name":"Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b - Pistolfly","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#website"},"datePublished":"2012-01-31T07:28:51+00:00","dateModified":"2018-02-27T05:12:56+00:00","breadcrumb":{"@id":"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pistolfly.com\/weblog\/2012\/01\/change-path-environment-with-r.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/www.pistolfly.com\/weblog"},{"@type":"ListItem","position":2,"name":"Capistrano\u3067PATH\u7b49\u306e\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b"}]},{"@type":"WebSite","@id":"https:\/\/www.pistolfly.com\/weblog\/#website","url":"https:\/\/www.pistolfly.com\/weblog\/","name":"Pistolfly","description":"Developer Blog","publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pistolfly.com\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab","name":"Pistolfly","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","caption":"Pistolfly"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g"},"description":"Software Engineer in Tokyo, Japan","url":"https:\/\/www.pistolfly.com\/weblog\/author\/pistolfly"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paorzz-lC","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/1340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/comments?post=1340"}],"version-history":[{"count":3,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/1340\/revisions"}],"predecessor-version":[{"id":4298,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/1340\/revisions\/4298"}],"wp:attachment":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/media?parent=1340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/categories?post=1340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/tags?post=1340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}