views:

79

answers:

1

Is there any solution to solve the problem of rake task rails:upgrade:check on windows ?

A: 

To solve out this problem i have install this gems.

gem install POpen4 -v 0.1.4
gem install win32-open3
gem install rak

Then modify rails_upgrade plugin file.

vendor/rails_upgrade/lib/application_checker.rb

In that file replace find_with_rake method with this lines .

def find_with_rak(text, where, double_quote)
    value = ""
    %x[rak '#{Regexp.escape(text)}' #{where}].each do |f|
      value << f
    end
    #        POpen4.popen4("rak --nogroup -l '#{Regexp.escape(text)}' #{where}") do |stdin, stdout, stderr|
    #          value = stdout.read
    #        end
    value
end

This works for me ... May be this one help someone to upgrade to rails 3 on windows ..

krunal shah