Topic: Can't get file directory to find config/environment.
I'm trying to test my routes from integration/routes_test.rb
I go to "cd /test"
and what I get is
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta/lib/rails/application/configuration.rb:64:in `read': No such file or directory - /home/neoky/workspace/rails_site/test/config/database.yml (Errno::ENOENT)
in my routes_test.rb I have
and from here:
site -> test -> test_helper.rb
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
I've tried all sort of variations of that directory, but I can't come up with anything that gets rid for the test from the directory.
require (Rails.root.to_s + "/config/environment")
I get error messages saying they don't know what Rails is.
The only thing I found that worked was by making a config folder with database.yml inside of the test folder itself. Where I start getting other errors.
Thanks for any help I can get.