Has anyone tried installing ruby ​​& rubygems from a source on ubuntu (preferably unbuntu 9)?

The Ruby on Rails website recommends installing Ruby from source on Linux. I ran into a number of C library issues creating ruby ​​from source when installing Unbuntu 9 cleanly.

All the instructions I found on the network about installing ruby ​​on ubuntu are related to using ruback. Clearly, this is not what the rails recommend.

When I made a clean source ruby ​​build, I found that Rubygems could not be installed because the zlib extension did not work.

There are two problems:

1) The zlib extension is not built.

Decision:

i) make sure zlib is uncommented in the installation file in the extn directory of the ruby ​​source and

ii) make sure these zlib ubuntu packages are installed:

aptitude install zlib1g
aptitude install zlib1g-dbg
aptitude install zlib1g-dev
aptitude install zlibc

2) 1, ( ruby), zlib , .

, , "false":

puts require 'zlib'

, C- extn, , , , - zlib-.

:

  • ruby ​​ C zlib, Ruby, zlib.
  • , , /extn.

, ? - /verbose?

+3
3

, . , require 'zlib' false. , ! , LoadError.

+2

, ruby, gems rails Ubuntu 11.04

  • ruby ​​

  • RubyGems

  • zlib:
    • sudo apt-get install zlib1g-dev
    • cd your-ruby-sources/ext/zlib
    • ruby ​​extconf.rb
    • sudo make install
  • readline:
    • sudo apt-get install libreadline5-dev
    • cd your-ruby-sources/ext/readline
    • ruby ​​extconf.rb
    • sudo make install
  • openssl:
    • sudo apt-get install libssl-dev
    • cd your-ruby-sources/ext/openssl
    • ruby ​​extconf.rb
    • sudo make install
+5

libzlib-ruby? Ubuntu Rubygems:

$ apt-get update
$ apt-get dist-upgrade
$ apt-get install build-essential -y
$ apt-get install rsync -y
$ apt-get install ruby ri rdoc irb ri1.8 ruby1.8-dev libzlib-ruby zlib1g libopenssl-ruby -y
+1

Source: https://habr.com/ru/post/1714688/


All Articles