{"id":189,"date":"2015-08-05T00:48:11","date_gmt":"2015-08-04T15:48:11","guid":{"rendered":"http:\/\/www.cotegg.com\/blog\/?p=189"},"modified":"2015-08-05T00:48:11","modified_gmt":"2015-08-04T15:48:11","slug":"%e3%80%90rails%e3%80%91production%e3%83%a2%e3%83%bc%e3%83%89%e3%81%a7css%e3%81%ae%e7%94%bb%e5%83%8f%e3%81%8c%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84","status":"publish","type":"post","link":"https:\/\/www.cotegg.com\/blog\/?p=189","title":{"rendered":"\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044"},"content":{"rendered":"<p>\u3069\u3046\u3082\u4e2d\u7530\u3067\u3059\u3002<\/p>\n<p>css\u5185\u3067\u753b\u50cf\u3092\u8a2d\u5b9a\u3057\u3066\u3001production\u30e2\u30fc\u30c9\u3067\u52d5\u304b\u3059\u3068\u753b\u50cf\u304c\u51fa\u306a\u3044\uff01\uff01\uff08\u30bf\u30a4\u30c8\u30eb\u3068\u305d\u306e\u307e\u307e\u306e\u3053\u3068\u8a00\u3063\u3061\u3083\u3063\u305f\uff09<br \/>\n\u3063\u3066\u3053\u3068\u304c\u3042\u3063\u305f\u306e\u3067\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>rails4\u306b\u3066production\u30e2\u30fc\u30c9\u3067\u52d5\u4f5c\u3055\u305b\u308b\u5834\u5408\u3001\u4e8b\u524d\u306bcss\u3001js\u3001\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u306e\u30a2\u30bb\u30c3\u30c8\u3092\u30d7\u30ea\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3002<br \/>\n\u305d\u306e\u969b\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u5f8c\u308d\u306b\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u304c\u4ed8\u4e0e\u3055\u308c\u308b\u306e\u3060\u304c\u3001css\u5185\u90e8\u3067\u753b\u50cf\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u3001\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u307e\u3067\u610f\u8b58\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002<\/p>\n<h4>\u30d7\u30ea\u30b3\u30f3\u30d1\u30a4\u30eb\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u540d<\/h4>\n<p>login.png<\/p>\n<h4>\u30d7\u30ea\u30b3\u30f3\u30d1\u30a4\u30eb\u5f8c\u306e\u30d5\u30a1\u30a4\u30eb\u540d<\/h4>\n<p>login-df4b86a870a56daf4e6d646db6ce8e55.png&#8221;<\/p>\n<pre class=\"brush: css; title: style.css; notranslate\" title=\"style.css\">\r\n#main {\r\n  background-image: url(&quot;login.png&quot;);\r\n}\r\n<\/pre>\n<p>css\u3067\u3053\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3059\u308b\u3068\u3082\u3061\u308d\u3093\u753b\u50cf\u306f\u8868\u793a\u3055\u308c\u306a\u3044\u3002<br \/>\n\u3067\u306f\u3001\u3069\u3046\u3059\u308b\u304b\u3002<\/p>\n<p><strong><span style=\"color: #cc00cc;\">\u624b\u9806\u306f3\u3064<\/span><\/strong><br \/>\n1. css -&gt; scss \u62e1\u5f35\u5b50\u306b\u3059\u308b<br \/>\n2. url -&gt; image-url \u306b\u3059\u308b<br \/>\n3. \u30d7\u30ea\u30b3\u30f3\u30d1\u30a4\u30eb\u5b9f\u65bd (bundle exec rake assets:precompile RAILS_ENV=production)<\/p>\n<pre class=\"brush: css; title: style.css.scss; notranslate\" title=\"style.css.scss\">\r\n#main {\r\n  background-image: image-url(&quot;login.png&quot;);\r\n}\r\n<\/pre>\n<p>\u3053\u308c\u3067OK\u3002<br \/>\n\u30d7\u30ea\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u305f\u969b\u3001\u3061\u3083\u3093\u3068\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u306b\u4ed8\u4e0e\u3055\u308c\u308b\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u3092\u5165\u308c\u305f\u72b6\u614b\u3067CSS\u304c\u751f\u6210\u3055\u308c\u308b\u3002<\/p>\n<blockquote><p>\n  \u611f\u8b1d\u30b5\u30a4\u30c8\uff1a<br \/>\n  <a href=\"http:\/\/kgmx.hatenablog.com\/entry\/2014\/06\/26\/085304\">http:\/\/kgmx.hatenablog.com\/entry\/2014\/06\/26\/085304<\/a>\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082\u4e2d\u7530\u3067\u3059\u3002 css\u5185\u3067\u753b\u50cf\u3092\u8a2d\u5b9a\u3057\u3066\u3001production\u30e2\u30fc\u30c9\u3067\u52d5\u304b\u3059\u3068 &#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[7],"tags":[15],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4<\/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.cotegg.com\/blog\/?p=189\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\" \/>\n<meta property=\"og:description\" content=\"\u3069\u3046\u3082\u4e2d\u7530\u3067\u3059\u3002 css\u5185\u3067\u753b\u50cf\u3092\u8a2d\u5b9a\u3057\u3066\u3001production\u30e2\u30fc\u30c9\u3067\u52d5\u304b\u3059\u3068 ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cotegg.com\/blog\/?p=189\" \/>\n<meta property=\"og:site_name\" content=\"\u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/COTegg.japan\/\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-04T15:48:11+00:00\" \/>\n<meta name=\"author\" content=\"\u4e2d\u7530 \u6b69\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cotegg_japan\" \/>\n<meta name=\"twitter:site\" content=\"@cotegg_japan\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u4e2d\u7530 \u6b69\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=189#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=189\"},\"author\":{\"name\":\"\u4e2d\u7530 \u6b69\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef\"},\"headline\":\"\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044\",\"datePublished\":\"2015-08-04T15:48:11+00:00\",\"dateModified\":\"2015-08-04T15:48:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=189\"},\"wordCount\":72,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\"},\"keywords\":[\"rails\"],\"articleSection\":[\"\u6280\u8853\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.cotegg.com\/blog\/?p=189#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=189\",\"url\":\"https:\/\/www.cotegg.com\/blog\/?p=189\",\"name\":\"\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\",\"isPartOf\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#website\"},\"datePublished\":\"2015-08-04T15:48:11+00:00\",\"dateModified\":\"2015-08-04T15:48:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=189#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cotegg.com\/blog\/?p=189\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=189#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.cotegg.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#website\",\"url\":\"https:\/\/www.cotegg.com\/blog\/\",\"name\":\"COTegg\u306e\u30d0\u30b1\u30c4\",\"description\":\"- Bucket of cotegg -\",\"publisher\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.cotegg.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\",\"name\":\"COTegg Inc.\",\"url\":\"https:\/\/www.cotegg.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png\",\"contentUrl\":\"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png\",\"width\":176,\"height\":60,\"caption\":\"COTegg Inc.\"},\"image\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/COTegg.japan\/\",\"https:\/\/twitter.com\/cotegg_japan\",\"https:\/\/www.instagram.com\/cotegg_japan\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef\",\"name\":\"\u4e2d\u7530 \u6b69\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g\",\"caption\":\"\u4e2d\u7530 \u6b69\"},\"sameAs\":[\"http:\/\/www.cotegg.com\"],\"url\":\"https:\/\/www.cotegg.com\/blog\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","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.cotegg.com\/blog\/?p=189","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","og_description":"\u3069\u3046\u3082\u4e2d\u7530\u3067\u3059\u3002 css\u5185\u3067\u753b\u50cf\u3092\u8a2d\u5b9a\u3057\u3066\u3001production\u30e2\u30fc\u30c9\u3067\u52d5\u304b\u3059\u3068 ...","og_url":"https:\/\/www.cotegg.com\/blog\/?p=189","og_site_name":"\u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","article_publisher":"https:\/\/www.facebook.com\/COTegg.japan\/","article_published_time":"2015-08-04T15:48:11+00:00","author":"\u4e2d\u7530 \u6b69","twitter_card":"summary_large_image","twitter_creator":"@cotegg_japan","twitter_site":"@cotegg_japan","twitter_misc":{"\u57f7\u7b46\u8005":"\u4e2d\u7530 \u6b69"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cotegg.com\/blog\/?p=189#article","isPartOf":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=189"},"author":{"name":"\u4e2d\u7530 \u6b69","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef"},"headline":"\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044","datePublished":"2015-08-04T15:48:11+00:00","dateModified":"2015-08-04T15:48:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=189"},"wordCount":72,"commentCount":0,"publisher":{"@id":"https:\/\/www.cotegg.com\/blog\/#organization"},"keywords":["rails"],"articleSection":["\u6280\u8853"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cotegg.com\/blog\/?p=189#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cotegg.com\/blog\/?p=189","url":"https:\/\/www.cotegg.com\/blog\/?p=189","name":"\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","isPartOf":{"@id":"https:\/\/www.cotegg.com\/blog\/#website"},"datePublished":"2015-08-04T15:48:11+00:00","dateModified":"2015-08-04T15:48:11+00:00","breadcrumb":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=189#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cotegg.com\/blog\/?p=189"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cotegg.com\/blog\/?p=189#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cotegg.com\/blog"},{"@type":"ListItem","position":2,"name":"\u3010Rails\u3011production\u30e2\u30fc\u30c9\u3067CSS\u306e\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u306a\u3044"}]},{"@type":"WebSite","@id":"https:\/\/www.cotegg.com\/blog\/#website","url":"https:\/\/www.cotegg.com\/blog\/","name":"COTegg\u306e\u30d0\u30b1\u30c4","description":"- Bucket of cotegg -","publisher":{"@id":"https:\/\/www.cotegg.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cotegg.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.cotegg.com\/blog\/#organization","name":"COTegg Inc.","url":"https:\/\/www.cotegg.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png","contentUrl":"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png","width":176,"height":60,"caption":"COTegg Inc."},"image":{"@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/COTegg.japan\/","https:\/\/twitter.com\/cotegg_japan","https:\/\/www.instagram.com\/cotegg_japan\/"]},{"@type":"Person","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/bee6afc3e5cc03652345976570794aef","name":"\u4e2d\u7530 \u6b69","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ce4d0b00ef87081854562ad73f762659?s=96&d=mm&r=g","caption":"\u4e2d\u7530 \u6b69"},"sameAs":["http:\/\/www.cotegg.com"],"url":"https:\/\/www.cotegg.com\/blog\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/189"}],"collection":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=189"}],"version-history":[{"count":5,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":194,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/189\/revisions\/194"}],"wp:attachment":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}