RAILS_ROOT is not a directory error

Hi all,

Im attempting to deploy a third party rails application at the moment and im coming up against the following error:

RAILS_ROOT is not a directory

This is used in boot.rb in the following lines:

unless defined?(RAILS_ROOT)   root_path = File.join(File.dirname(__FILE__), '..')

  unless RUBY_PLATFORM =~ /mswin32/     require 'pathname'     root_path = Pathname.new(root_path).cleanpath(true).to_s   end

end

I've tried changing permissions and ownership for the directory in question but it doesnt seem to help my cause.

Any ideas on how this might be solved?

Cheers, Chris

Hi Chris,

Chris Gallagher wrote:

Im attempting to deploy a third party rails application at the moment and im coming up against the following error:

RAILS_ROOT is not a directory

This is used in boot.rb in the following lines:

unless defined?(RAILS_ROOT)   root_path = File.join(File.dirname(__FILE__), '..')

  unless RUBY_PLATFORM =~ /mswin32/     require 'pathname'     root_path = Pathname.new(root_path).cleanpath(true).to_s   end

end

RAILS_ROOT is not a directory. It's a string. Which line is throwing the error?

Best regards, Bill

Hi Bill,

its not a directory but isnt it a line referencing a directory?

the full error can be seen here:

www.chris-gallagher.com

I see no such file to load... config/environment.

Ryan Bigg wrote:

I see no such file to load... config/environment.

Me too.

> > Hi Bill, > > its not a directory but isnt it a line referencing a directory?

It's a string that _could_ be a path. I'd use logger to see exactly what it is when the error is thrown. OTOH... IIRC, I didn't see anything in the code that would throw the error you said was being thrown.