Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Active* filenames is too long for windows usage...

#4480

When using ruby on windows built via VS8, I have a very hard time dealing with the file "cdesc-HasManyThroughCantAssociateThroughHasOneOrManyReflection.yaml" because it is so long.

Some tools will work with it, but many will not. Both cygwin and non-cygwin tools.

Can this be shortened into something that windows can deal with?

The full filename:
activerecord-2.3.4/ri/ActiveRecord/HasManyThroughCantAssociateThroughHasOneOrManyReflection/cdesc-HasManyThroughCantAssociateThroughHasOneOrManyReflection.yaml

If using win32, even ruby itself has a hard time with it. :-(

Ciao!

Reported by The Doctor What · April 26th, 2010 @ 07:31 PM

State: stale
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Ryan Bigg
    Ryan Bigg
    • State changed from new to needs-more-info

    Could you please post steps to reproduce and the error that it gives? Thanks.

    April 27th, 2010 @ 12:47 AM

  2. The Doctor What
    The Doctor What

    First you have to custom-build ruby 1.9.1 using Visual Studio 8.

    Then using that copy, install it to a directory like:
    c:\checkouts\external\ruby

    Then run "gem.cmd update --system" to get the latest copy of rubygems.

    Then run "gem.cmd install rails"

    I'll cut-and-paste the exact error messages tomorrow for win32 and win64 (they are on my work computer).

    April 27th, 2010 @ 03:19 AM

  3. The Doctor What
    The Doctor What

    ==win64 Here is an example to get an error in win64. Note: ruby handles this fine in win64, this is an external tool.

    Using cygwin's find:
    $ find . > /dev/null $ find: ./lib/ruby/gems/1.9.1/doc/activerecord-2.3.4/ri/ActiveRecord/HasManyThroughCantAssociateThroughHasOneOrManyReflection/cdesc-HasManyThroughCantAssociateThroughHasOneOrManyReflection.yaml': File name too long

    ==win32

    Whoops, I'm wrong about the filename for this one...this is from activesupport:
    ** Installing gem rails -v=2.3.4... ERROR: While executing gem ... (Errno::ENOENT)

    No such file or directory - ./I18nSimpleBackendInterpolateTest/test_interpolate_given_a_non_unicode_multibyte_value_hash_interpolates_into_a_string_with_the_same_encoding-i.yaml
    

    Successfully installed rake-0.8.7
    Successfully installed activesupport-2.3.4
    Successfully installed activerecord-2.3.4
    Successfully installed rack-1.0.1
    Successfully installed actionpack-2.3.4
    Successfully installed actionmailer-2.3.4
    Successfully installed activeresource-2.3.4
    Successfully installed rails-2.3.4
    8 gems installed

    It returns a non-zero exit code when that is done and it doesn't install the docs, so the file above isn't shown as an issue (though I bet it is, I'll see if I can confirm it).

    April 27th, 2010 @ 02:54 PM

  4. The Doctor What
    The Doctor What
    • Title changed from ActiveRecord filename is too long for windows usage... to Active* filenames is too long for windows usage...

    Fudge...can I edit

    April 27th, 2010 @ 02:55 PM

  5. The Doctor What
    The Doctor What

    Try 2 -- Sorry, not used to bug systems that have formatting.

    win64

    Here is an example to get an error in win64. Note: ruby handles this fine in win64, this is an external tool.

    Using cygwin's find:

    $ find . > /dev/null $ find: ./lib/ruby/gems/1.9.1/doc/activerecord-2.3.4/ri/ActiveRecord/HasManyThroughCantAssociateThroughHasOneOrManyReflection/cdesc-HasManyThroughCantAssociateThroughHasOneOrManyReflection.yaml': File name too long
    

    win32

    Whoops, I'm wrong about the filename for this one...this is from activesupport:

    ** Installing gem rails -v=2.3.4... ERROR: While executing gem ... (Errno::ENOENT)
    No such file or directory - ./I18nSimpleBackendInterpolateTest/test_interpolate_given_a_non_unicode_multibyte_value_hash_interpolates_into_a_string_with_the_same_encoding-i.yaml
    Successfully installed rake-0.8.7
    Successfully installed activesupport-2.3.4
    Successfully installed activerecord-2.3.4
    Successfully installed rack-1.0.1
    Successfully installed actionpack-2.3.4
    Successfully installed actionmailer-2.3.4
    Successfully installed activeresource-2.3.4
    Successfully installed rails-2.3.4
    8 gems installed
    

    It returns a non-zero exit code when that is done and it doesn't install the docs, so the file above isn't shown as an issue (though I bet it is, I'll see if I can confirm it).

    April 27th, 2010 @ 02:58 PM

  6. The Doctor What
    The Doctor What

    Okay, trying to create the full path via Explorer:

    Directory:
    e:\checkouts\holtje\externals\rubygems\dists\1.9.1-v1\windows-i386\lib\ruby\gems\1.9.1\doc\activesupport-2.3.4\ri\I18nSimpleBackendInterpolateTest
    Filename:
    test_interpolate_given_a_non_unicode_multibyte_value_hash_interpolates_into_a_string_with_the_same_encoding-i.yaml
    

    I went into the directory with cygwin, and did a touch 't'. I then used explorer to try to rename the file.
    It claimed it did it, but it chopped off the last two characters 'ml'.

    I'm going to try moving everything up a couple directories. :-/

    April 27th, 2010 @ 05:04 PM

  7. The Doctor What
    The Doctor What

    I can confirm that I can work around the win32 problem by changing the directory path to something shorter.

    I'll check the win64 problem shortly.

    This isn't a perfect fix for me, since I plan on shipping my pre-built ruby along with a rails application to customers... I would like it if it was less likely to have problems if they choose a long-ish path to install the product in.

    And it would still be good, for windows users and anyone who ever does a 'find', to shorten these insanely long paths.

    April 27th, 2010 @ 06:11 PM

  8. The Doctor What
    The Doctor What

    So I still get these errors from other utilities, when running find, even though I've shortened the overall path significantly:

    find: ./lib/ruby/gems/1.9.1/doc/activesupport-2.3.4/ri/I18nSimpleBackendInterpolateTest/test_interpolate_given_an_unicode_value_hash_into_a_non_unicode_multibyte_string_raises_encoding_compatibility_error-i.yaml': File name too long<br/> find:./lib/ruby/gems/1.9.1/doc/activesupport-2.3.4/ri/I18nSimpleBackendInterpolateTest/test_interpolate_given_a_non_unicode_multibyte_value_hash_into_an_unicode_string_raises_encoding_compatibility_error-i.yaml': File name too long

    I would still suggest shortening these paths, if it all possible.

    April 27th, 2010 @ 08:24 PM

  9. Santiago Pastorino
    Santiago Pastorino
    • State changed from needs-more-info to open
    • Importance changed from to Low

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 2nd, 2011 @ 04:43 PM

  10. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:43 PM