Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3.2.11 performance testing issue: Don't know how to build task 'test:benchmark'

I'm following this railscast on performance testing, but I'm immediately running into an issue.

My app is rails 3.2.11, so according to the railscast it should include performance testing, but I don't have a folder called 'test' at all. When I run 'rails generate performance_test homepage' nothing happens or is generated. So I created one manually (to exactly match the railscast source code), but when I run rake test:benchmark I get the error

 Don't know how to build task 'test:benchmark'

If I add the 'rails-perftest' gem to my gemfile and run bundle, then again try to generate a performance_test nothing happens, and when I then run rake test:benchmark, it throws a different error of

uninitialized constant Rails::SubTestTask

I've been sure to include the following dependencies in my gem file:

 gem 'ruby-prof', group: :test
 gem 'test-unit', group: :test

Could anyone help advise me what I'm doing wrong? Thanks!

like image 630
jfdimark Avatar asked Aug 18 '13 16:08

jfdimark


1 Answers

I am not 100% certain on this, but I am guessing that you might not have your application.rb file configured accordingly. Also check your Gemfile.lock file and run the command bundle install because it could also be something funky going on with your Gems and dependencies.

like image 145
super_J Avatar answered Oct 19 '22 23:10

super_J