Can I install gems with apt-get on Ubuntu?

前端 未结 7 608
感情败类
感情败类 2021-02-02 07:27

I am new to Ruby and just diving in. The Ruby tutorial says I should get the packaging system from here: http://rubyforge.org/frs/?group_id=126

I am on Ubuntu Linux. The

相关标签:
7条回答
  • 2021-02-02 07:36

    Ubuntu now have rubygems as a package

    For Ubuntu 12:

    sudo apt-get install rubygems
    

    For Ubuntu 14.04:

    sudo apt-get install rubygems-integration
    
    0 讨论(0)
  • 2021-02-02 07:41

    If you install the full ruby application set with

    sudo apt-get install ruby-full

    You will get gems and much more by default. Tested on Ubuntu 16, it could also work on other version.

    0 讨论(0)
  • 2021-02-02 07:45

    First, download *.tar file, unpack this file, then go to rubygems directory in your console, and type

    ruby setup.rb
    

    That's it :)

    0 讨论(0)
  • 2021-02-02 07:46

    On Ubuntu 16.04 and Ubuntu 18.04, both sudo apt-get install rubygems and sudo apt-get install rubygems-integration failed for me. Instead, I had to do this:

    sudo apt-get install ruby-dev
    
    0 讨论(0)
  • 2021-02-02 07:50

    For me in Ubuntu 20.04 I did 3 things to create a new Ruby and Rails app.

    1. Install Ruby development version
    sudo apt install ruby-dev
    
    1. Install rails from gem
    sudo gem install rails 
    
    1. Create new application
    rails new blog
    

    I got error while installing rails(sudo apt install rails) only, So I installed devlopment version. I got permission related error while not using Sudo as well while installing gems and rails.

    0 讨论(0)
  • 2021-02-02 07:56

    If on Ubuntu 14.04 try below

    sudo apt-get install rubygems-integration
    
    0 讨论(0)
提交回复
热议问题