Running the Rails Test Suite

Hi,

Sorry for the "beginner" question but I've been having trouble getting
the test suite for rails running. When I do a "cd actionpack" "rake
test" for example, I get complaints about missing "rack" although the
submodule has been updated and it is clearly there.

There must be some sort of setup I'm missing and any guidance in the
proper directly is much appreciated.

Thank you

Silly question (mainly because I'm stabbing in the dark) but have you
installed rack as a gem, or have you run "gem bundle"?
I found a lot of those messages cleared up when I ran gem bundle -
because that's the 'official' way to load gems now.

Cheers,
Taryn

Silly question (mainly because I'm stabbing in the dark) but have you
installed rack as a gem, or have you run "gem bundle"?
I found a lot of those messages cleared up when I ran gem bundle -
because that's the 'official' way to load gems now.

gem bundle gives me:

  Could not find gem 'arel (= 0.2.pre, runtime)' in any of the sources

Does that mean that the build depends on a non-released version of "arel"?

Matteo

Do you put your gem list in Gemfile? if there is, give the git repo for the gem.

I guess you’re try with rails 3 pre, if you’re ussing that version, put the gem like this:

#gem “name”, “version”, “source”

gem “rails”, “3.0.pre”, :git => “git://github.com/rails/rails.git

Download and install bundler as a gem (http://github.com/wycats/bundler), and in the rails app dir, run “gem bundle”.

This is my Gemfile for a test app Rails 3.0 pre:

Edit this Gemfile to bundle your application’s dependencies.

gem “rails”, “3.0.pre”, :git => “git://github.com/rails/rails.git

#gem “rails”, “3.0.pre”

Bundle edge rails:

gem “rails”, :git => “git://github.com/rails/rails.git

Bundle the gems you use:

gem “bj”

gem “hpricot”, “0.6”

gem “sqlite3-ruby”, :require_as => “sqlite3”

gem “aws-s3”, :require_as => “aws/s3”

Bundle gems used only in certain environments:

gem “rspec”, :only => :test

only :test do

gem “webrat”

end

Hmmm, that's bizarre. I was able to load that one.

Another stab in the dark but... perhaps it's only available on
gemcutter?
in which case 'gem tumble' should add gemcutter to your sources list.

Ah hang on. Looking in Gemfile (where these things are specified)
gives:
gem "arel", "0.2.pre", :git => "git://github.com/rails/arel.git"

Do you have git installed and working?
Optionally (depending on OS, of course) do you need sudo privilege?

Taryn

I'm also having trouble running the tests. I get a failure:
  1) Failure:
test_database_middleware_doesn't_initialize_when_activerecord_is_not_in_frameworks
(ApplicationTests::InitializerCustomFrameworkExtensionsTest)
<nil> expected but was
<"constant">.
...
rake aborted!

There are errors relating to the arel-0.2.pre gem:
Using native SQLite3: undefined method `columns' for #<Hash:
0x101f0f5d0> (NoMethodError)
Using native MySQL: undefined method `columns' for #<Hash:0x10204e298>
(NoMethodError)

I also see errors about postgresql - which I have never used, so
probably haven't installed fully.

Anyone any ideas about the others? I feel like I'm going in circles
googling the errors, but no joy as yet

For the arel gem you will need to use the master branch on http://github.com/rails/arel and compile the gem from that.