ROR 3, gem ошибка zlib

Discussion in 'PHP' started by lukmus, 20 Nov 2010.

  1. lukmus

    lukmus Elder - Старейшина

    Joined:
    18 Nov 2009
    Messages:
    366
    Likes Received:
    115
    Reputations:
    23
    Из тарболов установлена ruby 1.9
    Code:
    # ruby -v
    ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
    с ней в пакете идет и gem
    Code:
    # gem -v
    1.3.7
    Ни один гем установить нельзя
    Code:
    # gem install rails
    ERROR:  Loading command: install (LoadError)
    	no such file to load -- zlib
    ERROR:  While executing gem ... (NameError)
    	uninitialized constant Gem::Commands::InstallCommand
    Качаю ruby-zlib т.к. в репах его нет и пытаюсь установить
    Code:
    ]# ls
    ChangeLog  doc  extconf.rb  Makefile  MANIFEST  mkmf.log  THANKS  zlib.c
    [root@localhost ruby-zlib-0.6.0]# ruby extconf.rb
    checking for deflateReset() in -lz... yes
    checking for zlib.h... yes
    checking for rb_block_given_p() in ruby.h... yes
    checking for rb_str_buf_new() in ruby.h... yes
    checking for rb_io_print() in ruby.h... yes
    checking for rb_io_printf() in ruby.h... yes
    checking for rb_io_puts() in ruby.h... yes
    checking for rb_io_addstr() in ruby.h... yes
    checking for rb_define_alloc_func() in ruby.h... yes
    checking for rb_undef_alloc_func() in ruby.h... yes
    checking for kind of operating system... Unix
    creating Makefile
    [root@localhost ruby-zlib-0.6.0]# make
    gcc -I. -I/usr/local/include/ruby-1.9.1/x86_64-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DHAVE_ZLIB_H -DHAVE_RB_BLOCK_GIVEN_P -DHAVE_RB_STR_BUF_NEW -DHAVE_RB_IO_PRINT -DHAVE_RB_IO_PRINTF -DHAVE_RB_IO_PUTS -DHAVE_RB_IO_ADDSTR -DHAVE_RB_DEFINE_ALLOC_FUNC -DHAVE_RB_UNDEF_ALLOC_FUNC	-DOS_CODE=OS_UNIX -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -o zlib.o -c zlib.c
    zlib.c: В функции ‘do_checksum’:
    zlib.c:376: ошибка: ‘struct RString’ не содержит элемента с именем ‘ptr’
    zlib.c:376: ошибка: ‘struct RString’ не содержит элемента с именем ‘len’
    ...
    итд
    ...
    zlib.c:2735: ошибка: ‘struct RString’ не содержит элемента с именем ‘ptr’
    zlib.c:2740: ошибка: ‘struct RString’ не содержит элемента с именем ‘ptr’
    make: *** [zlib.o] Ошибка 1
    Code:
    Linux localhost.localdomain 2.6.33.4-95.fc13.x86_64 #1 SMP Thu May 13 05:16:23 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
     
  2. lukmus

    lukmus Elder - Старейшина

    Joined:
    18 Nov 2009
    Messages:
    366
    Likes Received:
    115
    Reputations:
    23
    решено вот так http://blog.lukmus.ru/?p=596
    спасибо всем за помощь