This project is archived and is in readonly mode.

#4480 ✓stale
The Doctor What

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

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

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!

Comments and changes to this ticket

  • Ryan Bigg

    Ryan Bigg April 27th, 2010 @ 12:47 AM

    • State changed from “new” to “needs-more-info”

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

  • The Doctor What

    The Doctor What April 27th, 2010 @ 03:19 AM

    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).

  • The Doctor What

    The Doctor What April 27th, 2010 @ 02:54 PM

    ==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).

  • The Doctor What

    The Doctor What April 27th, 2010 @ 02:55 PM

    • Title changed from “ActiveRecord filename is too long for windows usage...” to “Active* filenames is too long for windows usage...”

    Fudge...can I edit

  • The Doctor What

    The Doctor What April 27th, 2010 @ 02:58 PM

    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).

  • The Doctor What

    The Doctor What April 27th, 2010 @ 05:04 PM

    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. :-/

  • The Doctor What

    The Doctor What April 27th, 2010 @ 06:11 PM

    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.

  • The Doctor What

    The Doctor What April 27th, 2010 @ 08:24 PM

    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.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:43 PM

    • 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.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:43 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages