LoginSignup
2
2

More than 5 years have passed since last update.

「Ruby on Rails Tutorial 3.6 高度なセットアップ」について

Posted at

はじめに

「Ruby on Rails Tutorial 3.6 高度なセットアップ」を試したときの個人的なメモ.

3.6.1は,自分の環境はWindowsなので,スキップした.また3.6.4は,自分はAtomを使ってるので,パス.

3.6.2 Guardによるテストの自動化

Gemfileへのguardとguard-rspecの追加はバージョン指定を外した(自分の環境では依存性の警告みたいなものがでるので).

リスト3-35の追加は

guard :rspec, cmd: "bundle exec rspec" do
    ....
    ....
end

の外側でいいみたい.

3.6.3 Sporkを使ったテストの高速化

Gemfileへの追加部分で,childprocessに関してはバージョン指定外す.外さないとbundle installで文句言われた.

guard-sporkに関してもバージョン指定を外したほうが良いよう.そうしないとbundle exec sporkを実行するとエラーが出る.

drbオプション付けて以下のコマンドを実行.

$ bundle exec rspec spec/requests/static_pages_spec.rb --drb

ここで

「NameError: uninitialized constant RSpec::Core::CommandLine」

とエラーが出る.sporkでNameError: uninitialized constant RSpec::Core::CommandLineになる時の対処法によると対処法があるが,sporkのGem自体をいじる必要があるらしいので,私はここであきらめることにした.

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2