我正在创建一个新的rails应用程序,我正在研究基于“rails tutorial”一书的注册系统,但是当我运行时我遇到了一个问题
rails test
在我的本地计算机上为我的rails应用程序,我没有错误
但是当将应用程序推送到heroku时,然后运行
heroku run rails test
我收到了这个错误
Error:
UsersSignupTest#test_valid_signup_information:
NoMethodError: assert_template has been extracted to a gem. To continue using it,
add `gem 'rails-controller-testing'` to your Gemfile.
test/integration/users_signup_test.rb:25:in `block in <class:UsersSignupTest>'
这是我的宝石文件
source 'https://rubygems.org'
ruby "2.5.1"
gem 'rails', '5.1.4'
gem 'bootstrap-sass', '3.3.7'
gem 'bcrypt', '3.1.12'
gem 'puma', '3.9.1'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.2.0'
gem 'coffee-rails', '4.2.2'
gem 'jquery-rails', '4.3.1'
gem 'turbolinks', '5.0.1'
gem 'jbuilder', '2.7.0'
gem 'carrierwave', '~> 0.11.2'
group :development, :test do
gem 'sqlite3', '1.3.13'
gem 'byebug', '9.0.6', platform: :mri
end
group :development do
gem 'web-console', '3.5.1'
gem 'listen', '3.1.5'
gem 'spring', '2.0.2'
gem 'spring-watcher-listen', '2.0.1'
end
group :test do
gem 'rails-controller-testing', '1.0.2'
gem 'minitest', '5.10.3'
gem 'minitest-reporters', '1.1.14'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
end
group :production do
gem 'pg', '0.18.4'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
任何解决方案,知道我还是新手:)