Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Question mark files #621

Merged
merged 3 commits into from Nov 16, 2011

Conversation

Projects
None yet
6 participants
Contributor

xxx commented Oct 15, 2011

tests for files with question marks in their name, including failing case for expiring url, per issue 616

@mike-burns mike-burns merged commit 11a09fb into thoughtbot:master Nov 16, 2011

darbyw commented Dec 13, 2011

Hi guys, I think this creates an issue for Windows users:

Fetching https://github.com/thoughtbot/paperclip.git remote: Counting objects: 5425, done. remote: Compressing objects: 100% (2391/2391), done. remote: Total 5425 (delta 3731), reused 4522 (delta 2916) Receiving objects: 100% (5425/5425), 832.06 KiB | 484 KiB/s, done. Resolving deltas: 100% (3731/3731), done. error: git checkout-index: unable to create file test/fixtures/question?mark.png (Invalid argument)

Question marks aren't valid characters for Window filenames. Found a SO thread on this as well:

http://stackoverflow.com/questions/8390750/rails-paperclip-install-error

@ghost

ghost commented Dec 21, 2011

We are experiencing this issue as well. The only way to get around it was to boot up Ubuntu in a VM and run a fetch, then build the gem, or do whatever with it once we copied it out of the VM and back into Windows.

Windows will remove the question mark from the file name, which breaks the tests as well.

darbyw commented Dec 21, 2011

@toskies - I ended up downloading the zip file from Github, which seems to work.

@ghost

ghost commented Dec 21, 2011

@darbyw We tried that as well, but we were unable to build the gem file from the zip since the gemspec expects build to be run from within a git project.

darbyw commented Dec 22, 2011

@toskies Ah, yea I just included it locally so I didn't have that problem.

gem 'paperclip', :path => 'vendor/gems/paperclip'

If I am collaborating with someone else who isn't developing on a Windows machine, hardcoding a path into the Gemfile will break their development environment. Is there any other fix for this issue or do I have to now maintain a separate version of my Gemfile for Windows developers?

darbyw commented Jan 16, 2012

@pmarsceill Did you try putting the gem in the vendor directory, so that the path in the Gemfile is relative? I just tried bundle install on my Linux box and it worked fine. As far as I know, the ":path" option is not Windows specific.

@ghost

ghost commented Jan 16, 2012

@darbyw @pmarsceill That's what we do as well. We develop on Windows boxes and deploy to a Linux server.

gem 'paperclip', '2.4.6a2', :path => File.join(File.dirname(__FILE__), '/vendor/bundle/paperclip-2.4.6a2')

Note: Ignore the version specified.

This worked I just had to download the ZIP version from github and unpack it to vendor/gems/paperclip, then add the :path option to the reference in the Gemfile. Thanks @darbyw and @toskies !

I don't think filenames with question marks are valid on Windows platforms.

Member

jyurek replied Jan 18, 2012

Yes, it seems that way. #703 is a discussion about the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment