Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Rake cannot find minitest (except when it can)

rake minitest rails 4

  • Please log in to reply
No replies to this topic

#1 F2Andy

F2Andy

    Passenger

  • Members
  • 3 posts

Posted 02 October 2013 - 07:54 AM

Sorry, this is not really the right forum, but it seemed the best available.

I am trying to upgrade from Rails 3 to Rails 4. Rails 4 seems to use minitest, which is fine, but I cannot get it to work with rake.

If I type "rake -P" I get a list of tasks, including:

rake minitest                  
rake minitest:all              
rake minitest:all:quick        
    test:prepare               
rake minitest:controllers      
    test:prepare               
rake minitest:default          
rake minitest:integration      
    test:prepare               
rake minitest:models           
    test:prepare               
rake minitest:performance      
    test:prepare               
rake minitest:single           
    test:prepare  

So far so good - it looks like the task is there. But when I type "task minitest" I get:

rake aborted!                                 
Don't know how to build task 'minitest'       
org/jruby/RubyArray.java:1617:in `each'       
org/jruby/RubyKernel.java:1073:in `load'      
c:\jruby\jruby-1.7.4\bin\rake:23:in `(root)'  
(See full trace by running task with --trace)

How can it not know the task, when it listed the task seconds earlier?

I have set up a quick test project built in Rails 4 (as opposed to upgraded from earlier Rails), and that works okay; rake can find minitest there.

Both projects have this in the gemfile:

group :test do
  gem 'minitest-rails'
  gem 'minitest-rails-capybara'
end

Neither project has any .rake files in lib/tasks. What is going on here? Any help appreciated.

I am using JRuby 1.7.4 on Windows by the way.







Also tagged with one or more of these keywords: rake, minitest, rails 4

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users