Re: [Radiant] The system cannot find the path specified.

2009-11-18 Thread Charles Roper
2009/11/17 Charles Roper reac...@charlesroper.co.uk:
 So, is this a bug in FileUtils, perhaps? I'm at a loss.

Luis Lavena advised me that this is indeed a problem with FileUtils on
Windows in certain circumstances:

http://groups.google.com/group/rubyinstaller/msg/6c7da3b7d19919d7

He advised disabling anti-virus software, which I don't have. The
problem for me was solved by moving the project out of git source
control. I am guessing TortoiseGit must be interfering with the files
as they get processed.

Charles
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] The system cannot find the path specified.

2009-11-17 Thread Charles Roper
On 13/11/2009 19:43, John Long wrote:
 I'm working on that and the failing tests right now. Oops! :-)

Oops, umm, yes, indeed. Feeling more than a little embarrassed here. 
Sorry for causing more work for you than necessary.

I was aware that I should be running the tests, but I'm pretty green 
when it comes to TDD/BDD and got a little bit overwhelmed (I'm a 
designer by training, not a programmer). I did tentatively try running 
rake spec, but this exploded in a shower of nasty looking error 
messages. Yikes. I figured I'd spend ages trying to get the tests to run 
properly, so I just submitted the patch. After all, the changed code is 
supposed to do exactly the same thing as the old code and therefore the 
tests should still pass in theory, right? Wrong. I now see the tests run 
deeper than simply testing for some end results.

So this morning I've been trying to get the tests running. I've 
installed RSpec and the other dependencies, had some trouble with 
cucumber (solved by forcing version 3.9 to install), then ran rake spec, 
had another explosion errors, installed an older version of webrat and 
finally the tests run.

But there are quite a few failures.

The biggest problem seems to be an Errno::EACCES permission denied 
error. This gist shows it in all its glory:

http://gist.github.com/237136#LID484

In order to debug this, I added :verbose = true to the cp_r methods 
that seem to be causing the problems. The result of doing this is truly 
a WTF!?

http://gist.github.com/237155#LID182 (some lines snipped out for brevity)

Seems that adding the verbose option mysteriously makes the cp_r work. 
Although having said that, there is still one of those pesky EACCES 
errors back on line 120:

http://gist.github.com/237155#LID120

So, is this a bug in FileUtils, perhaps? I'm at a loss.

Charles


 On Fri, Nov 13, 2009 at 2:01 PM, Charles Roper
 reac...@charlesroper.co.uk  wrote:
 2009/11/13 John Longjohnwlong2...@gmail.com:
 Applied. Please verify.

 Thanks John, looks good apart from one typo that I managed to slip in
 there. I've added a comment to the commit:

 http://github.com/radiant/radiant/commit/71646bb1574713435d257825f21d984eb4ea8ba3#L0R187

 Want another patch or is it easier for you to fix?

 Cheers,
 Charles
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] The system cannot find the path specified.

2009-11-13 Thread John Long
Applied. Please verify.

--
John Long
http://wiseheartdesign.com
http://recursivecreative.com

On Thu, Nov 12, 2009 at 1:57 PM, Charles Roper
reac...@charlesroper.co.uk wrote:
 On 12/11/2009 07:47, Charles Roper wrote:

 On 11/11/2009 09:17, Charles Roper wrote:

 Hi,

 First post here - just getting to grips with Radiant.

 I'm trying to install the Paperclipped extension on a test site and have
 run into a couple of issues. I'm on Windows, using the RubyInstaller
 (which recently went RC1):

  ruby -v
 ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]

 I've done some further digging and found the problem. I've created an
 issue on Github:

 http://github.com/radiant/radiant/issues/#issue/69

 I've created a patch (attached) that should fix this issue.

 Cheers,
 Charles


 ___
 Radiant mailing list
 Post:   Radiant@radiantcms.org
 Search: http://radiantcms.org/mailing-list/search/
 Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] The system cannot find the path specified.

2009-11-13 Thread John Long
I'm working on that and the failing tests right now. Oops! :-)

--John

On Fri, Nov 13, 2009 at 2:01 PM, Charles Roper
reac...@charlesroper.co.uk wrote:
 2009/11/13 John Long johnwlong2...@gmail.com:
 Applied. Please verify.

 Thanks John, looks good apart from one typo that I managed to slip in
 there. I've added a comment to the commit:

 http://github.com/radiant/radiant/commit/71646bb1574713435d257825f21d984eb4ea8ba3#L0R187

 Want another patch or is it easier for you to fix?

 Cheers,
 Charles
 ___
 Radiant mailing list
 Post:   Radiant@radiantcms.org
 Search: http://radiantcms.org/mailing-list/search/
 Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] The system cannot find the path specified.

2009-11-12 Thread Charles Roper

On 12/11/2009 07:47, Charles Roper wrote:

On 11/11/2009 09:17, Charles Roper wrote:

Hi,

First post here - just getting to grips with Radiant.

I'm trying to install the Paperclipped extension on a test site and have
run into a couple of issues. I'm on Windows, using the RubyInstaller
(which recently went RC1):

 ruby -v
ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]


I've done some further digging and found the problem. I've created an
issue on Github:

http://github.com/radiant/radiant/issues/#issue/69


I've created a patch (attached) that should fix this issue.

Cheers,
Charles

From 6f474b743c36f1a9a19cac023422a15033ed27b9 Mon Sep 17 00:00:00 2001
From: Charles Roper charles.ro...@gmail.com
Date: Thu, 12 Nov 2009 18:15:00 +
Subject: [PATCH] Cross-platform fixes for extension installer script.

---
 lib/radiant/extension/script.rb |   25 +
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/lib/radiant/extension/script.rb b/lib/radiant/extension/script.rb
index 4998c4c..eabd818 100644
--- a/lib/radiant/extension/script.rb
+++ b/lib/radiant/extension/script.rb
@@ -95,7 +95,7 @@ Install type:   #{install_type}
 
 def checkout
   self.path = File.join(Dir.tmpdir, name)
-  system cd #{Dir.tmpdir}; #{checkout_command}
+  FileUtils.cd(Dir.tmpdir) { system #{checkout_command} }
 end
   end
 
@@ -136,10 +136,14 @@ Install type:   #{install_type}
 def checkout
   if project_in_git?
 system git submodule add #{url} vendor/extensions/#{name}
-system cd vendor/extensions/#{name}; git submodule init  git 
submodule update
+FileUtils.cd(File.join('vendor', 'extensions', name)) do
+  system git submodule init  git submodule update
+end
   else
 super
-system cd #{path}; git submodule init  git submodule update
+FileUtils.cd(path) do
+  system git submodule init  git submodule update
+end
   end
 end
 
@@ -166,7 +170,10 @@ Install type:   #{install_type}
 end
 
 def unpack
-  output = `cd #{Dir.tmpdir}; gem unpack #{filename.split('-').first}`
+  output = nil
+  FileUtils.cd(Dir.tmpdir) do
+output = `gem unpack #{filename.split('-').first}`
+  end
   self.path = output.match(/'(.*)'/)[1]
 end
   end
@@ -177,7 +184,8 @@ Install type:   #{install_type}
 end
 
 def unpack
-  output = `cd #{Dir.tmpdir}; tar xvf #{filename}`
+  outputs = nil
+  FileUtils.cd(Dir.tmpdir) { output = `tar xvf #{filename}` }
   self.path = File.join(Dir.tmpdir, 
output.split(/\n/).first.split('/').first)
 end
   end
@@ -188,7 +196,7 @@ Install type:   #{install_type}
 end
 
 def unpack
-  system cd #{Dir.tmpdir}; gunzip #{self.filename}
+  FileUtils.cd(Dir.tmpdir) { system gunzip #{self.filename} }
   @unpacked = true
   super
 end
@@ -200,7 +208,7 @@ Install type:   #{install_type}
 end
 
 def unpack
-  system cd #{Dir.tmpdir}; bunzip2 #{self.filename}
+  FileUtils.cd(Dir.tmpdir) { system bunzip2 #{self.filename} }
   @unpacked = true
   super
 end
@@ -208,7 +216,8 @@ Install type:   #{install_type}
 
   class Zip  Download
 def unpack
-  output = `cd #{Dir.tmpdir}; unzip #{filename} -d #{name}`
+  output = nil
+  FileUtils.cd(Dir.tmpdir) { output = `unzip #{filename} -d #{name}` }
   self.path = File.join(Dir.tmpdir, name)
 end
   end
-- 
1.6.5.1.1367.gcd48

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

[Radiant] The system cannot find the path specified.

2009-11-11 Thread Charles Roper
Hi,

First post here - just getting to grips with Radiant.

I'm trying to install the Paperclipped extension on a test site and have 
run into a couple of issues. I'm on Windows, using the RubyInstaller 
(which recently went RC1):

  ruby -v
ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]

First, if the site is not in a git repo, I get the following error:

http://pastie.org/693369

It looks to me like the paperclipped directory in Temp isn't being 
created. There's no reason a dir can't be created in there, and %TEMP% 
is set correctly:

  echo %TEMP%
C:\Users\charlesr\AppData\Local\Temp

So I wiped the project, recreated it, manually created the paperclipped 
dir in Temp and tried again:

http://pastie.org/693374

Seems like there are problems creating or finding directories and/or 
files with the Windows filesystem. Note, the paperclipped dir I manually 
added to Temp is deleted automatically when I run the above task.

Next I tried installing the extension once I had added my test site to a 
git repo. This seemed to fare better, although there is an error on line 
9 of the output:

http://pastie.org/693362

The system cannot find the path specified.

Not sure what is going on there. The install *appears* to have worked, 
but that warning leaves me feeling anxious that something is not quite 
right.

Cheers,
Charles
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] The system cannot find the path specified.

2009-11-11 Thread Charles Roper
On 11/11/2009 09:17, Charles Roper wrote:
 Hi,

 First post here - just getting to grips with Radiant.

 I'm trying to install the Paperclipped extension on a test site and have
 run into a couple of issues. I'm on Windows, using the RubyInstaller
 (which recently went RC1):

   ruby -v
 ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]

I've done some further digging and found the problem. I've created an 
issue on Github:

http://github.com/radiant/radiant/issues/#issue/69

Cheers,
Charles
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant