Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errno::EINVAL happens in Windows environment when enabling caching and reloading #1517

Closed
tune opened this issue Dec 11, 2013 · 6 comments
Closed
Assignees
Milestone

Comments

@tune
Copy link

tune commented Dec 11, 2013

I've found that Errno::EINVAL happens when reloading and caching are enabled.

Reproduce is easy, create blank project and add following setting in "app/app.rb".

set :reload, true
register Padrino::Cache
enable :caching

When reload event happen, following log messages are displayed.

ERROR -  Errno::EINVAL: Invalid argument - C:/Users/tune/Desktop/sample/tmp/Sample::App; C:/Ruby200/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir'

It seems that cache library try to create folder, but folder path includes ":" character that is not allowed in windows environment.

@namusyaka
Copy link
Contributor

@tune Thank you!

@padrino/core-members Is this directory name correct? (Sample::App)
I guess the cache directory name should same as the production environment.

@ujifgc
Copy link
Member

ujifgc commented Dec 12, 2013

I can confirm, there is an issue with reloading and Padrino::Cache: tmp/SampleApp is generated on reload, while tmp/sample/app is generated on clean app load.

@ghost ghost assigned ujifgc Dec 12, 2013
@namusyaka
Copy link
Contributor

Yeah, this behavior may be caused by this line.

@ujifgc
Copy link
Member

ujifgc commented Dec 12, 2013

I fixed it and trying to add a test now.

@namusyaka
Copy link
Contributor

@ujifgc Great, thank you!

@ujifgc ujifgc closed this as completed in 02e48a6 Dec 12, 2013
@ujifgc
Copy link
Member

ujifgc commented Dec 12, 2013

BTW, I was struggling with 2 folders being created in my temp folder: application and Application. Now it's resolved.

namusyaka pushed a commit to namusyaka/padrino-framework that referenced this issue Dec 12, 2013
Ortuna pushed a commit to Ortuna/padrino-framework that referenced this issue Jan 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants