Test running problem

I'm having some problems running the tests on Rails master branch.

1 - actionmailer: There are 6 errors of this kind: "NoMethodError:
undefined method `find_template' for AutoLayoutMailer:Class"
2 - actionpack: I can't run any test and I get this message: "no such
file to load -- rack". But I do have rack 1.0.0 and rack-test 0.5.0 and
they load with no errors on irb.
3 - activerecord:
   mysql: 2 failing tests:

Hi Rodrigo, I can provide some info...

1 - actionmailer: There are 6 errors of this kind: "NoMethodError:
undefined method `find_template' for AutoLayoutMailer:Class"

These have been failing for quite a while - see the CI build:

http://mri187.ci.rubyonrails.org:3333/builds/rails-master-ruby-1-8-7

The core team is aware of these failures, dunno what else to say...

2 - actionpack: I can't run any test and I get this message: "no such
file to load -- rack". But I do have rack 1.0.0 and rack-test 0.5.0 and
they load with no errors on irb.

ActionPack uses Bundler (http://github.com/wycats/bundler) now. Do this:

[sudo] gem install bundler
cd actionpack
gem bundle

3 - activerecord:
mysql: 2 failing tests:

You probably need to rebuild your databases. See the example commands
in the CI build script:

http://github.com/rails/rails/blob/master/ci/ci_build.rb#L32

I'm also curious. In railties, 'rake -T' doesn't tell us that there is a
'test' target, although it is there. What is the reason?

Also, what is the regular_test task in railties? I can never get it to
run: "/home/rodrigo/src/git/rails/railties/lib/initializer.rb:17: It
looks like initializer.rb was required twice (RuntimeError)"

These issues sound like bugs or outdated tasks? I'd suggest you look
at ci/ci_build.rb. That should always have the correct commands
specified to set up the databases, run bundler if needed, and invoke
the proper tasks for the individual test suites. There are also
scripts to automate setup of all other Rails system prereq
dependencies/libraries and CI environment in my branch (functional,
but a work in progress):
http://github.com/thewoolleyman/rails/tree/master/ci/

-- Chad

Chad Woolley escreveu:


Hi Rodrigo, I can provide some info...
...
2 - actionpack: I can't run any test and I get this message: "no such
file to load -- rack". But I do have rack 1.0.0 and rack-test 0.5.0 and
they load with no errors on irb.

ActionPack uses Bundler () now. Do this:
[sudo] gem install bundler
cd actionpack
gem bundle

That worked for me, thanks!

3 - activerecord:
  mysql: 2 failing tests:
You probably need to rebuild your databases. See the example commands
in the CI build script:

Worked too, thanks again!


I'm also curious. In railties, 'rake -T' doesn't tell us that there is a
'test' target, although it is there. What is the reason?
Also, what is the regular_test task in railties? I can never get it to
run: "/home/rodrigo/src/git/rails/railties/lib/initializer.rb:17: It
looks like initializer.rb was required twice (RuntimeError)"
These issues sound like bugs or outdated tasks? I'd suggest you look
at ci/ci_build.rb.

Anyway, maybe we should remove this outdated task if that is the case,
don’t you agree?

Thank you a lot for all your helpful tips! I’ll try to update the
“Contributing to Rails” guides as soon as possible to reflect these
lessons :slight_smile:

Best Regards,

Rodrigo.

I got the first one fixed on my fork. I will ask someone to merge it.