The installer again -- further tests.

Hugh Sasse Staff Elec Eng hgs at dmu.ac.uk
Mon Nov 1 11:23:01 EST 2004


I have installed the 1-NOV-2004 snapshot of ruby and I am still
getting this.
         Hugh
On Wed, 27 Oct 2004, Hugh Sasse Staff Elec Eng wrote:

> I have found the problem, I need to be in the source directory to
> run this, I can't just be anywhere.  I have a partial solution to
> that: it does much of the job but the errors I'm getting are wierd
> 
> I ran this not as root, so that it should fail due to permissions:
> 
> 
> brains hgs 272 %> !ru
> ruby /home/hgs/ruby/vim-ruby-2004.09.20/bin/vim-ruby-install.rb
> 
> Possible Vim installation directories:
>    1) /usr/local/share/vim/vim63
> 
> Please select one (or anything else to specify another directory): 1
> /usr/local/lib/ruby/1.8/fileutils.rb:746:in `stat': Not a directory - /usr/local/share/vim/vim63/compiler/ruby.vim/compiler/ruby.vim (Errno::ENOTDIR)
>          from /usr/local/lib/ruby/1.8/fileutils.rb:746:in `fu_same?'
>          from /usr/local/lib/ruby/1.8/fileutils.rb:725:in `fu_each_src_dest'
>          from /usr/local/lib/ruby/1.8/fileutils.rb:724:in `fu_each_src_dest0'
>          from /usr/local/lib/ruby/1.8/fileutils.rb:724:in `fu_each_src_dest'
>          from /usr/local/lib/ruby/1.8/fileutils.rb:318:in `cp'
>          from /home/hgs/ruby/vim-ruby-2004.09.20/bin/vim-ruby-install.rb:296:in `backup'
>          from /home/hgs/ruby/vim-ruby-2004.09.20/bin/vim-ruby-install.rb:259:in `install'
>          from /home/hgs/ruby/vim-ruby-2004.09.20/bin/vim-ruby-install.rb:253:in `each'
>          from /home/hgs/ruby/vim-ruby-2004.09.20/bin/vim-ruby-install.rb:253:in `install'
>          from /home/hgs/ruby/vim-ruby-2004.09.20/bin/vim-ruby-install.rb:252:in `chdir'
>          from /home/hgs/ruby/vim-ruby-2004.09.20/bin/vim-ruby-install.rb:252:in `install'
>          from /home/hgs/ruby/vim-ruby-2004.09.20/bin/vim-ruby-install.rb:377
> brains hgs 273 %>
> 
> The patch is this:
> ----8<----
> 
> 
> --- /home/hgs/ruby/vim-ruby-2004.09.20/bin/vim-ruby-install.rb.orig	2004-10-27 13:18:10.948557000 +0100
> +++ /home/hgs/ruby/vim-ruby-2004.09.20/bin/vim-ruby-install.rb	2004-10-27 14:06:59.380954000 +0100
> @@ -1,6 +1,7 @@
>   #!/usr/local/bin/ruby
> 
>   # vim-ruby-install: install the Vim config files for Ruby editing
> +# vim:set sw=2 et:
>   #
>   #  * scope out the target directry and get user to confirm
>   #    * if no directory found, ask user
> @@ -52,6 +53,8 @@
>         # 1. Try the current directory.
>       if SOURCE_FILES.all? { |path| FileTest.file?(path) }
>         return '.'
> +    elsif SOURCE_FILES.map{|f| File.join(File.dirname($0), '..',f)}.all? { |path| FileTest.file?(path) }
> +      return File.join(File.dirname($0), '..')
>       end
>         # 2. Try the gem 'vim-ruby'.
>       begin
> @@ -231,6 +234,9 @@
>       # will be copied.  Both are strings.
>     def initialize(source, target)
>       @source_dir = source
> +    unless FileTest.directory?(@source_dir)
> +      raise "Automatically determined source directory ('#{@source_dir}') doesn't exist"
> +    end
>       unless FileTest.directory?(target)
>         raise "Chosen target directory ('#{target}') doesn't exist"
>       end
> @@ -366,6 +372,7 @@
>   op.parse!(ARGV)
> 
>   source_dir = Env.determine_source_directory
> +if source_dir.nil? then raise "source_dir is Nil"; end
>   target_dir = $options[:target_dir] || TargetDirectory.finder.find_target_directory
>   VimRubyInstaller.new(source_dir, target_dir).install
> 
> 
> ----8<----
> Which may be a little better in some regards
> 
>          Hugh
> _______________________________________________
> vim-ruby-devel mailing list
> vim-ruby-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/vim-ruby-devel
>



More information about the vim-ruby-devel mailing list