Instiki problem requires step 3

I was going to demo instiki as part of a Ruby talk I'm giving to our local
PerlMongers group.

I downloaded the latest (0.9.1) and installed it under Linux. Then I
tried to access: http://localhost:2500 and I got a message about there not
being a storage/2500 directory (but the server seemed to be running to be
able to give me this message). I then created those directories and it
worked fine - but this is a step 3 that isn't a chuckle :wink:

I also downloaded and installed instiki on my Powerbook (OSX 10.3.4) and
it apparently created those directories automatically because it worked
fine and as advertised. Since I'll be doing the talk using my Powerbook,
things should be OK, but the idea is that we want everyone in the audience
to follow along and install instiki on their laptops (some of which may
not be Powerbooks) if they want. (since about 75% of people at these sorts
of talks bring their laptops these days and since wifi is available, I'm
also going to encourage them to install Ruby early-on in the talk so they
can try things as I go along).

Why do these directories have to be created manually on Linux?
Is this something that will be fixed in the next version and will the next
version be available by Wednesday evening (when our talk takes place :-)?

Phil

Phil Tomson wrote:

I was going to demo instiki as part of a Ruby talk I'm giving to our local PerlMongers group.

I downloaded the latest (0.9.1) and installed it under Linux. Then I tried to access: http://localhost:2500 and I got a message about there not being a storage/2500 directory (but the server seemed to be running to be able to give me this message). I then created those directories and it worked fine - but this is a step 3 that isn't a chuckle :wink:

...

Why do these directories have to be created manually on Linux?

Win2k as well.

James

Plz find below a part of the patch I applied to RPAfy instiki 0.9.1;
it contains some RPA-specific stuff, but adapting it should be easy.
If you have rpa-base (http://rpa-base.rubyforge.org) installed,
running instiki becomes really a 2 step process :slight_smile:
(rpa install instiki; instiki.rb)

--- instiki.rb 2004-06-07 17:19:22.000000000 +0200
+++ instiki.rb.new 2004-09-07 10:06:51.000000000 +0200
@@ -6,9 +6,12 @@
end

require 'optparse'
+require 'rpa/defaults'
+require 'rpa'
+RPA.version = "0.0"

-cdir = File.expand_path(File.dirname(__FILE__))
-%w( /libraries/ /app/models /app/controllers ).each { |dir| $:.unshift(cdir + dir) }
+cdir = File.join(RPA::Defaults::PREFIX, RPA::Defaults::SITELIBDIR, "instiki")
+%w( /libraries/ /app/models /app/controllers ).each { |dir| $:.unshift File.join(cdir, dir) }
%w( web_controller_server action_controller_servlet wiki_service wiki ).each { |lib| require lib }

fork_available = true
@@ -23,10 +26,11 @@
OPTIONS = {
   :server_type => fork_available ? Daemon : SimpleServer,
   :port => 2500,
- :storage => "#{cdir}/storage",
+ :storage => "instiki/storage",
   :pdflatex => pdflatex_available
}

路路路

On Tue, Sep 07, 2004 at 03:10:13AM +0900, Phil Tomson wrote:

I downloaded the latest (0.9.1) and installed it under Linux. Then I
tried to access: http://localhost:2500 and I got a message about there not
being a storage/2500 directory (but the server seemed to be running to be
able to give me this message). I then created those directories and it
worked fine - but this is a step 3 that isn't a chuckle :wink:

+
ARGV.options do |opts|
   script_name = File.basename($0)
   opts.banner = "Usage: ruby #{script_name} [options]"
@@ -41,7 +45,7 @@
           ) { OPTIONS[:server_type] = SimpleServer }
   opts.on("-t", "--storage=storage", String,
           "Makes Instiki use the specified directory for storage.",
- "Default: ./storage/[port]") { |OPTIONS[:storage]| }
+ "Default: #{OPTIONS[:storage]}") { |OPTIONS[:storage]| }

   opts.separator ""

@@ -52,7 +56,11 @@
end

Socket.do_not_reverse_lookup = true
-WikiService.storage_path = OPTIONS[:storage] + "/" + OPTIONS[:port].to_s
+require 'fileutils'
+FileUtils.mkdir_p OPTIONS[:storage]
+WikiService.storage_path = File.join(Dir.pwd, OPTIONS[:storage],
+ OPTIONS[:port])
WikiController.template_root = "#{cdir}/app/views/"
+WikiController.const_set("EXPORT_DIRECTORY", File.join(Dir.pwd, OPTIONS[:storage]) + "/")

-WebControllerServer.new(OPTIONS[:port], OPTIONS[:server_type], "#{cdir}/app/controllers/")
\ No newline at end of file
+WebControllerServer.new(OPTIONS[:port], OPTIONS[:server_type], "#{cdir}/app/controllers/")

--
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Apparently this is the case with all of the 0.9.x versions of instiki installed from the .tgz or .zip files. The .dmg version creates the directories on install (in ~/Library/Application Support). I think it's otherwise supposed to make then on initial startup if they're not already there, but it doesn't.

This is discussed at http://www.instiki.org/show/FAQ

  - Peter

路路路

On 6 Sep 2004, at 20:07, James Britt wrote:

Phil Tomson wrote:

I was going to demo instiki as part of a Ruby talk I'm giving to our local PerlMongers group.
I downloaded the latest (0.9.1) and installed it under Linux. Then I tried to access: http://localhost:2500 and I got a message about there not being a storage/2500 directory (but the server seemed to be running to be able to give me this message). I then created those directories and it worked fine - but this is a step 3 that isn't a chuckle :wink:

...

Why do these directories have to be created manually on Linux?

Win2k as well.