Instiki problem requires step 3

Discussion in 'Ruby' started by Phil Tomson, Sep 6, 2004.

  1. Phil Tomson

    Phil Tomson Guest

    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 ;-)

    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, Sep 6, 2004
    #1
    1. Advertising

  2. Phil Tomson

    James Britt Guest

    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 ;-)
    >

    ...

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


    Win2k as well.


    James
    James Britt, Sep 6, 2004
    #2
    1. Advertising

  3. 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 ;-)

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

    >
    > Win2k as well.



    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
    Peter McMaster, Sep 6, 2004
    #3
  4. 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 ;-)


    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 :)
    (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
    }

    +
    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
    Mauricio Fernández, Sep 7, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrzej J. Turowicz
    Replies:
    1
    Views:
    599
    =?Utf-8?B?RFdT?=
    Jan 29, 2006
  2. David Heinemeier Hansson

    [ANN] Instiki: There's no step three

    David Heinemeier Hansson, Feb 25, 2004, in forum: Ruby
    Replies:
    4
    Views:
    191
    David Heinemeier Hansson
    Feb 25, 2004
  3. Curt Hibbs
    Replies:
    0
    Views:
    105
    Curt Hibbs
    Apr 14, 2004
  4. Peña, Botp
    Replies:
    1
    Views:
    165
    David Heinemeier Hansson
    Sep 19, 2004
  5. Sam Roberts
    Replies:
    0
    Views:
    145
    Sam Roberts
    Jan 31, 2005
Loading...

Share This Page