Agile Web Development with Rails, Edition 4

26.4 Devise 26.2 HAML

26.3 Pagination

Expected at least 1 element matching "td", found 0.
<0> expected to be
>=
<1>.

Traceback:
  /home/rubys/git/awdwr/edition4/checkdepot.rb:609:in `block in <class:DepotTest>'

Add in the kaminari gem

edit Gemfile
gem 'activemerchant', '~> 1.58'
gem 'haml', '~> 4.0'
gem 'kaminari', '~> 0.16'
rake test test/models/order_test.rb
rake aborted!
ActiveRecord::PendingMigrationError: Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=test' to resolve this issue.
/home/rubys/git/rails/activerecord/lib/active_record/migration.rb:383:in `check_pending!'
/home/rubys/git/awdwr/edition4/work-225-40/depot/test/test_helper.rb:6:in `<class:TestCase>'
/home/rubys/git/awdwr/edition4/work-225-40/depot/test/test_helper.rb:5:in `<top (required)>'
/home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:229:in `require'
/home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:229:in `block in require'
/home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/rubys/git/rails/activesupport/lib/active_support/dependencies.rb:229:in `require'
/home/rubys/git/rails/railties/lib/rails/test_unit/sub_test_task.rb:73:in `block (3 levels) in define'
/home/rubys/git/rails/railties/lib/rails/test_unit/sub_test_task.rb:73:in `each'
/home/rubys/git/rails/railties/lib/rails/test_unit/sub_test_task.rb:73:in `block (2 levels) in define'
/home/rubys/git/rails/railties/lib/rails/test_unit/sub_test_task.rb:72:in `each'
/home/rubys/git/rails/railties/lib/rails/test_unit/sub_test_task.rb:72:in `block in define'
/home/rubys/git/rails/railties/lib/rails/test_unit/testing.rake:59:in `block in <top (required)>'
/home/rubys/.rvm/gems/ruby-2.2.5/gems/rake-11.2.1/exe/rake:27:in `<top (required)>'
/home/rubys/.rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in `eval'
/home/rubys/.rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => test:single
(See full trace by running task with --trace)
Run options: --seed 28217
 
# Running tests:
 
 
 
Finished tests in 0.000764s, 0.0000 tests/s, 0.0000 assertions/s.
 
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
edit Gemfile
# source 'https://rubygems.org'
 
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem "sprockets-rails", :path => "/home/rubys/git/sprockets-rails"
gem "arel", :path => "/home/rubys/git/arel"
gem 'rails', :path => "/home/rubys/git/rails" # '4.0.13'
 
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
group :production do
  gem 'mysql2', '~> 0.3.10'
end
 
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.2'
 
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
 
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
 
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
 
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
 
# Turbolinks makes following links in your web application faster.
# Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
 
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
 
group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end
 
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
 
# Use unicorn as the app server
# gem 'unicorn'
 
# Use Capistrano for deployment
gem 'rvm-capistrano', group: :development
 
# Use debugger
# gem 'debugger', group: [:development, :test]
 
# gem 'puma'
 
gem 'activemerchant', '~> 1.58'
gem 'haml', '~> 4.0'
# gem 'kaminari', '~> 0.16'

26.4 Devise 26.2 HAML