Patch #1892

Patch boot.rb to allow for symlinks in RAILS_ROOT

Added by Richard Hurt over 14 years ago. Updated over 14 years ago.

Status:ClosedStart date:2008-09-12
Priority:NormalDue date:
Assignee:-% Done:


Category:-Estimated time:1.00 hour
Target version:0.8


The .../config/boot.rb file that ships with Redmine does not work well with symlinked directories. Specifically, during packaging for Debian I needed to replace .../vendors/rails with the Debian equivalent. Symlinking .../vendor/rails -> /usr/share/rails broke Redmine so that it wouldn't find the Rails install at all.

The attached patch uses the expand_path() function on the File object to pre-expand the symlinks so they don't cause problems later. This shouldn't affect anything else although I have only tested it on Debian Lenny, not Windows or any other flavor of Unix. If there is a better way to do this then please let me know and I'll update my package.


boot.rb.patch Magnifier (353 Bytes) Richard Hurt, 2008-09-12 21:38

Associated revisions

Revision 1820
Added by Jean-Philippe Lang over 14 years ago

Expand RAILS_ROOT path on startup (#1892).

Revision 1849
Added by Nicolas Chuche over 14 years ago

r18556@gaspard (orig r1820): jplang | 2008-09-13 20:32:37 +0200
Expand RAILS_ROOT path on startup (#1892).


#1 Updated by Richard Hurt over 14 years ago

This patch is related to issue #1750.

#2 Updated by Jean-Philippe Lang over 14 years ago

  • Status changed from New to Closed

It doesn't seem to affect anything on Windows and I can see that Radiant did the same (
Patch committed in r1820.

Since boot.rb is a standard Rails file (no Redmine specific), I suggest you to report this problem to the Rails team.

#3 Updated by Richard Hurt over 14 years ago

I've commented on the update in the Rails VCS but am not sure about opening a ticket just yet. It looks like they purposefully added the expand_path() to the Windows code but not the Unix code. I'm trying to get more info about why they decided to do that. Maybe there is something going on that we don't know about and I just want to cover all the bases. :)


Also available in: Atom PDF