Professional Web Applications Themes

error message for Shell class - Ruby

I trid to test Shell class in my system, windows 2000/ruby version win-1.7.3-8 this is my code: test1.rb require 'shell' sh = Shell.new puts sh.pwd But I got this error message c:/ruby/lib/ruby/1.7/shell.rb:267: private method `initialize' called for Shell: :CommandProcessor:Class (NoMethodError) from test1.rb:1:in `require' from test1.rb:1 shell.rb:267 is CommandProcessor.initialize CommandProcessor.run_config What's wrong? thanks s.moon...

  1. #1

    Default error message for Shell class

    I trid to test Shell class
    in my system, windows 2000/ruby version win-1.7.3-8

    this is my code: test1.rb

    require 'shell'
    sh = Shell.new
    puts sh.pwd

    But I got this error message

    c:/ruby/lib/ruby/1.7/shell.rb:267: private method `initialize' called for Shell:
    :CommandProcessor:Class (NoMethodError)
    from test1.rb:1:in `require'
    from test1.rb:1

    shell.rb:267 is

    CommandProcessor.initialize
    CommandProcessor.run_config

    What's wrong?


    thanks

    s.moon
    s moon Guest

  2. #2

    Default Re: error message for Shell class


    On Thursday, July 31, 2003, at 05:44 PM, s moon wrote:
    > I trid to test Shell class
    > in my system, windows 2000/ruby version win-1.7.3-8
    >
    > this is my code: test1.rb
    >
    > require 'shell'
    > sh = Shell.new
    > puts sh.pwd
    >
    > But I got this error message
    >
    > c:/ruby/lib/ruby/1.7/shell.rb:267: private method `initialize' called
    > for Shell:
    > :CommandProcessor:Class (NoMethodError)
    > from test1.rb:1:in `require'
    > from test1.rb:1
    >
    > shell.rb:267 is
    >
    > CommandProcessor.initialize
    > CommandProcessor.run_config
    > [snip]
    I tried this code using Ruby 1.8.0preview6 and it worked without any
    trouble. The Ruby version you're using, 1.7.3-8 is the prior
    development release and was superseded by the 1.8 preview releases. The
    last stable release was 1.6.8. I recommend getting the latest 1.8
    preview build available for windows -- I have heard that they exist.

    Regards,

    Mark


    Mark Wilson Guest

  3. #3

    Default Re: error message for Shell class

    Mark Wilson <mwilson13cox.net> wrote in message news:<D2D56D74-C3A7-11D7-A469-000393876156cox.net>...
    > On Thursday, July 31, 2003, at 05:44 PM, s moon wrote:
    >
    > > I trid to test Shell class
    > > in my system, windows 2000/ruby version win-1.7.3-8
    > >
    > > this is my code: test1.rb
    > >
    > > require 'shell'
    > > sh = Shell.new
    > > puts sh.pwd
    > >
    > > But I got this error message
    > >
    > > c:/ruby/lib/ruby/1.7/shell.rb:267: private method `initialize' called
    > > for Shell:
    > > :CommandProcessor:Class (NoMethodError)
    > > from test1.rb:1:in `require'
    > > from test1.rb:1
    > >
    > > shell.rb:267 is
    > >
    > > CommandProcessor.initialize
    > > CommandProcessor.run_config
    > > [snip]
    >
    > I tried this code using Ruby 1.8.0preview6 and it worked without any
    > trouble. The Ruby version you're using, 1.7.3-8 is the prior
    > development release and was superseded by the 1.8 preview releases. The
    > last stable release was 1.6.8. I recommend getting the latest 1.8
    > preview build available for windows -- I have heard that they exist.
    >
    > Regards,
    >
    > Mark
    thanks

    I installed ruby 1.8.0-9 for my windows 2k
    and it works correctly.

    s moon
    s moon Guest

Similar Threads

  1. Replies: 2
    Last Post: December 25th, 02:35 PM
  2. Replies: 0
    Last Post: December 6th, 04:34 PM
  3. Replies: 0
    Last Post: September 18th, 03:02 PM
  4. Replies: 0
    Last Post: April 1st, 11:12 PM
  5. How do I use grep with the Shell class
    By Mark Wilson in forum Ruby
    Replies: 2
    Last Post: September 17th, 09:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139