Rails関連のことを調べてみた2020年05月10日

Rails関連のことを調べてみた2020年05月10日

モデルの作成とマイグレーション

#モデル作成の流れ
ここではTaskモデルを作成する流れを示します。
はじめに以下のコードを入力します。

“`
#フレームワーク
$ bin/rails g model [モデル名] [属性名:データ型] [属性名:データ型] …

$ bin/rails g model Task name:string description:text
“`
これで以下のファイルが生成されます。
・モデルクラスのソースコード(task.rb)
・マイグレーションファイル(2020~_create_task.rb)
・モデルの自動テスト(task_test.rb)
・モデルの自動テストで使うfixtureファイル(tasks.yml)

ここでマイグレーションファイルとは、データベース構造への変更が示されたファイルのこと。
マイグレーションファイルの中身は以下の通りになっています。

“`2020~_create_task.rb
class CreateTasks < ActiverecordMigration[5.2] def change create_table :t

元記事を表示

RSpecでApplicationHelperのメソッドを使いたいとき

テストファイルでも、ヘルパーメソッドを使いたいときってありますよね。

`ApplicationHelper`を使いたい場合を想定します。

## 複数のファイルで利用したいとき
`spec/rails_helper.rb`で`ApplicationHelper`を`include`すればよいです。

“`spec/rails_helper.rb
include ApplicationHelper
“`

`spec`ファイルは基本的にどれもトップレベルで`require rails_helper`しているはずなので、`spec/rails_helper.rb`で`include`してあげっちゃえばよいわけです。

## 1つのファイルでのみ利用したいとき
対象のテストファイルで`ApplicationHelper`を`include`すればよいです。
例にSystemSpecを挙げます。

“`spec/systems/sample_spec.rb
include ApplicationHelper
“`

## もし`include`を忘れたら
もし`include`を忘れ

元記事を表示

Rubyの配列・ブロックの基礎についてまとめてみた。

#配列の特徴
●インデックス指定で要素を取り出す

“`sample.rb
n = [1, 2, 3]
n[1] #=>2
“`

●どんなオブジェクトも混在して入れる事ができる。

“`
s = [‘osaka’, 1, :hello]
“`

●存在しない要素を指定するとnilが返ってくる

“`sample.rb
n = [10, 20 ,30]
n[3] #=>nil
“`

●<<で配列の最後に要素を追加できる ```sample.rb food = ["apple", "peech"] food << "natto" food #=>[“apple”, “peech”, “natto”]
“`

#ブロックについて
>メソッド呼び出しの際に引数と一緒に渡すことのできる処理のかたまり | たのしいRuby

例えばこんなものです。

“`sample.rb
words = [‘a’,’p’,’p’,’l’,’e’]
food = “” #カラの文字列

words.each do |w|
food += w
end

puts food

#=>app

元記事を表示

【RSpec】sleepは使うな

## 発生した問題

`Cancel my account`ボタンをクリックすると`Are you sure?`という確認のポップアップが表示され、
「OK」を押すとユーザーが削除される、といった(ごく普通の)ユーザー削除機能のテストを書きました。

“`ruby
describe ‘ユーザー削除’, js: true do
it ‘ユーザーが削除されること’ do
expect(User.count).to eq(1)

click_button ‘Cancel my account’
page.accept_confirm ‘Are you sure?’

expect(User.count).to eq(0)
end
end
“`

結果、失敗(; ・`ω・´)

“`zsh
Failures:

1) Users::RegistrationsController ユーザー削除 ユーザーが削除されること
Failure/Error: expect(User.count).to eq(0)

元記事を表示

異なるdocker-composeのMySQLコンテナのデータをRailsに流し込む

レアケースなのであまり参考にならないかもしれませんが、将来の私に何か役に立つことがあるかもしれないので、念の為残しておく備忘録です。

# 背景

関係のない2つのMySQLコンテナが存在している。
片方は非RailsのMySQLデータベース、片方はRailsのマイグレーションで作られたMySQLデータベース。
いずれも別々のdocker-compose環境で動作している。

今回は非RailsのデータをRailsのデータベースに流し込む需要があって、
割とサクッと実現できたので、環境の設定や手法を以下に記します。

# docker-compose.yml

行頭に `+` がついている行が、今回の作業のために追加した設定です。
別々のdocker-compose環境を同一networkで繋ぐために設定を追加します。

## 非Rails環境

“`diff:docker-compose.yml
version: ‘2’
services:
mysql:
container_name: mysql
image: mysql:5.7.21
po

元記事を表示

【Mac】rbenvがインストールできないときの解決方法

#エラー内容の確認
下記のようなエラー内容になったことでrbenvがインストールできないときのエラーの解消方法についてご紹介します。

“`
$ brew install rbenv
The program ‘brew’ is currently not installed. To run ‘brew’ please ask your administrator to install the package ‘linuxbrew-wrapper’
“`

### Linuxbrewのインストール
エラーの記述内容にLinuxbrewをインストールしてくださいとありますので下記のコマンドを実行します。

“`
$ sh -c “$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)”
“`
するとまたエラー内容が表示されてしまいました!

“`
Warning: /home/linuxbrew/.linuxbrew/bin is not in your PATH.

元記事を表示

フレームワークについて知ろう!

##フレームワークとは?
そもそもフレームワークとはなんなのでしょうか?
簡単にいうと枠組みのことです。

Webアプリケーションを作成する際に、フレームワークでアプリケーションの雛形を作成します。webアプリケーション開発に必要なファイルを自動で作ってくれるので、それらを編集することで、効率的にwebアプリケーション開発ができます。

##フレームワークの種類
フレームワークはWebアプリケーション開発で用いられる各プログラミング言語ごとに存在します。

Ruby | Ruby on Rails、Sinatra
PHP | Laravel、CakePHP
Java | Spring Framework、Java EE

などがあります。

フレームワークを使うことで簡単にアプリを作ることができるので活用してみてはいかがでしょうか。

最後までご覧いただきありがとうございます。

元記事を表示

【Ridgepole】カラムを指定して外部キーを加える

こんにちは。Webエンジニアのインターンを始めて早くも20日が経ちそうな見習いプログラマです。

仕事はまだチュートリアルを行なっている段階なのですが、現場のレベルが高いので本格的な業務に参画するのが楽しみですね!

# What
RailsによるWebアプリケーション開発において、データベースのスキーマを管理する際に**ridgepole**を使うことがあると思います。

この記事では、ridgepoleでスキーマを管理する際に、”**外部キー制約を加えるにはどうしたら良いか**”を簡単にまとめます。

また、外部キー制約をつける際、”**カラムを指定して外部キーを加えるにはどうしたら良いか**”そして”**どんな場合にカラムを指定して制約を加える必要があるのか**”についても並行して簡単にまとめます。

# Why
現在Rails開発のチュートリアルを行なっており、その一環としてTwitterのようなページを作成しています。

しかし、ridgepoleの外部キー制約に関する記事や情報が少なく苦戦した箇所がいくつかありました。

特にModelで、has_many: through

元記事を表示

has_many, has_many through など関連付けについてのメモ

関連付けに関してごっちゃになりそうなのでメモ。

間違い箇所などありましたらご指摘お願いします。

# has_many
例えばあるユーザー(User)が複数のタスク(Task)を持っていて、それを関連付ける場合などで用いるメソッド。

“`user.rb
class User < ApplicationRecord has_many :tasks end ``` この場合は、 ユーザーがタスクモデルを見つけ出し、デフォルトでこのクラス(ここではUser)の名前 + \_id のと定義されているカラムを外部キーとみなす。 つまりここでは、UserがTaskを見つけ出し、そのTaskのuser\_idカラムを外部キーとして扱うことにより、関連づく。 当たり前だが、UserのidとTaskのuser\_idが関連づくことになる。 Taskにuser\_idが存在しなければ外部キーを他のカラムに指定しない限り、関連づけることができない。 Taskインスタンスを作成するときに、外部キーにUserのidを入れる必要があるが、その場合は ``` # userに何らかのインスタンスが

元記事を表示

Bootstrapとfont-awesomeをRailsにインストールするやり方 Githubを参考に

# はじめに
Railsにデザインを整えるBootstrapとアイコンを使えるようになるfont-awesomeのgemを導入する方法を紹介します。それぞれのgemのGithabのページを参考にしました。
#Bootstrapの導入方法
まずGemfileにgemを追加します。

“`ruby:
gem ‘bootstrap’, ‘~> 4.4.1’
“`
`sprockets-rails gem` がv2.3.2以上であることを確認しておいてください。
次に、`bundle insall`を実行して、サーバーを再起動します。

次はマニフェストファイルである`app/assets/stylesheets/application.scss`に読み込ませます。拡張子が.scssになっているか確認しとく。

“`application.scss
@import “bootstrap”;
“`

Bootstrap JavaScriptはJQueryに依存しているので、Rails 5.1以上を利用している場合は、`jquery-rails` gem をGemfileに加える必要があり

元記事を表示

【Rails】hamlで画像を呼び出す

#背景
hamlで画像を呼び出すことを自分用のメモとして残す。

#手順
1:app/assets/images/ に対象画像を置く。 例) app/assets/images/test.png
2:呼び出し

“`test.html.haml
= image_tag ‘test.png’, class: ”, heigth: ”, weigth: ”

“`
 

元記事を表示

Rails form_with 解説してみる

どうもチャンクノです。
今回は前回の記事で書いたform_withの解説をしてみようかなと思います。
間違ってる部分ありましたら修正するのでコメントにて伝えてください。

はい、では以下のコードをご覧ください。

“`
<%= form_with model: [:user, current_user], url: user_user_profile_path, local: true do |f| %>
<%= f.fields_for :user_profile, current_user.user_profile || current_user.build_user_profile do |profile| %>
<%= profile.text_field :name %>
<% end %>
<%= f.fields_for :user_address, current_user.user_address || current_user.build_user_address do |address| %>
<%= address.text_fie

元記事を表示

【rails】RSpecによる単体テスト

Rspecを用いることでアプリケーションの単体の機能をテストすることができる。

### テスト対象のバリデーション

以下では、モデルに記載されたバリデーションの動作テストを例として扱う。

次のとおり、userモデルにバリデーションが記載されていて、データ保存時に次の条件をチェックしている。
 ・nicknameカラムの値が入っていること
 ・nicknameカラムの値の長さが、最大6文字であること
 ・emailカラムの値が入っていること

“`rails:app/models/user.rb
class User < ApplicationRecord # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :remembera

元記事を表示

enumをセレクトボックスで扱う方法

# 背景
enumの値をセレクトボックスで使いたくて調べていたが、どれも難しく書いてあり分かりにくかったので自分なりにまとめてみました!

## enumとは
こちらの記事を参照ください!
https://qiita.com/ren0826jam/items/2870486578dc530c7074

##手順
1.マイグレーションファイルを作成する。
※今回はProductモデルの以下のカラムのデータをenumを活用して保存します。

“`20××××××××××.rb

class CreateProducts < ActiveRecord::Migration[5.2] def change create_table :products do |t| 省略 t.integer :status, null: false t.integer :bear, null: false t.integer :days, null: false 省略 end end end ``` 2.enumの設定を記述する。 ```model

元記事を表示

provideメソッド

#provideメソッド
“`
<% provide(:title, "Home") %> 
パラメータの引き渡し(定義みたいな感じ)
“`
“`
<%= yield(:title) %> | Ruby on Rails Tutorial Sample App
<%= yield(:title) %> ← Homeが入る<br /> “`<br /> 連想配列のキーと値みたいなもんかな?? </p></blockquote> </blockquote> <aside class='widget widget-post'> <div class='tag-cloud-link'>Rails</div> <div class='tag-cloud-link'>provideメソッド</div> </aside> <div><a style='width:100%;' class='btn__link' href='https://qiita.com/t_k0123/items/187f8466ad81465074aa'>元記事を表示</a></div> <h3 id="outline__16"><a href='https://qiita.com/ruby55tomo/items/467b5cddb4e228cc383f'>TECH CAMP 5週目</a></h3> <blockquote><p>Chat-spaceの実装が一段落し、次はそのデプロイに向けて学習を行いました。そして課題は完了。いよいよ自分だけの力でアプリケーションを作る時がきました。</p> <p>【学習内容】<br /> ・サーバーの基礎知識<br /> ・AWS<br /> ・個人アプリ制作</p> <p>実は私、前職は工場で働いていました。実際に製品を作るラインに約12年、管理者になって約1年、そして別の工場に出向になってそこで管理職として3年。出向先の工場では主に課長職とTCD(Total cost down)担当、QCC(Quality control circle)教育担当に従事し、原価低減活動、品質向上活動の取りまとめや社員教育を行なってきました。<br /> よく「生産性」という言葉を耳にしますが、工場なんかではかなりシビアに数値でのやり取りが行われます。作業における社員の歩く秒数さえもストップウォッチで計測し、その時間を1秒でも縮めようと努力します。そしてその積み重ねが例えば残業時間30時間/月が0時間/月になったりと、会社にとって大きな利益へと繋がっていきます。それは”急いで作業をやれ”ではなく仕組みや手順の観点から改善を行います。<br /> なので、「生産性」という言葉</p></blockquote> </blockquote> <aside class='widget widget-post'> <div class='tag-cloud-link'>Rails</div> <div class='tag-cloud-link'>Linux</div> <div class='tag-cloud-link'>AWS</div> </aside> <div><a style='width:100%;' class='btn__link' href='https://qiita.com/ruby55tomo/items/467b5cddb4e228cc383f'>元記事を表示</a></div> <h3 id="outline__17"><a href='https://qiita.com/ohnitakahiro/items/b9190ab12fc19d1d38f1'>【Rails】アソシエーション 違う名前で呼び出す</a></h3> <blockquote><p>##目的<br /> アソシエーションを利用して、違う名前で呼び出した方がわかりやすい<br /> けど、どう書いたらいいかわからない<br /> そんな時のオプション、class_nameについてまとめます。</p> <p>## class_nameオプション<br /> 関連を設定するモデルクラス名を指定</p> <p>利用場面としては、関連名と参照先のクラス名を変えたい時に使う</p> <p>“`ruby:model/event.rb<br /> class Event < ActiveRecord::Base belongs_to :user has_many :comments end ``` 上記はイベントがユーザーに属するぞと 書いてあります。 したがって @event.user という感じで、ユーザーをメソッドで呼び出すことができるのですが .userをここはオーナーと書いた方が意味が通じやすい、というケースは下記のように書き換えられます。 ```ruby:model/event.rb class Event < ActiveRecord::Base belongs_to :owner, class_name: 'User' has_m</p></blockquote> </blockquote> <aside class='widget widget-post'> <div class='tag-cloud-link'>Ruby</div> <div class='tag-cloud-link'>Rails</div> </aside> <div><a style='width:100%;' class='btn__link' href='https://qiita.com/ohnitakahiro/items/b9190ab12fc19d1d38f1'>元記事を表示</a></div> <h3 id="outline__18"><a href='https://qiita.com/seahal/items/71205f7d53b67ec7a926'>Rails 6 の pararell test がうまく行っていない皆様へ</a></h3> <blockquote><p># はじめに<br /> Rails 6 でパラレルテストをやりたいけど、なんかうまくいかない、という方が読んでいただけたら参考になるかもしれないことを書いていこうと思います。</p> <p># やったこと<br /> Headless Chrome なんかを使うシステムテストでは `PARALLEL_WORKERS=1` とすることで、並列でテストを動かすことを諦めましょう。それ以外のテストはお持ちの機材に合わせて `PARALLEL_WORKERS=$(grep processor /proc/cpuinfo | wc -l)` とでもしとけば動いてくれると思います。コードは [Github](https://github.com/seahal/qiita) にもあるので「エスパーかよ…」という方は、そっちも見ていだければと思います。</p> <p># おわりに<br /> あんまり理解してないで、やってみたらうまくいきました。ちゃんと動く理由とか根拠とかは聞かないでください…</p> <p># 編集履歴<br /> 1. Github Actions で落ちていたので、なかったことにしてください…<br /> 2. Github Actions で動くようになり</p></blockquote> </blockquote> <aside class='widget widget-post'> <div class='tag-cloud-link'>Ruby</div> <div class='tag-cloud-link'>Rails</div> <div class='tag-cloud-link'>minitest</div> </aside> <div><a style='width:100%;' class='btn__link' href='https://qiita.com/seahal/items/71205f7d53b67ec7a926'>元記事を表示</a></div> <h3 id="outline__19"><a href='https://qiita.com/keijis/items/86060679a4191b83bf59'>いきなりの躓き rails 環境について</a></h3> <blockquote><p>progateで勉強を始めました。progateにそって環境構築を進めていましたが<br /> rails sとする際に</p> <p>required)>’<br /> C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:in `require’: cannot load such file — sqlite3/sqlite3_native (LoadError)</p> <p>と出て先に進めません。sqlite3がうまくDL出来ていないのでしょうか?</p> <p>どなたかご教授いただけないでしょうか?</p> <p>windows10使用です </p></blockquote> </blockquote> <aside class='widget widget-post'> <div class='tag-cloud-link'>Ruby</div> <div class='tag-cloud-link'>Rails</div> <div class='tag-cloud-link'>SQLite3</div> </aside> <div><a style='width:100%;' class='btn__link' href='https://qiita.com/keijis/items/86060679a4191b83bf59'>元記事を表示</a></div> <h3 id="outline__20"><a href='https://qiita.com/chiaki-kjwr/items/b9d5d4b6d12a0ac05ac9'>【Rspec】Devise::MissingWardenエラーの解決策</a></h3> <blockquote><p>##状況<br /> Rspecのコントローラースペックを実装中に表題のエラーが発生しました。<br /> 初めて見るエラー文で戸惑ったのですが、解決策がシンプルだったため記載します。</p> <p>##環境<br /> railsを用いたアプリ開発中で、deviseを用いたユーザー登録機能を実装している。</p> <p><img decoding="async" width="774" alt="スクリーンショット 2020-05-09 14.07.03.png" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/565338/4847b6fc-fd8f-a6a1-a135-7084b44b2a94.png?test=1&y=n"></p> <p>##解決策</p> <p>結論から。<br /> エラー文には</p> <p>“`</p> <p> Make sure that your application is loading Devise<br /> and Warden as expected and that the `Warden::Manager`<br /> middleware is present in your middleware stack.<br /> If you </p></blockquote> </blockquote> <aside class='widget widget-post'> <div class='tag-cloud-link'>Rails</div> <div class='tag-cloud-link'>RSpec</div> </aside> <div><a style='width:100%;' class='btn__link' href='https://qiita.com/chiaki-kjwr/items/b9d5d4b6d12a0ac05ac9'>元記事を表示</a></div> </div> </section> <!-- 記事下シェアボタン --> <aside> <ul class="socialList"> <li class="socialList__item"><a class="socialList__link icon-facebook" href="http://www.facebook.com/sharer.php?u=https%3A%2F%2Fmiofactor.com%2F2020%2F05%2F10%2Fpost-4855%2F&t=Rails%E9%96%A2%E9%80%A3%E3%81%AE%E3%81%93%E3%81%A8%E3%82%92%E8%AA%BF%E3%81%B9%E3%81%A6%E3%81%BF%E3%81%9F2020%E5%B9%B405%E6%9C%8810%E6%97%A5" target="_blank" title="Facebookで共有"></a></li><li class="socialList__item"><a class="socialList__link icon-twitter" href="http://twitter.com/intent/tweet?text=Rails%E9%96%A2%E9%80%A3%E3%81%AE%E3%81%93%E3%81%A8%E3%82%92%E8%AA%BF%E3%81%B9%E3%81%A6%E3%81%BF%E3%81%9F2020%E5%B9%B405%E6%9C%8810%E6%97%A5&https%3A%2F%2Fmiofactor.com%2F2020%2F05%2F10%2Fpost-4855%2F&url=https%3A%2F%2Fmiofactor.com%2F2020%2F05%2F10%2Fpost-4855%2F" target="_blank" title="Twitterで共有"></a></li><li class="socialList__item"><a class="socialList__link icon-line" href="http://line.naver.jp/R/msg/text/?Rails%E9%96%A2%E9%80%A3%E3%81%AE%E3%81%93%E3%81%A8%E3%82%92%E8%AA%BF%E3%81%B9%E3%81%A6%E3%81%BF%E3%81%9F2020%E5%B9%B405%E6%9C%8810%E6%97%A5%0D%0Ahttps%3A%2F%2Fmiofactor.com%2F2020%2F05%2F10%2Fpost-4855%2F" target="_blank" title="LINEで送る"></a></li></ul> </aside> <!-- /記事下シェアボタン --> <!-- 記事下エリア[widget] --> <aside class="widgetPost widgetPost-bottom"><aside class="widget widget-post"><h2 class="heading heading-primary">タグ</h2><div class="tagcloud"><a href="https://miofactor.com/tag/%e3%81%9d%e3%81%ae%e4%bb%96/" class="tag-cloud-link tag-link-13 tag-link-position-1" style="font-size: 8pt;" aria-label="その他 (1個の項目)">その他</a></div> </aside></aside> <!-- /記事下エリア[widget] --> <!-- 関連記事 --> <aside class="related"><h2 class="heading heading-primary">関連する記事</h2><ul class="related__list"> <li class="related__item"> <a class="related__imgLink" href="https://miofactor.com/2023/02/15/post-26712/" title="Lambda関連のことを調べてみた2023年02月15日"> <img src="https://miofactor.com/wp-content/uploads/2019/10/lambda-150x150.png" alt="Lambda関連のことを調べてみた2023年02月15日" width="150" height="150" > </a> <h3 class="related__title"> <a href="https://miofactor.com/2023/02/15/post-26712/">Lambda関連のことを調べてみた2023年02月15日</a> <span class="icon-calendar">2023.02.15</span> </h3> <p class="related__contents">目次 1. ChatGPT風に会話が成り立つLINEボット on AWS Lambda2. ChatGPTで「Lambdaにて15分以上の処理を行いた[…]</p> </li> <li class="related__item"> <a class="related__imgLink" href="https://miofactor.com/2023/01/12/post-25802/" title="Node.js関連のことを調べてみた2023年01月12日"> <img src="https://miofactor.com/wp-content/uploads/2019/10/nodejs-150x150.png" alt="Node.js関連のことを調べてみた2023年01月12日" width="150" height="150" > </a> <h3 class="related__title"> <a href="https://miofactor.com/2023/01/12/post-25802/">Node.js関連のことを調べてみた2023年01月12日</a> <span class="icon-calendar">2023.01.12</span> </h3> <p class="related__contents">目次 1. GridDBを用いた小惑星の地球への距離の解析2. 【Firebase】エミュレーターの忘備録3. Rails(6系)のマイナーバージョン[…]</p> </li> <li class="related__item"> <a class="related__imgLink" href="https://miofactor.com/2022/09/21/post-22688/" title="オープンソース調べOSS 2022年09月21日"> <img src="https://miofactor.com/wp-content/uploads/2019/11/967637031-book-168824_1920-YEnY-1920x1280-MM-100-150x150.jpg" alt="オープンソース調べOSS 2022年09月21日" width="150" height="150" > </a> <h3 class="related__title"> <a href="https://miofactor.com/2022/09/21/post-22688/">オープンソース調べOSS 2022年09月21日</a> <span class="icon-calendar">2022.09.21</span> </h3> <p class="related__contents">目次 1. 型情報がないこと由来のエラーに耐えられなかったので、`typeshed`にコントリビュートしたお話2. OSSへのパッチの送り方3. Do[…]</p> </li> </ul></aside> <!-- /関連記事 --> <!-- コメント --> <!-- /コメント --> <!-- PVカウンター --> <!-- /PVカウンター --> </main> <!-- /l-main --> <!-- l-sidebar --> <div class="l-sidebar"> <aside class="widget"> <div class="searchBox"> <form class="searchBox__form" method="get" target="_top" action="https://miofactor.com/" > <input class="searchBox__input" type="text" maxlength="50" name="s" placeholder="記事検索"><button class="searchBox__submit icon-search" type="submit" value="search"> </button> </form> </div></aside><aside class="widget"><h2 class="heading heading-widget">Category</h2> <ul> <li class="cat-item cat-item-1"><a href="https://miofactor.com/category/other/">OTHER</a> </li> </ul> </aside><aside class="widget"><h2 class="heading heading-widget">Back number</h2> <ul> <li><a href='https://miofactor.com/2024/09/'>2024年9月</a></li> <li><a href='https://miofactor.com/2024/08/'>2024年8月</a></li> <li><a href='https://miofactor.com/2024/07/'>2024年7月</a></li> <li><a href='https://miofactor.com/2024/06/'>2024年6月</a></li> <li><a href='https://miofactor.com/2024/05/'>2024年5月</a></li> <li><a href='https://miofactor.com/2024/04/'>2024年4月</a></li> <li><a href='https://miofactor.com/2024/03/'>2024年3月</a></li> <li><a href='https://miofactor.com/2024/02/'>2024年2月</a></li> <li><a href='https://miofactor.com/2024/01/'>2024年1月</a></li> <li><a href='https://miofactor.com/2023/12/'>2023年12月</a></li> <li><a href='https://miofactor.com/2023/11/'>2023年11月</a></li> <li><a href='https://miofactor.com/2023/10/'>2023年10月</a></li> <li><a href='https://miofactor.com/2023/09/'>2023年9月</a></li> <li><a href='https://miofactor.com/2023/08/'>2023年8月</a></li> <li><a href='https://miofactor.com/2023/07/'>2023年7月</a></li> <li><a href='https://miofactor.com/2023/04/'>2023年4月</a></li> <li><a href='https://miofactor.com/2023/03/'>2023年3月</a></li> <li><a href='https://miofactor.com/2023/02/'>2023年2月</a></li> <li><a href='https://miofactor.com/2023/01/'>2023年1月</a></li> <li><a href='https://miofactor.com/2022/12/'>2022年12月</a></li> <li><a href='https://miofactor.com/2022/11/'>2022年11月</a></li> <li><a href='https://miofactor.com/2022/10/'>2022年10月</a></li> <li><a href='https://miofactor.com/2022/09/'>2022年9月</a></li> <li><a href='https://miofactor.com/2022/08/'>2022年8月</a></li> <li><a href='https://miofactor.com/2022/07/'>2022年7月</a></li> <li><a href='https://miofactor.com/2022/06/'>2022年6月</a></li> <li><a href='https://miofactor.com/2022/05/'>2022年5月</a></li> <li><a href='https://miofactor.com/2022/04/'>2022年4月</a></li> <li><a href='https://miofactor.com/2022/03/'>2022年3月</a></li> <li><a href='https://miofactor.com/2022/02/'>2022年2月</a></li> <li><a href='https://miofactor.com/2022/01/'>2022年1月</a></li> <li><a href='https://miofactor.com/2021/12/'>2021年12月</a></li> <li><a href='https://miofactor.com/2021/11/'>2021年11月</a></li> <li><a href='https://miofactor.com/2021/10/'>2021年10月</a></li> <li><a href='https://miofactor.com/2021/09/'>2021年9月</a></li> <li><a href='https://miofactor.com/2021/08/'>2021年8月</a></li> <li><a href='https://miofactor.com/2021/07/'>2021年7月</a></li> <li><a href='https://miofactor.com/2021/06/'>2021年6月</a></li> <li><a href='https://miofactor.com/2021/05/'>2021年5月</a></li> <li><a href='https://miofactor.com/2021/04/'>2021年4月</a></li> <li><a href='https://miofactor.com/2021/03/'>2021年3月</a></li> <li><a href='https://miofactor.com/2021/02/'>2021年2月</a></li> <li><a href='https://miofactor.com/2021/01/'>2021年1月</a></li> <li><a href='https://miofactor.com/2020/12/'>2020年12月</a></li> <li><a href='https://miofactor.com/2020/11/'>2020年11月</a></li> <li><a href='https://miofactor.com/2020/10/'>2020年10月</a></li> <li><a href='https://miofactor.com/2020/09/'>2020年9月</a></li> <li><a href='https://miofactor.com/2020/08/'>2020年8月</a></li> <li><a href='https://miofactor.com/2020/07/'>2020年7月</a></li> <li><a href='https://miofactor.com/2020/06/'>2020年6月</a></li> <li><a href='https://miofactor.com/2020/05/'>2020年5月</a></li> <li><a href='https://miofactor.com/2020/04/'>2020年4月</a></li> <li><a href='https://miofactor.com/2020/03/'>2020年3月</a></li> <li><a href='https://miofactor.com/2020/02/'>2020年2月</a></li> <li><a href='https://miofactor.com/2020/01/'>2020年1月</a></li> <li><a href='https://miofactor.com/2019/12/'>2019年12月</a></li> <li><a href='https://miofactor.com/2019/11/'>2019年11月</a></li> <li><a href='https://miofactor.com/2019/10/'>2019年10月</a></li> </ul> </aside> </div> <!-- /l-sidebar --> </div> <!-- /l-wrapper --> <div class="categoryBox"> <div class="container"> <h2 class="heading heading-primary"> <span class="heading__bg u-txtShdw bgc-darkgray">OTHER</span>カテゴリの最新記事 </h2> <ul class="categoryBox__list"> <li class="categoryBox__item"> <div class="eyecatch eyecatch-archive"> <a href="https://miofactor.com/2024/09/19/post-36890/"> <img src="https://miofactor.com/wp-content/uploads/2019/10/js-554x410.png" alt="JavaScript関連のことを調べてみた" width="554" height="410" > </a> </div> <ul class="dateList dateList-archive"> <li class="dateList__item icon-calendar">2024.09.19</li> </ul> <h2 class="heading heading-archive "> <a class="hc-darkgray" href="https://miofactor.com/2024/09/19/post-36890/">JavaScript関連のことを調べてみた</a> </h2> </li> <li class="categoryBox__item"> <div class="eyecatch eyecatch-archive"> <a href="https://miofactor.com/2024/09/19/post-36891/"> <img src="https://miofactor.com/wp-content/uploads/2019/10/java.jpg" alt="JAVA関連のことを調べてみた" width="540" height="270" > </a> </div> <ul class="dateList dateList-archive"> <li class="dateList__item icon-calendar">2024.09.19</li> </ul> <h2 class="heading heading-archive "> <a class="hc-darkgray" href="https://miofactor.com/2024/09/19/post-36891/">JAVA関連のことを調べてみた</a> </h2> </li> <li class="categoryBox__item"> <div class="eyecatch eyecatch-archive"> <a href="https://miofactor.com/2024/09/19/post-36894/"> <img src="https://miofactor.com/wp-content/uploads/2019/10/ios-554x410.png" alt="iOS関連のことを調べてみた" width="554" height="410" > </a> </div> <ul class="dateList dateList-archive"> <li class="dateList__item icon-calendar">2024.09.19</li> </ul> <h2 class="heading heading-archive "> <a class="hc-darkgray" href="https://miofactor.com/2024/09/19/post-36894/">iOS関連のことを調べてみた</a> </h2> </li> <li class="categoryBox__item"> <div class="eyecatch eyecatch-archive"> <a href="https://miofactor.com/2024/09/19/post-36888/"> <img src="https://miofactor.com/wp-content/uploads/2019/10/rails-725x410.png" alt="Rails関連のことを調べてみた" width="725" height="410" > </a> </div> <ul class="dateList dateList-archive"> <li class="dateList__item icon-calendar">2024.09.19</li> </ul> <h2 class="heading heading-archive "> <a class="hc-darkgray" href="https://miofactor.com/2024/09/19/post-36888/">Rails関連のことを調べてみた</a> </h2> </li> <li class="categoryBox__item"> <div class="eyecatch eyecatch-archive"> <a href="https://miofactor.com/2024/09/19/post-36884/"> <img src="https://miofactor.com/wp-content/uploads/2019/10/lambda.png" alt="Lambda関連のことを調べてみた" width="360" height="230" > </a> </div> <ul class="dateList dateList-archive"> <li class="dateList__item icon-calendar">2024.09.19</li> </ul> <h2 class="heading heading-archive "> <a class="hc-darkgray" href="https://miofactor.com/2024/09/19/post-36884/">Lambda関連のことを調べてみた</a> </h2> </li> <li class="categoryBox__item"> <div class="eyecatch eyecatch-archive"> <a href="https://miofactor.com/2024/09/19/post-36886/"> <img src="https://miofactor.com/wp-content/uploads/2019/10/python-640x410.png" alt="Python関連のことを調べてみた" width="640" height="410" > </a> </div> <ul class="dateList dateList-archive"> <li class="dateList__item icon-calendar">2024.09.19</li> </ul> <h2 class="heading heading-archive "> <a class="hc-darkgray" href="https://miofactor.com/2024/09/19/post-36886/">Python関連のことを調べてみた</a> </h2> </li> </ul> </div> </div> <!-- schema --> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "Article ", "mainEntityOfPage":{ "@type": "WebPage", "@id": "https://miofactor.com/2020/05/10/post-4855/" }, "headline": "Rails関連のことを調べてみた2020年05月10日", "image": { "@type": "ImageObject", "url": "https://miofactor.com/wp-content/uploads/2019/10/python-640x410.png", "height": "410", "width": "640" }, "datePublished": "2020-05-10T11:50:53+0900", "dateModified": "2020-05-10T11:50:53+0900", "author": { "@type": "Person", "name": "editor" }, "publisher": { "@type": "Organization", "name": "f@ctor", "logo": { "@type": "ImageObject", "url": "", "width": "", "height":"" } }, "description": "目次 1. モデルの作成とマイグレーション2. RSpecでApplicationHelperのメソッドを使いたいとき3. Rubyの配列・ブロックの基礎についてまとめてみた。4. 【RSpec】sleepは使うな5. 異なるdocker-composeのMySQLコンテナのデータをRailsに流し込む6. 【Mac】rbenvがインストールできないときの解決方法7. フレームワークについて知ろう […]" } </script> <!-- /schema --> <!--l-footer--> <footer class="l-footer"> <div class="container"> <div class="pagetop u-txtShdw"><a class="pagetop__link" href="#top">Back to Top</a></div> <div class="widgetFoot"> <div class="widgetFoot__contents"> </div> <div class="widgetFoot__contents"> <aside class="widget widget-foot"><h2 class="heading heading-footer">タグ</h2><div class="tagcloud"><a href="https://miofactor.com/tag/%e3%81%9d%e3%81%ae%e4%bb%96/" class="tag-cloud-link tag-link-13 tag-link-position-1" style="font-size: 8pt;" aria-label="その他 (1個の項目)">その他</a></div> </aside> </div> <div class="widgetFoot__contents"> </div> </div> <div class="copySns "> <div class="copySns__copy"> © Copyright 2024 <a class="copySns__copyLink" href="https://miofactor.com">f@ctor</a>. <span class="copySns__copyInfo u-none"> f@ctor by <a class="copySns__copyLink" href="http://fit-jp.com/" target="_blank">FIT-Web Create</a>. Powered by <a class="copySns__copyLink" href="https://wordpress.org/" target="_blank">WordPress</a>. </span> </div> </div> </div> </footer> <!-- /l-footer --> <script type="text/javascript" src="https://miofactor.com/wp-includes/js/comment-reply.min.js?ver=6.4.1" id="comment-reply-js" async="async" data-wp-strategy="async"></script> <script> function toggle__search(){ extra__search.className="l-extra"; extra__menu.className="l-extraNone"; menuNavi__search.className = "menuNavi__link menuNavi__link-current icon-search "; menuNavi__menu.className = "menuNavi__link icon-menu"; } function toggle__menu(){ extra__search.className="l-extraNone"; extra__menu.className="l-extra"; menuNavi__search.className = "menuNavi__link icon-search"; menuNavi__menu.className = "menuNavi__link menuNavi__link-current icon-menu"; } </script><script>Array.prototype.forEach.call(document.getElementsByClassName("css-async"),function(e){e.rel = "stylesheet"});</script> </body> </html>