"the number of parameters does not match the number of subst

All of a sudden, I’m getting this error:

  1. Error:
    test_index(AccountControllerTest):
    RuntimeError: The number of parameters does not match the number of
    substitutions.
    /home/joe/projects/tanga/trunk/config/…/vendor/rails/actionpack/lib/action_controller/assertions.rb:92:in
    assert_redirected_to' /home/joe/projects/tanga/trunk/config/../vendor/rails/actionpack/lib/action_controller/assertions.rb:313:inclean_backtrace’
    /home/joe/projects/tanga/trunk/config/…/vendor/rails/actionpack/lib/action_controller/assertions.rb:74:in
    assert_redirected_to' ./test/functional/account_controller_test.rb:16:intest_index’

I thought it happened when I upgraded to Rails 1.1.4, but it happens
now when I downgrade to 1.1.2.

Here’s test/functional/account_controller_test.rb:
class AccountControllerTest < Test::Unit::TestCase
def setup
@controller = AccountController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end

def test_index
get :index
assert_redirected_to :action => ‘login’ # LINE 16
end

def test_login
get :login
assert_valid_markup
end
end

Any ideas?

Thanks,
Joe

On 7/2/06, Joe Van D. [email protected] wrote:

/home/joe/projects/tanga/trunk/config/../vendor/rails/actionpack/lib/action_controller/assertions.rb:74:in
@controller = AccountController.new
get :login
assert_valid_markup

end
end

Anyone?

Rails is not being nice to me at the moment. On another machine,
running Ubuntu Dapper, I’m getting:

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require': no such file to load -- test/rails (MissingSourceFile) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in require’
from
/home/joe/projects/tanga/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active_support/dependencies.rb:147:in
require' from ./test/functional/../test_helper.rb:4 from ./test/functional/account_controller_test.rb:1 from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5 from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5 /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" "test/integration/layout_test.rb" /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in gem_original_require’: no such file to load – test/rails
(MissingSourceFile)
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /home/joe/projects/tanga/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:147:in require’
from ./test/integration/…/test_helper.rb:4
from ./test/integration/layout_test.rb:1
from
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5
from
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5
rake aborted!

When I run my unit tests. I’ve installed Ruby 1.8.4 into /usr/local.
I’ve got a copy of Rails 1.1.4 in vendor/rails.

On 7/3/06, Joe Van D. [email protected] wrote:

`clean_backtrace’
def setup
def test_login
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
/usr/local/bin/ruby -Ilib:test
from ./test/integration/layout_test.rb:1
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5
rake aborted!

When I run my unit tests. I’ve installed Ruby 1.8.4 into /usr/local.
I’ve got a copy of Rails 1.1.4 in vendor/rails.

And rubygems 0.9 installed.

On 7/3/06, Joe Van D. [email protected] wrote:

/home/joe/projects/tanga/trunk/config/../vendor/rails/actionpack/lib/action_controller/assertions.rb:313:in

class AccountControllerTest < Test::Unit::TestCase

    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5
    from ./test/integration/../test_helper.rb:4
    from ./test/integration/layout_test.rb:1
    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5
    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5

rake aborted!

When I run my unit tests. I’ve installed Ruby 1.8.4 into /usr/local.
I’ve got a copy of Rails 1.1.4 in vendor/rails.

And rubygems 0.9 installed.

I am having zero luck with anything.

Migrations (using postgres) don’t work:

joe@desktop:~/projects/tanga$ rake migrate --trace
(in /home/joe/projects/tanga)
** Invoke migrate (first_time)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
No such file or directory - /tmp/.s.PGSQL.5432
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:140:in
initialize' /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:140:in establish_connection’
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:25:in
initialize' /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:23:in initialize’
/home/joe/projects/tanga/config/…/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:24:in
postgresql_connection' /home/joe/projects/tanga/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in connection_without_query_cache=’
/home/joe/projects/tanga/config/…/vendor/rails/activerecord/lib/active_record/query_cache.rb:54:in
connection=' /home/joe/projects/tanga/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:220:in retrieve_connection’
/home/joe/projects/tanga/config/…/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
connection' /home/joe/projects/tanga/config/../vendor/rails/activerecord/lib/active_record/migration.rb:281:in migrate’
/home/joe/projects/tanga/config/…/vendor/rails/railties/lib/tasks/databases.rake:4
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in
execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in execute’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in synchronize’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in invoke_prerequisites’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in invoke_prerequisites’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in synchronize’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in run’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
/usr/local/bin/rake:18

On 7/3/06, Joe Van D. [email protected] wrote:

/home/joe/projects/tanga/trunk/config/../vendor/rails/actionpack/lib/action_controller/assertions.rb:92:in

assert_redirected_to :action => 'login'   # LINE 16

Rails is not being nice to me at the moment. On another machine,
from ./test/functional/account_controller_test.rb:1
from /home/joe/projects/tanga/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active_support/dependencies.rb:147:in
And rubygems 0.9 installed.
** Execute environment
`initialize’
/home/joe/projects/tanga/config/…/vendor/rails/activerecord/lib/active_record/migration.rb:281:in
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in
gem, rubygems couldn’t find it.
Whew, fixed. First problem was that I didn’t install the zentest gem.
I had a line in test_helper.rb that was requiring a file from it.

The second issue was fixed by manually installing the ruby-postgres
binding. For some reason, the gem didn’t work.

Joe

On 7/3/06, Joe Van D. [email protected] wrote:

assert_redirected_to' Here's test/functional/account_controller_test.rb: end running Ubuntu Dapper, I'm getting: from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5 require’

** Execute db:migrate
/home/joe/projects/tanga/config/…/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:24:in
migrate' invoke_prerequisites’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in invoke' /usr/local/lib/ruby/1.8/thread.rb:135:in synchronize’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in run’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
/usr/local/bin/rake:18

And I’m using postgres-pr because even after I installed the postgres
gem, rubygems couldn’t find it.