chris kristof
2005-Apr-11 17:54 UTC
ActiveRecord Enhancement: Help me to package it...please!
I''m working on an enhancement to ActiveRecord. The the code is finished and the tests all pass. I''m a short distance away from submitting the patch but I''m running into some serious problems running rake on Windows. Attempt #1: In a plain old Windows command shell I run "rake package". A bunch of non-Windows commands like "ln" and "rm" scroll by. The rake task fails with: ... ln examples/shared_setup.rb pkg/activerecord-1.9.1/examples/shared_setup.rb rm -f pkg/activerecord-1.9.1/examples/validation.rb ln examples/validation.rb pkg/activerecord-1.9.1/examples/validation.rb cd pkg tar zcvf activerecord-1.9.1.tgz activerecord-1.9.1 rake aborted! undefined method `exitstatus'' for nil:NilClass Attempt #2: Ok, since there are a bunch of unix commands up there in #1 I decide to install cygwin. I run "rake package" under a cygwin bash shell. Rake dies immediately this time: $ rake package c:\ruby\bin\ruby.exe: No such file or directory -- /cygdrive/c/ruby/bin/rake (LoadError) But I check and rake is there! $ ls -l /cygdrive/c/ruby/bin/rake -rwxrwxrwx 1 Administrators None 419 Mar 28 18:26 /cygdrive/c/ruby/bin/rake What is the proper way to set up ruby, rake, and my rails development tree on Windows so that rake and the rails packaging tasks work? The sooner I get rake and the rails packaging stuff working the sooner I can submit my ActiveRecord patch. I''d really like to get it into 1.0... thanks for reading, Kristof
David Goodlad
2005-Apr-11 20:46 UTC
Re: ActiveRecord Enhancement: Help me to package it...please!
On Apr 11, 2005 11:54 AM, chris kristof <cakristof-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m working on an enhancement to ActiveRecord. The the code is > finished and the tests all pass. I''m a short distance away from > submitting the patch but I''m running into some serious problems > running rake on Windows. >[snip]> > Attempt #2: > > Ok, since there are a bunch of unix commands up there in #1 I decide > to install cygwin. I run "rake package" under a cygwin bash shell. > Rake dies immediately this time: > > $ rake package > c:\ruby\bin\ruby.exe: No such file or directory -- > /cygdrive/c/ruby/bin/rake (LoadError) >This looks to me like it''s not able to find "C:\ruby\bin\ruby.exe". The file /cygdrive/c/ruby/bin/rake probably has as its interpreter (the shebang line, #!) the hardcoded "C:\......". Cygwin isn''t able to find c:\ruby\bin\ruby.exe because it needs to be referred to under /cygdrive/c Dave -- Dave Goodlad dgoodlad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org or dave-eHfbeeWWzZOw5LPnMra/2Q@public.gmane.org http://david.goodlad.ca/
Kristof
2005-Apr-11 21:27 UTC
Re: ActiveRecord Enhancement: Help me to package it...please!
On Apr 11, 2005 4:46 PM, David Goodlad <dgoodlad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Apr 11, 2005 11:54 AM, chris kristof <cakristof-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m working on an enhancement to ActiveRecord. The the code is > > finished and the tests all pass. I''m a short distance away from > > submitting the patch but I''m running into some serious problems > > running rake on Windows. > > > [snip] > > > > Attempt #2: > > > > Ok, since there are a bunch of unix commands up there in #1 I decide > > to install cygwin. I run "rake package" under a cygwin bash shell. > > Rake dies immediately this time: > > > > $ rake package > > c:\ruby\bin\ruby.exe: No such file or directory -- > > /cygdrive/c/ruby/bin/rake (LoadError) > > > > This looks to me like it''s not able to find "C:\ruby\bin\ruby.exe". > The file /cygdrive/c/ruby/bin/rake probably has as its interpreter > (the shebang line, #!) the hardcoded "C:\......". Cygwin isn''t able > to find c:\ruby\bin\ruby.exe because it needs to be referred to under > /cygdrive/cYep, rake did had a hardcoded "#! c:\ruby\bin\ruby.exe" at the top. I changed it to the right thing for cygwin "#! /cygdrive/c/ruby/bin/rake" and now it just hangs with no output: $ rake --verbose I have to ctrl-c it. "rake --help" also hangs. Should I give up on Windows for Rails development? Are any of the Rails contributers working in a Windows environment? Kristof
Rick Olson
2005-Apr-11 21:36 UTC
Re: ActiveRecord Enhancement: Help me to package it...please!
I for one think it''s important to get reasonably good compatibility with Windows. It would be nice to write some .bat files to replaces those shell scripts, but I don''t think Windows can create soft links. I know it can create hard links for POSIX compatibility, this is just a hidden feature from Windows Explorer. There are ways around that (http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/Default.asp?url=/resources/documentation/Windows/XP/all/reskit/en-us/prkc_fil_baey.asp). I''m sure David would welcome a small patch for windows compatibility provided it doesn''t break the other environments. I haven''t run into this issue personally, but I''ll check it out. I tried loading the AR unit tests, but it looked like some of the fixtures or schema scripts were missing. I was running off a beta version of rails, so I''ll check that out too. On 4/11/05, Kristof <cakristof-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Apr 11, 2005 4:46 PM, David Goodlad <dgoodlad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Apr 11, 2005 11:54 AM, chris kristof <cakristof-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''m working on an enhancement to ActiveRecord. The the code is > > > finished and the tests all pass. I''m a short distance away from > > > submitting the patch but I''m running into some serious problems > > > running rake on Windows. > > > > > [snip] > > > > > > Attempt #2: > > > > > > Ok, since there are a bunch of unix commands up there in #1 I decide > > > to install cygwin. I run "rake package" under a cygwin bash shell. > > > Rake dies immediately this time: > > > > > > $ rake package > > > c:\ruby\bin\ruby.exe: No such file or directory -- > > > /cygdrive/c/ruby/bin/rake (LoadError) > > > > > > > This looks to me like it''s not able to find "C:\ruby\bin\ruby.exe". > > The file /cygdrive/c/ruby/bin/rake probably has as its interpreter > > (the shebang line, #!) the hardcoded "C:\......". Cygwin isn''t able > > to find c:\ruby\bin\ruby.exe because it needs to be referred to under > > /cygdrive/c > > Yep, rake did had a hardcoded "#! c:\ruby\bin\ruby.exe" at the top. I > changed it to the right thing for cygwin "#! > /cygdrive/c/ruby/bin/rake" and now it just hangs with no output: > > $ rake --verbose > > I have to ctrl-c it. "rake --help" also hangs. > > Should I give up on Windows for Rails development? Are any of the > Rails contributers working in a Windows environment? > > > Kristof > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- rick http://techno-weenie.net
Kevin Williams
2005-Apr-12 04:45 UTC
Re: ActiveRecord Enhancement: Help me to package it...please!
chris kristof wrote:> In a plain old Windows command shell I run "rake package". A bunch of > non-Windows commands like "ln" and "rm" scroll by. The rake task > fails with: > ... > ln examples/shared_setup.rb pkg/activerecord-1.9.1/examples/shared_setup.rb > rm -f pkg/activerecord-1.9.1/examples/validation.rb > ln examples/validation.rb pkg/activerecord-1.9.1/examples/validation.rb > cd pkg > tar zcvf activerecord-1.9.1.tgz activerecord-1.9.1 > rake aborted! > undefined method `exitstatus'' for nil:NilClassI''ve always used the tools at http://unxutils.sourceforge.net/ for this kind of thing. I put them all in a folder and make sure that folder is in the path.> Ok, since there are a bunch of unix commands up there in #1 I decide > to install cygwin. I run "rake package" under a cygwin bash shell. > Rake dies immediately this time: > > $ rake package > c:\ruby\bin\ruby.exe: No such file or directory -- > /cygdrive/c/ruby/bin/rake (LoadError)Cygwin handles everything differently. The Ruby tools (like Rake) will all have C:\-based paths, so you''ll have to change them. I suggest don''t mix Cygwin and native Windows. Either do it all in Cygwin or all in Windows. ---------- Scanned for viruses by ClamAV
Wolfgang Klinger
2005-Apr-12 05:27 UTC
Re: ActiveRecord Enhancement: Help me to package it...please!
Hi! On Mon, 11 Apr 2005, Kristof wrote the following:> Should I give up on Windows for Rails development? Are any of the > Rails contributers working in a Windows environment? >try CoLinux[1], it''s not that hard to setup... bye Wolfgang [1] http://www.colinux.org/ http://wiki.colinux.org/cgi-bin/GettingStarted