{"id":3447,"date":"2023-08-10T09:38:44","date_gmt":"2023-08-10T00:38:44","guid":{"rendered":"https:\/\/www.kinryo.net\/?p=3447"},"modified":"2025-08-18T16:54:01","modified_gmt":"2025-08-18T07:54:01","slug":"%ef%bc%92%ef%bc%9arails%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab%e3%82%92%e3%82%84%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.kinryo.net\/?p=3447","title":{"rendered":"\uff12\uff1aRails\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u3084\u308b1"},"content":{"rendered":"<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u3084\u3089\u306a\u3044\u4eba\u306f<a href=\"https:\/\/www.kinryo.net\/?p=4426\">\uff18\uff1arails\u306e\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u3092mariadb\u306b\u3059\u308b<\/a> \u306b\u9032\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/railstutorial.jp\/chapters\/beginning?version=7.0#cha-beginning\" target=\"_blank\" rel=\"noopener\">https:\/\/railstutorial.jp\/chapters\/beginning?version=7.0#cha-beginning<\/a>\u3092\u53c2\u8003\u306b\u3057\u3066\u884c\u3063\u3066\u3044\u304f\u3002\u306f\u3058\u3081\u306b\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3068\u9055\u3046\u306e\u306f<br \/>\n\uff11\uff1aIDE(cloud9)\u3067\u7121\u304f\u3001\u30ed\u30fc\u30ab\u30eb\u306e\u30b5\u30d6\u30db\u30b9\u30c8\u3067\u884c\u3063\u3066\u3044\u308b<br \/>\n\uff12\uff1aruby\u3068rails\u304c\u9055\u3063\u3066\u3044\u308b\u3002ruby 3.1.2 \u2192 3.2.2,\u00a0 rails 7.0.4 \u2192 7.0.6<br \/>\n\uff13\uff1a\u4e00\u4eba\u3067\u3084\u3063\u3066\u3044\u308b\u306e\u3067github\u306f\u4f7f\u308f\u306a\u3044<br \/>\n\uff14\uff1a\u30c7\u30a3\u30d7\u30ed\u30a4\u3092\u3057\u306a\u3044\u306e\u3067 render \u306f\u4f7f\u308f\u306a\u3044<br \/>\n\u3067\u65e9\u901f\u3001\u6642\u9593\u304c\u304b\u304b\u308b\u306e\u3067<span class=\"description\">Ruby\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u30b9\u30ad\u30c3\u30d7\u3059\u308b\u8a2d\u5b9a<br \/>\n<\/span><span class=\"gp\" style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\"><span class=\"nb\">echo<\/span> <span class=\"s2\">&#8220;gem: &#8211;no-document&#8221;<\/span> &gt;&gt; ~\/.gemrc<\/span><br \/>\n<span class=\"description\">bundler\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/span><span class=\"description\"><\/span><br \/>\n<span class=\"gp\" style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\">gem install bundler -v <span class=\"m\">2<\/span>.3.14 <\/span><\/p>\n<p>\u79c1\u306frails\u306e\u30c7\u30fc\u30bf\u30fc\u306f\u72ec\u7acb\u3057\u305f\u9818\u57df\u3092\u5272\u308a\u5f53\u3066\u3066\u3044\u3066\u3001\u305d\u3053\u306b\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">sudo mkdir \/\u30e9\u30a4\u30ea\u30b9\u3092\u4fdd\u5b58\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea<\/span><br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">sudo chown -R \u30e6\u30fc\u30b6\u30fc\u540d. \/\u30e9\u30a4\u30ea\u30b9\u3092\u4fdd\u5b58\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea<\/span><br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">cd \/\u30e9\u30a4\u30ea\u30b9\u3092\u4fdd\u5b58\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea<br \/>\n<\/span><span class=\"gp\" style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\">mkdir environment\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #333333;\">\u2190 \u958b\u767a\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u3092\u4f5c\u308b<\/span><\/span><br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">cd environment<\/span><br \/>\n<span style=\"color: #333333;\">\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u512a\u5148\u9806\u4f4d\u306f\u9ad8\u3044\u65b9\u304b\u3089 rbenv shell, rbenv local, rbenv global \u306e\u9806\u306b\u306a\u3063\u3066\u3044\u308b\u3002\u524d\u306b\u30b0\u30ed\u30fc\u30d0\u30eb\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u304clocal\u3082\u8a2d\u5b9a\u3057\u3066\u304a\u304f<\/span><br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">rbenv local 3.2.2<\/span><br \/>\n<span style=\"color: #333333;\">\u30c6\u30b9\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0 hello_app \u3092\u4f5c\u308b<br \/>\n<\/span><span class=\"hll\"><span class=\"gp\" style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\">rails _7.0.6_ new hello_app &#8211;skip-bundle<span style=\"color: #333333;\"><br \/>\n\u8272\u3005\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3002\u6b21\u306fGemfile\u306e\u7de8\u96c6<br \/>\n<span style=\"color: #ff6600;\">$ <span style=\"color: #008000;\">c<\/span><\/span><span style=\"color: #008000;\">d hello_app<\/span><br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">gedit Gemfile<\/span><br \/>\n<\/span><\/span><\/span><\/p>\n<p><span style=\"color: #0000ff;\">source &#8220;https:\/\/rubygems.org&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">git_source(:github) { |repo| &#8220;https:\/\/github.com\/#{repo}.git&#8221; }<\/span><\/p>\n<p><span style=\"color: #0000ff;\">ruby &#8220;3.2.2&#8221;<\/span><\/p>\n<p><span style=\"color: #0000ff;\">gem &#8220;rails&#8221;, &#8220;7.0.6&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;sprockets-rails&#8221;, &#8220;3.4.2&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;importmap-rails&#8221;, &#8220;1.1.0&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;turbo-rails&#8221;, &#8220;1.1.1&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;stimulus-rails&#8221;, &#8220;1.0.4&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;jbuilder&#8221;, &#8220;2.11.5&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;puma&#8221;, &#8220;5.6.4&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;bootsnap&#8221;, &#8220;1.12.0&#8221;, require: false<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;sqlite3&#8221;, &#8220;1.4.2&#8221;<\/span><\/p>\n<p><span style=\"color: #0000ff;\">group :development, :test do<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;debug&#8221;, &#8220;1.5.0&#8221;, platforms: %i[ mri mingw x64_mingw ]<\/span><br \/>\n<span style=\"color: #0000ff;\">end<\/span><\/p>\n<p><span style=\"color: #0000ff;\">group :development do<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;web-console&#8221;, &#8220;4.2.0&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">end<\/span><\/p>\n<p><span style=\"color: #0000ff;\">group :test do<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;capybara&#8221;, &#8220;3.37.1&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;selenium-webdriver&#8221;, &#8220;4.2.0&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">gem &#8220;webdrivers&#8221;, &#8220;5.0.0&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">end<\/span><\/p>\n<p><span style=\"color: #333333;\">ruby\u3068rails\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3068\u306f\u9055\u3046<br \/>\ngem\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u30ed\u30c3\u30af\u3057\u3066\u304a\u304f<br \/>\n<\/span><span class=\"hll\"><span class=\"gp\" style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\">bundle _2.3.14_ install<\/span><br \/>\n<\/span><span class=\"hll\"><span class=\"gp\" style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\">bundle _2.3.14_ lock &#8211;add-platform x86_64-linux<br \/>\n<span style=\"color: #333333;\">\u6b21\u306b\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u8ffd\u52a0\u3057\u3001rails\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308bWEB\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b<\/span><span style=\"color: #ff0000;\">(\u8ffd\u52a0\u3057\u305f\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u306e\u4f5c\u696d\uff09<br \/>\n<span style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\">cd <\/span><\/span> \/\u30e9\u30a4\u30ea\u30b9\u3092\u4fdd\u5b58\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\/environment\/hello_app<br \/>\n<span style=\"color: #ff6600;\">$<\/span> bundle install &#8211;gemfile \/\u30e9\u30a4\u30ea\u30b9\u3092\u4fdd\u5b58\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\/environment\/hello_app\/Gemfile<br \/>\n\u3042\u308c\u30fc\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3044\u308b<br \/>\n<span style=\"color: #ff0000;\">An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.<\/span><br \/>\n<span style=\"color: #333333;\">\u3053\u308c\u306fsqlite-devel\u3092\u5165\u308c\u308c\u3070\u3044\u3044\u307f\u305f\u3044<\/span><br \/>\n<span style=\"color: #ff6600;\">$<\/span> sudo dnf install sqlite-devel\u00a0\u00a0 \u3000<span style=\"color: #333333;\">\u2190\u3053\u306e\u6642yum.repo.d\u306ealmalinux-crb.repo\u306eenabled=\u304c\uff11\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068<\/span><br \/>\n<span style=\"color: #333333;\">\u518d\u5ea6<\/span><br \/>\n<span><span style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\">bundle install &#8211;gemfile \/\u30e9\u30a4\u30ea\u30b9\u3092\u4fdd\u5b58\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\/environment\/hello_app\/Gemfile<\/span><\/span><br \/>\n<span style=\"color: #ff6600;\">$<\/span> rails server<br \/>\n<span style=\"color: #ff6600;\">=&gt; Booting Puma<\/span><br \/>\n<span style=\"color: #ff6600;\">=&gt; Rails 7.0.6 application starting in development <\/span><br \/>\n<span style=\"color: #ff6600;\">=&gt; Run `bin\/rails server &#8211;help` for more startup options<\/span><br \/>\n<span style=\"color: #ff6600;\">Puma starting in single mode&#8230;<\/span><br \/>\n<span style=\"color: #ff6600;\">* Puma version: 5.6.4 (ruby 3.2.2-p53) (&#8220;Birdie&#8217;s Version&#8221;)<\/span><br \/>\n<span style=\"color: #ff6600;\">* Min threads: 5<\/span><br \/>\n<span style=\"color: #ff6600;\">* Max threads: 5<\/span><br \/>\n<span style=\"color: #ff6600;\">* Environment: development<\/span><br \/>\n<span style=\"color: #ff6600;\">* PID: 42058<\/span><br \/>\n<span style=\"color: #ff6600;\">* Listening on http:\/\/127.0.0.1:3000<\/span><br \/>\n<span style=\"color: #ff6600;\">* Listening on http:\/\/[::1]:3000<\/span><br \/>\n<span style=\"color: #ff6600;\">Use Ctrl-C to stop<\/span><\/span><\/span><\/p>\n<p><span class=\"hll\" style=\"color: #333333;\">\u305d\u3057\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u306eURL\u6b04\u306blocahost:3000<br \/>\n\u3068\u5165\u529b\u3057\u305f\u3089<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.kinryo.net\/wp-content\/uploads\/2023\/08\/rails1.png\" alt=\"\" class=\"alignnone size-full wp-image-3456\" width=\"732\" height=\"516\" srcset=\"https:\/\/www.kinryo.net\/wp-content\/uploads\/2023\/08\/rails1.png 732w, https:\/\/www.kinryo.net\/wp-content\/uploads\/2023\/08\/rails1-300x211.png 300w, https:\/\/www.kinryo.net\/wp-content\/uploads\/2023\/08\/rails1-150x106.png 150w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/span>\u3068\u8868\u793a\u3055\u308c\u305f<\/p>\n<p>\u5143\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u306b\u623b\u3063\u3066\u3001\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">gedit app\/controllers\/application_controller.rb<\/span><br \/>\n<span style=\"color: #ff6600;\">class ApplicationController &lt; ActionController::Base<\/span><br \/>\n<span style=\"color: #ff6600;\">\u00a0 def hello<span style=\"color: #333333;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u2190 \u3053\u3053\u304b\u30893\u884c\u3092\u8ffd\u8a18<\/span><\/span><br \/>\n<span style=\"color: #ff6600;\">\u00a0\u00a0\u00a0 render html: &#8220;hello, world&#8221;<\/span><br \/>\n<span style=\"color: #ff6600;\">\u00a0 end<\/span><br \/>\n<span style=\"color: #ff6600;\">end<\/span><br \/>\n\u6b21\u306b\u30eb\u30fc\u30c8\u3092\u8a2d\u5b9a<br \/>\n<span style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\">gedit config\/routes.rb<\/span><br \/>\n<span style=\"color: #ff6600;\">Rails.application.routes.draw do<\/span><br \/>\n<span style=\"color: #ff6600;\">\u00a0 root &#8220;application#hello&#8221;<\/span><br \/>\n<span style=\"color: #ff6600;\">end<br \/>\n<span style=\"color: #333333;\">\u305d\u3057\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u306b\u623b\u3063\u3066\u3001\u518d\u8aad\u307f\u8fbc\u307f\u3092\u3059\u308b\u3068<\/span><br \/>\n<span style=\"color: #333333;\">hello, world\u304c\u8868\u793a\u3055\u308c\u308b<\/span><br \/>\n<\/span><\/p>\n<p>\u5143\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u306e\u623b\u308a\u3001git\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<br \/>\ngit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git &#8211;version<\/span><br \/>\n<span style=\"color: #ff6600;\">git version 2.39.3<\/span><br \/>\n\u6b21\u306b\u540d\u524d\u3068email\u306e\u8a2d\u5b9a<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git config &#8211;global user.name kk-otake<\/span><br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git config &#8211;global user.email \u30e1\u30a2\u30c9<\/span><br \/>\n\u78ba\u8a8d\u306f git config user.name \u306a\u3069\u3067\u51fa\u6765\u308b\u3002\u6b21\u306f\u3001Git\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30d6\u30e9\u30f3\u30c1\u540d\u306e\u8a2d\u5b9a\u3067\u3059<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git config &#8211;global init.defaultBranch main<\/span><br \/>\n\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u8a2d\u5b9a\u3057\u3066\u7f6e\u304f\u3068\u4fbf\u5229\u306a\u306e\u3067\u3001<span class=\"description\"><code>git s<\/code>\u3092status\u306e\u30a8\u30a4\u30ea\u30a2\u30b9\u306b\u8a2d\u5b9a\u3059\u308b<\/span><br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git config &#8211;global alias.s status<\/span><br \/>\n\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3059\u308b\u305f\u3073\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u306a\u304f\u3066\u6e08\u3080\u3088\u3046\u306b\u8a8d\u8a3c\u60c5\u5831\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u3002<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git config &#8211;global credential.helper &#8220;cache &#8211;timeout=86400&#8221;<\/span><br \/>\n\u3053\u308c\u30671\u65e5\u306b\u8a2d\u5b9a\u3055\u308c\u305f\u3002<br \/>\n\u65b0\u3057\u3044\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u521d\u671f\u5316<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git init<\/span><br \/>\n<span style=\"color: #ff6600;\">Reinitialized existing Git repository in \/Rails\/environment\/hello_app\/.git\/<\/span><br \/>\n\u5168\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u8ffd\u52a0<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git add -A<\/span><br \/>\ngit\u306e\u30b9\u30c6\u30a4\u30bf\u30b9\u3092\u898b\u3066\u307f\u308b<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git s<\/span><br \/>\n<span style=\"color: #ff6600;\">On branch main<\/span><\/p>\n<p><span style=\"color: #ff6600;\">No commits yet<\/span><\/p>\n<p><span style=\"color: #ff6600;\">Changes to be committed:<\/span><br \/>\n<span style=\"color: #ff6600;\">(use &#8220;git rm &#8211;cached &lt;file&gt;&#8230;&#8221; to unstage)<\/span><br \/>\n<span style=\"color: #ff6600;\">new file: .gitattributes<\/span><br \/>\n<span style=\"color: #ff6600;\">new file: .gitignore<\/span><br \/>\n<span style=\"color: #ff6600;\">new file: .ruby-version<\/span><br \/>\n<span style=\"color: #ff6600;\">\u5f8c\u7565<\/span><\/p>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u4fdd\u5b58\uff08\u30b3\u30df\u30c3\u30c8\uff09\u3059\u308b<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git commit -m &#8220;Initialize repository&#8221;<\/span>\u3000\u3000\u2190 -m\u306f\u30b3\u30e1\u30f3\u30c8<br \/>\n<span style=\"color: #ff6600;\">[main (root-commit) a6e33ca] Initialize repository<\/span><br \/>\n<span style=\"color: #ff6600;\">70 files changed, 1170 insertions(+)<\/span><br \/>\n<span style=\"color: #ff6600;\">create mode 100644 .gitattributes<\/span><br \/>\n<span style=\"color: #ff6600;\">create mode 100644 .gitignore<\/span><br \/>\n<span style=\"color: #ff6600;\">\u5f8c\u7565<\/span><\/p>\n<p>\u30ed\u30b0\u3092\u898b\u3066\u307f\u308b<\/p>\n<p><span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git log<\/span><br \/>\n<span style=\"color: #ff6600;\">commit a6e33cab770514bc9f373bd962102bab8f4663d3 (HEAD -&gt; main)<\/span><br \/>\n<span style=\"color: #ff6600;\">Author: f-otake &lt;otake@inpac.jp&gt;<\/span><br \/>\n<span style=\"color: #ff6600;\">Date: Thu Aug 10 09:23:22 2023 +0900<\/span><br \/>\n<span style=\"color: #ff6600;\">Initialize repositor<\/span><\/p>\n<p>Git\u306e\u30d6\u30e9\u30f3\u30c1\uff08Branch\uff09<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git switch -c modify-README<\/span><br \/>\n<span style=\"color: #ff6600;\">Switched to a new branch &#8216;modify-README&#8217;<\/span><br \/>\n<span style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\">git branch<\/span><br \/>\n<span style=\"color: #ff6600;\">main<\/span><br \/>\n<span style=\"color: #ff6600;\">* modify-README<\/span><br \/>\n*\u304c\u3064\u3044\u3066\u3044\u308b\u6240\u304c\u4f7f\u7528\u4e2d\u306e\u30d6\u30e9\u30f3\u30c1<br \/>\nGit\u306e\u7de8\u96c6\uff08Edit\uff09<br \/>\n\u7df4\u7fd2\u306e\u70baREADME.md\u3092\u7de8\u96c6<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">gedit README.md<\/span><\/p>\n<p><span style=\"color: #ff6600;\"># Ruby on Rails Tutorial<\/span><\/p>\n<p><span style=\"color: #ff6600;\">## &#8220;hello, world!&#8221;<\/span><\/p>\n<p><span style=\"color: #ff6600;\">This is the first application for the<\/span><br \/>\n<span style=\"color: #ff6600;\">[*Ruby on Rails Tutorial*](https:\/\/railstutorial.jp\/)<\/span><br \/>\n<span style=\"color: #ff6600;\">by [Michael Hartl](https:\/\/www.michaelhartl.com\/). Hello, world!<\/span><\/p>\n<p>\u305d\u3057\u3066\u4fdd\u5b58\u5f8c\u3001\u78ba\u8a8d<span style=\"color: #ff6600;\"><br \/>\n$<\/span> <span style=\"color: #008000;\">git status<\/span><br \/>\n<span style=\"color: #ff6600;\">On branch modify-README<\/span><br \/>\n<span style=\"color: #ff6600;\">Changes not staged for commit:<\/span><br \/>\n<span style=\"color: #ff6600;\">(use &#8220;git add &lt;file&gt;&#8230;&#8221; to update what will be committed)<\/span><br \/>\n<span style=\"color: #ff6600;\">(use &#8220;git restore &lt;file&gt;&#8230;&#8221; to discard changes in working directory)<\/span><br \/>\n<span style=\"color: #ff6600;\">modified: README.md<\/span><\/p>\n<p><span style=\"color: #ff6600;\">no changes added to commit (use &#8220;git add&#8221; and\/or &#8220;git commit -a&#8221;)<\/span><\/p>\n<p>\u3067\u3082\u3063\u3066\u3001\u30b3\u30df\u30c3\u30c8\uff08\u30aa\u30d7\u30b7\u30e7\u30f3-a\u306f\u3059\u3079\u3066\u306e\u5909\u66f4\u30d5\u30a1\u30a4\u30eb\uff08<code>git mv<\/code>\u3067\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3082\u542b\u3080\uff09\u3092\u307e\u3068\u3081\u3066\u30b3\u30df\u30c3\u30c8\uff09<br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git commit -a -m &#8220;Improve the README file&#8221;<\/span><br \/>\n<span style=\"color: #ff6600;\">[modify-README ca00142] Improve the README file<\/span><br \/>\n<span style=\"color: #ff6600;\">1 file changed, 5 insertions(+), 22 deletions(-)<\/span><br \/>\n<span style=\"color: #333333;\">Git\u306e\u30de\u30fc\u30b8\uff08Merge\uff09<\/span><\/p>\n<p><span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git switch main<\/span><br \/>\n<span style=\"color: #ff6600;\">Switched to branch &#8216;main&#8217;<\/span><br \/>\n<span style=\"color: #ff6600;\">$<\/span> <span style=\"color: #008000;\">git merge modify-README<\/span><br \/>\n<span style=\"color: #ff6600;\">Updating a6e33ca..ca00142<\/span><br \/>\n<span style=\"color: #ff6600;\">Fast-forward<\/span><br \/>\n<span style=\"color: #ff6600;\">README.md | 27 +++++&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/span><br \/>\n<span style=\"color: #ff6600;\">1 file changed, 5 insertions(+), 22 deletions(-)<\/span><\/p>\n<p><span style=\"color: #333333;\">\u5909\u66f4\u3092\u30de\u30fc\u30b8\u3057\u305f\u5f8c\u306f\u3001<code>git branch -d<\/code>\u3092\u5b9f\u884c\u3057\u3066\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\u3092\u524a\u9664<br \/>\n<span style=\"color: #ff6600;\">$ <\/span><span style=\"color: #008000;\">git branch -d modify-README<\/span><br \/>\n<span style=\"color: #ff6600;\">Deleted branch modify-README (was ca00142).<\/span><\/span><span style=\"color: #ff0000;\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u3084\u3089\u306a\u3044\u4eba\u306f\uff18\uff1arails\u306e\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u3092mariadb\u306b\u3059\u308b \u306b\u9032\u3093\u3067\u304f\u3060\u3055\u3044\u3002 https:\/\/railstutorial.jp\/chapters\/beginning?version=7.0#cha &hellip; <a href=\"https:\/\/www.kinryo.net\/?p=3447\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"vkexunit_cta_each_option":"","footnotes":""},"categories":[28],"tags":[],"class_list":["post-3447","post","type-post","status-publish","format-standard","hentry","category-ruby-on-rails-almalinux9"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/3447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3447"}],"version-history":[{"count":18,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/3447\/revisions"}],"predecessor-version":[{"id":4454,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/3447\/revisions\/4454"}],"wp:attachment":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}