Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6354 (closed defect: untested)

Opened 2 years ago

Last modified 9 months ago

[PATCH] root_path fails with symlinks

Reported by: ward Assigned to: David
Priority: normal Milestone: 2.x
Component: Railties Version: 1.1.6
Severity: normal Keywords:
Cc:

Description

We're using a lot of symlinks in our setup, which rails didn't like:

** Starting Rails with development environment... Rails Error: Unable to access log file. Please ensure that /e/ap/rubytest.omroep.nl/config/../log/development.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.

Luckily it's an easy fix:

--- rails-1.1.6/environments/boot.rb.orig 2006-10-06 15:37:07.000000000 +0200 +++ rails-1.1.6/environments/boot.rb 2006-10-06 15:20:21.000000000 +0200 @@ -1,7 +1,7 @@

# Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb

unless defined?(RAILS_ROOT)

- root_path = File.join(File.dirname(FILE), '..') + root_path = File.expand_path(File.join(File.dirname(FILE), '..'))

unless RUBY_PLATFORM =~ /mswin32/

require 'pathname'

Attachments

rails_root_path.patch (492 bytes) - added by ward on 10/06/06 13:43:13.
patch for the problem

Change History

10/06/06 13:43:13 changed by ward

  • attachment rails_root_path.patch added.

patch for the problem

12/07/06 23:35:53 changed by trevor_wennblom

  • summary changed from root_path fails with symlinks to [PATCH] root_path fails with symlinks.

May be related to 6755.

10/24/07 21:46:41 changed by mislav

  • status changed from new to closed.
  • resolution set to untested.

boot.rb has significantly changed since. can you try if the problem persists?