ruby on rails - rake test fails to run because 'guard' can't be loaded -


i'm beginner @ rails , i'm working through hartl's rails tutorial. i've gotten point in chapter 3 run

bundle exec rake test

for first time. i'm getting error:

$ bundle exec rake test /users/j/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- guard (loaderror)     /users/j/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'     /users/j/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'     /users/j/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'     /users/j/.rvm/gems/ruby-2.2.2/gems/guard-minitest-2.4.4/lib/minitest/guard_minitest_plugin.rb:4:in `<top (required)>'     /users/j/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'     /users/j/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'     /users/j/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'     /users/j/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'     /users/j/.rvm/gems/ruby-2.2.2/gems/minitest-5.6.0/lib/minitest.rb:91:in `block in load_plugins'     /users/j/.rvm/gems/ruby-2.2.2/gems/minitest-5.6.0/lib/minitest.rb:85:in `each'     /users/j/.rvm/gems/ruby-2.2.2/gems/minitest-5.6.0/lib/minitest.rb:85:in `load_plugins'     /users/j/.rvm/gems/ruby-2.2.2/gems/minitest-5.6.0/lib/minitest.rb:114:in `run'     /users/j/.rvm/gems/ruby-2.2.2/gems/minitest-5.6.0/lib/minitest.rb:56:in `block in autorun' 

however, guard installed:

$ irb 2.2.2 :001 > require 'guard'  => true 2.2.2 :002 > 

my gemfile:

source 'https://rubygems.org'   # bundle edge rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.1' # use postgresql database active record gem 'pg' # use scss stylesheets gem 'sass-rails', '~> 5.0' # use uglifier compressor javascript assets gem 'uglifier', '>= 1.3.0' # use coffeescript .coffee assets , views gem 'coffee-rails', '~> 4.1.0' # see https://github.com/rails/execjs#readme more supported runtimes # gem 'therubyracer', platforms: :ruby  # use jquery javascript library gem 'jquery-rails' # turbolinks makes following links in web application faster. read more: https://github.com/rails/turbolinks gem 'turbolinks' # build json apis ease. read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates api under doc/api. gem 'sdoc', '~> 0.4.0', group: :doc  # use activemodel has_secure_password # gem 'bcrypt', '~> 3.1.7'  # use unicorn app server # gem 'unicorn'  # use capistrano deployment # gem 'capistrano-rails', group: :development  group :development, :test   # call 'byebug' anywhere in code stop execution , debugger console   gem 'byebug'    # access irb console on exception pages or using <%= console %> in views   gem 'web-console', '~> 2.0'    # spring speeds development keeping application running in background. read more: https://github.com/rails/spring   gem 'spring' end  group :test   gem 'minitest-reporters'   gem 'mini_backtrace'   gem 'guard-minitest' end  group :production   gem 'rails_12factor' end 

i searched similar problems on google couldn't find helped. know i'm doing wrong?

guard-minitest's readme:

please sure have guard installed before continue.

the simplest way install guard::minitest use bundler.

add guard::minitest gemfile:

group :development   gem 'guard' # note: necessary in newer versions   gem 'guard-minitest' end 

i had change gemfile:

group :test   gem 'minitest-reporters'   gem 'mini_backtrace'   gem 'guard'   gem 'guard-minitest' end 

Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -