Using symlinks to share files over several rails projects does not work
-----------------------------------------------------------------------

                 Key: JRUBY-4496
                 URL: http://jira.codehaus.org/browse/JRUBY-4496
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.4, JRuby 1.5
         Environment: Arch Linux (openjdk-1.6.2, jruby-git & jruby-1.4), OS X 
10.6.2 (1.6.0_17-b04-248-10M3025, jruby-1.4)
            Reporter: Vesa Kaihlavirta
            Assignee: Thomas E Enebo


We have several rails projects which share some files, and we implement this 
sharing by symlinks. Jruby handles this differently.

A simple testcase can be generated by making a new rails project, moving 
config/boot.rb to another location, symlinking to it and starting the server. 
After this, the following happens:


[ve...@louhikko project1]$ jruby -S script/server 
/usr/home/vegai/tmp/jruby-bug/shared/config/boot.rb:103:in `initialize': No 
such file or directory - File not found - 
/usr/home/vegai/tmp/jruby-bug/shared/config/../config/environment.rb 
(Errno::ENOENT)
        from /usr/home/vegai/tmp/jruby-bug/shared/config/boot.rb:103:in 
`read_environment_rb'
        from /usr/home/vegai/tmp/jruby-bug/shared/config/boot.rb:80:in 
`gem_version'
        from /usr/home/vegai/tmp/jruby-bug/shared/config/boot.rb:59:in 
`load_rails_gem'
        from /usr/home/vegai/tmp/jruby-bug/shared/config/boot.rb:54:in 
`load_initializer'
        from /usr/home/vegai/tmp/jruby-bug/shared/config/boot.rb:38:in `run'
        from /usr/home/vegai/tmp/jruby-bug/shared/config/boot.rb:11:in `boot!'
        from /usr/home/vegai/tmp/jruby-bug/shared/config/boot.rb:110
        from /usr/home/vegai/tmp/jruby-bug/shared/config/boot.rb:2:in `require'
        from /usr/home/vegai/tmp/jruby-bug/project1/script/server:2

i.e. jruby&rails is trying to find environment.rb from the same place where the 
symlinked boot.rb is. We also share unit tests like this over all our projects, 
and jruby does not run unit tests in that case.





-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to