###前提・実現したいこと
パーフェクト ruby on rails 7章に関する質問です。
1:Gemfile に以下の記述を追加
/Gemfile
group :development, :test do
gem 'rspec-rails', '~> 3.0.1'
end
2: コンソルにて
bundle install
3: コンソルにて
rails g rspec:install
4: コンソルにて
rais g rspec:model event
※以下のものが自動でで作成される
/spec/models/event_spec.rb
require 'rails_helper'
RSpec.describe Event, :type => :model do
pending "add some examples to (or delete) #{FILE}"
end
5: コンソルにて
bundle exec rspec event_spec.rb
ここでエラー発生
###発生している問題・エラーメッセージ
bundler: failed to load command: rspec (/home/user_name/.rbenv/versions/2.3.1/bin/rspec) LoadError: cannot load such file -- rails_helper
###version
ruby 2.3.1p112 (2016-04-26 revision 54768)
Rails 4.1.2
かなりの時間をこの問題に費やしましたが、解決されず。
わかる方いましたら、どうぞよろしくお願いします・
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/02/28 21:45