Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

No such file or directory #3

Closed
tormaroe opened this issue Feb 11, 2010 · 8 comments
Closed

No such file or directory #3

tormaroe opened this issue Feb 11, 2010 · 8 comments
Labels

Comments

@tormaroe
Copy link

When running glynn I get the following exception. It happens after ftp-login, and the root folder I specified in the _config.yml was created on the server by glynn. The file in the exception DOES exist.

Connected to server. Sending site
C:/Ruby/lib/ruby/gems/1.8/gems/glynn-1.0.4/lib/glynn/file.rb:7:in ``': No such file or directory - file ./_site/aftensang-om-varen.html (Errno::ENOENT)
from C:/Ruby/lib/ruby/gems/1.8/gems/glynn-1.0.4/lib/glynn/file.rb:7:in `is_bin?'
from C:/Ruby/lib/ruby/gems/1.8/gems/glynn-1.0.4/lib/glynn/ftp.rb:48:in `send_dir'
from C:/Ruby/lib/ruby/gems/1.8/gems/glynn-1.0.4/lib/glynn/ftp.rb:33:in `foreach'
from C:/Ruby/lib/ruby/gems/1.8/gems/glynn-1.0.4/lib/glynn/ftp.rb:33:in `send_dir'
from C:/Ruby/lib/ruby/gems/1.8/gems/glynn-1.0.4/lib/glynn/ftp.rb:15:in `sync'
from C:/Ruby/lib/ruby/gems/1.8/gems/glynn-1.0.4/lib/glynn/ftp.rb:22:in `connect'
from C:/Ruby/lib/ruby/gems/1.8/gems/glynn-1.0.4/lib/glynn/ftp.rb:14:in `sync'
from C:/Ruby/lib/ruby/gems/1.8/gems/glynn-1.0.4/bin/glynn:57
from C:/Ruby/bin/glynn:19:in `load'
from C:/Ruby/bin/glynn:19

You can access my source here: http://github.com/tormaroe/barnesang.com

@dmathieu
Copy link
Owner

Are you sure your repository is clean ? I've tried cloning it and I can successfully generate the website with jekyll.

Same for glynn, which uses the jekyll methods to generate the site and tries to send it over ftp (of course I can't send it as I don't have your ftp login/password).

@tormaroe
Copy link
Author

Are you sure your repository is clean ?

You mean the _site dir needs to be empty when I run glynn? Did that, and glynn sure enough generated everything as expected, but still get the error when it tries to upload the files :/

I'm trying to investigate your code.. you're running a "file" command? I'm running on Windows - will this work there?

@dmathieu
Copy link
Owner

Oooh you're running it on windows. This explains everything :)
No, for now, glynn isn't compatible with windows (I should mention that in the README).

That reason is simple. To check if a file is binary (in which case it needs to be sent with the putbinaryfile method) or is text (in which case it needs to be sent with the puttextfile method), I do a file command.
As far as I've searched, it's not possible to do so in pure ruby.

How would you do it on windows ? (check if a file is binary or not) ?

@tormaroe
Copy link
Author

I've forked the project, committed a fix, and requested a pull.. The change: http://github.com/tormaroe/glynn/commit/4c0c0225b663dfc566187285d7a94ab54106ac51

@dmathieu
Copy link
Owner

Thank you. I'll take a look at it asap.

@dmathieu
Copy link
Owner

When you say it works, does it mean the tests pass ? Because they don't here (mainly because .blksize isn't implemented in fakefs).

Moreover instead of dumping the File module, you can call a method outside of the current module with the following : ::File.read

@tormaroe
Copy link
Author

No, sorry, I wasn't able to run the tests at all for some reason. It worked in the sense that I was able to generate and upload my jekyll site successfully.

I'll have another go at it when time permits..

And thanks for the tip on calling outside current.

@dmathieu
Copy link
Owner

dmathieu commented Apr 5, 2011

Closing as stale.

@dmathieu dmathieu closed this as completed Apr 5, 2011
This was referenced Jun 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants