uninitialized constant Rails in Tests only

Hi Guys,

I can start my server in development mode.

However, when I run rake test. I have the following errors:

config/environment.rb:4: uninitialized constant Rails (NameError)   from ./test/unit/../test_helper.rb:2:in `require'   from ./test/unit/../test_helper.rb:2   from test/unit/course_test.rb:1:in `require'   from test/unit/course_test.rb:1

Line 4 of environment.rb: Rails::VERSION::STRING >= '2.3.4' unless defined? Rails::VERSION::STRING

Line 2 of test_helper.rb require File.expand_path(File.dirname(__FILE__) + "/../config/ environment")

How can I solve it?

Thanks, Arthur