First question in here

Discussion in 'Ruby' started by marcos rebelo, Nov 25, 2007.

  1. Hy all

    I'm new in here, so hi all for the first time. I'm a Perl and I'm
    trying to learn a second scripting language, and I liked Ruby.

    I'm getting crazy with one thing, documentation. Where did you set it?


    Do Ruby as support to JASON, I didn't found it.


    Best Regards
    MArcos

    --
    Marcos Rebelo
    http://oleber.freehostia.com
    marcos rebelo, Nov 25, 2007
    #1
    1. Advertising

  2. marcos rebelo

    Tim Hunter Guest

    marcos rebelo wrote:
    > Hy all
    >
    > I'm new in here, so hi all for the first time. I'm a Perl and I'm
    > trying to learn a second scripting language, and I liked Ruby.
    >
    > I'm getting crazy with one thing, documentation. Where did you set it?
    >
    >
    > Do Ruby as support to JASON, I didn't found it.
    >
    >
    > Best Regards
    > MArcos
    >


    http://www.ruby-doc.org/

    If you mean "JSON", did you try Googling "ruby+json"?

    --
    RMagick: http://rmagick.rubyforge.org/
    Tim Hunter, Nov 25, 2007
    #2
    1. Advertising

  3. trying to install JSON

    I get diferent errors

    > gem install json

    Bulk updating Gem source index for: http://gems.rubyforge.org
    ERROR: While executing gem ... (Gem::GemNotFoundException)
    Could not find json (> 0) in any repository

    or

    > gem install json

    Bulk updating Gem source index for: http://gems.rubyforge.org
    Select which gem to install for your platform (i486-linux)
    1. json 1.1.1 (mswin32)
    2. json 1.1.1 (ruby)
    3. json 1.1.0 (mswin32)
    4. json 1.1.0 (ruby)
    5. Skip this gem
    6. Cancel installation
    > 2

    Building native extensions. This could take a while...
    ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

    ruby extconf.rb install json
    creating Makefile

    make
    cc -I. -I/usr/lib/ruby/1.8/i486-linux -I/usr/lib/ruby/1.8/i486-linux
    -I. -fPIC -fno-strict-aliasing -g -O2 -fPIC -c unicode.c
    In file included from unicode.h:5,
    from unicode.c:3:
    /usr/lib/ruby/1.8/i486-linux/ruby.h:40:21: error: stdlib.h: No such
    file or directory
    /usr/lib/ruby/1.8/i486-linux/ruby.h:44:21: error: string.h: No such
    file or directory
    /usr/lib/ruby/1.8/i486-linux/ruby.h:54:19: error: stdio.h: No such
    file or directory
    /usr/lib/ruby/1.8/i486-linux/ruby.h:71:20: error: alloca.h: No such
    file or directory
    In file included from /usr/lib/gcc/i486-linux-gnu/4.1.3/include/syslimits.h:7,
    from /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h:11,
    from /usr/lib/ruby/1.8/i486-linux/ruby.h:91,
    from unicode.h:5,
    from unicode.c:3:
    /usr/lib/gcc/i486-linux-gnu/4.1.3/include/limits.h:122:61: error:
    limits.h: No such file or directory
    In file included from /usr/lib/ruby/1.8/i486-linux/ruby.h:718,
    from unicode.h:5,
    from unicode.c:3:
    /usr/lib/ruby/1.8/i486-linux/missing.h:16:24: error: sys/time.h: No
    such file or directory
    /usr/lib/ruby/1.8/i486-linux/missing.h:25:25: error: sys/types.h: No
    such file or directory
    In file included from /usr/lib/ruby/1.8/i486-linux/ruby.h:719,
    from unicode.h:5,
    from unicode.c:3:
    /usr/lib/ruby/1.8/i486-linux/intern.h:218: error: expected declaration
    specifiers or '...' before 'fd_set'
    /usr/lib/ruby/1.8/i486-linux/intern.h:218: error: expected declaration
    specifiers or '...' before 'fd_set'
    /usr/lib/ruby/1.8/i486-linux/intern.h:218: error: expected declaration
    specifiers or '...' before 'fd_set'
    /usr/lib/ruby/1.8/i486-linux/intern.h:218: warning: 'struct timeval'
    declared inside parameter list
    /usr/lib/ruby/1.8/i486-linux/intern.h:218: warning: its scope is only
    this definition or declaration, which is probably not what you want
    /usr/lib/ruby/1.8/i486-linux/intern.h:219: warning: 'struct timeval'
    declared inside parameter list
    /usr/lib/ruby/1.8/i486-linux/intern.h:453: warning: parameter names
    (without types) in function declaration
    In file included from unicode.h:5,
    from unicode.c:3:
    /usr/lib/ruby/1.8/i486-linux/ruby.h:728:21: error: pthread.h: No such
    file or directory
    In file included from unicode.h:5,
    from unicode.c:3:
    /usr/lib/ruby/1.8/i486-linux/ruby.h:730: error: expected '=', ',',
    ';', 'asm' or '__attribute__' before 'rb_nativethread_t'
    make: *** [unicode.o] Error 1


    Gem files will remain installed in /var/lib/gems/1.8/gems/json-1.1.1
    for inspection.
    Results logged to
    /var/lib/gems/1.8/gems/json-1.1.1/ext/json/ext/parser/gem_make.out


    I'm using the last Ubuntu, and I'm not understanding how to install
    this JSON libraries.

    Someone can help me?

    thanks
    MArcos




    On Nov 25, 2007 9:12 AM, Tim Hunter <> wrote:
    > marcos rebelo wrote:
    > > Hy all
    > >
    > > I'm new in here, so hi all for the first time. I'm a Perl and I'm
    > > trying to learn a second scripting language, and I liked Ruby.
    > >
    > > I'm getting crazy with one thing, documentation. Where did you set it?
    > >
    > >
    > > Do Ruby as support to JASON, I didn't found it.
    > >
    > >
    > > Best Regards
    > > MArcos
    > >

    >
    > http://www.ruby-doc.org/
    >
    > If you mean "JSON", did you try Googling "ruby+json"?
    >
    > --
    > RMagick: http://rmagick.rubyforge.org/
    >
    >




    --
    Marcos Rebelo
    http://oleber.freehostia.com
    marcos rebelo, Nov 25, 2007
    #3
  4. marcos rebelo

    TerryP Guest

    Mark Woodward wrote:

    > Hi Marcos,
    >
    > On Sun, 25 Nov 2007 06:02:29 -0500
    > marcos rebelo <> wrote:
    >
    >> trying to install JSON
    >>
    >> I get diferent errors
    >>
    >> > gem install json

    >
    >> > gem install json

    >
    >> ruby extconf.rb install json
    >> creating Makefile

    >
    > If you're using Gutsy, there's a libjson-ruby in the repositories if
    > that's any help?
    >
    >
    > cheers,
    >


    I would follow my nose in search of headers and examine the makefile.

    Despite ruby gems, I find using my operating systems package management
    usually
    works best. I also prefer pure ruby implementations where possible, because
    it's
    less bugger (for me) to fetch via gem. And if I was worried about
    performance
    I'd have waited for skipped 'scripting' languages...

    Terry@Dixie$ gem search json -b
    4:51

    *** LOCAL GEMS ***

    *** REMOTE GEMS ***
    Bulk updating Gem source index for: http://gems.rubyforge.org

    fjson (0.1.2, 0.1.1, 0.1.0, 0.0.9, 0.0.8, 0.0.7, 0.0.6, 0.0.5, 0.0.4, 0.0.3,
    0.0.2, 0.0.1)
    This library is for parsing JSON strings and unparsing ruby data
    structures. This library is a fork of Florian Frank's JSON library
    with key parts implemented in C for performance improvements.

    json (1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0, 0.4.3, 0.4.2, 0.4.1,
    0.4.0)
    A JSON implementation as a Ruby extension

    json_pure (1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0)
    A JSON implementation in Ruby

    Orbjson (0.0.4, 0.0.3, 0.0.2, 0.0.1)
    Lib for creating JSON-RPC server applications.

    ruby-json (1.1.2, 1.1.1)
    ruby-json is a library for using JavaScript Object Notation (JSON)
    under Ruby.
    Terry@Dixie$
    4:52
    TerryP, Nov 26, 2007
    #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.

Share This Page