作業ログ rails new 2019/10/12

新しいアイデアを閃いたので、MVP(Minimum Viable Product)を作って反応を見てみようと思います。

今回は特に技術的に難しそうなところもなさそうなのでオーソドックスなRailsアプリケーションになりそうな予感がしています。

まずはリポジトリを作ったのでgit cloneするところから始めます。

いつもプロダクト名を決めるのに時間が掛かってしまうので、開発段階では適当に「木」の名前をプロジェクト名にしています。

今回はalder(ハンノキ)です。

$ git clone  git@github.com:kenta-s/alder.git

とりあえずなんとなく使いたい技術

ここ数カ月MiniTestを使っているんですが、どうも自分はやっぱりRSpecのほうが好みなので今回はRSpecでいきます。

あと単に自分が慣れておきたいという理由でReact/Reduxを使います。

$ cd alder
$ bundle init
$ vim Gemfile
$ bundle
$ bundle exec rails -v
Rails 6.0.0

$ bundle exec rails new . --skip-turbolinks --skip-test -d mysql
$ bundle
$ bundle exec rails db:create
RAILS_ENV=development environment is not defined in config/webpacker.yml, falling back to production environment
Created database 'alder_development'
Created database 'alder_test'

RSpecとFactoryBotを追加

github.com

github.com

$ bundle exec rails g rspec:install
$ bundle exec rspec
No examples found.


Finished in 0.00027 seconds (files took 0.41064 seconds to load)
0 examples, 0 failures

とりあえずここでgit commitしてターンエンドです

次の記事以降でmodelとcontrollerを作っていきます。