has anyone tried installing ruby & rubygems from source on Ubuntu (preferably Ubuntu 9)?

前端 未结 3 1725
半阙折子戏
半阙折子戏 2021-01-14 16:09

The Ruby on Rails website recommends installing Ruby from source under Linux. I encountered a number of C library problems building ruby from source on a clean install of Ub

相关标签:
3条回答
  • 2021-01-14 16:39

    I don't see what your problem is. You say that require 'zlib' returns false. But that means that it did work! If there were an error, you would get a LoadError exception.

    0 讨论(0)
  • 2021-01-14 16:45

    Here is what I did to install ruby, gems and rails on Ubuntu 11.04

    • Install ruby from sources

    • Install RubyGems from sources

    • Install zlib:
      • sudo apt-get install zlib1g-dev
      • cd your-ruby-sources/ext/zlib
      • ruby extconf.rb
      • make
      • sudo make install
    • Install readline:
      • sudo apt-get install libreadline5-dev
      • cd your-ruby-sources/ext/readline
      • ruby extconf.rb
      • make
      • sudo make install
    • Install openssl:
      • sudo apt-get install libssl-dev
      • cd your-ruby-sources/ext/openssl
      • ruby extconf.rb
      • make
      • sudo make install
    0 讨论(0)
  • 2021-01-14 16:55

    Did you install libzlib-ruby? Here's my typical Ubuntu initialization before installing 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
    
    0 讨论(0)
提交回复
热议问题