Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Ruby update problem

  1. #21
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,708
    Blog Entries
    2

    Default Re: Ruby update problem

    Especially if you're a Developer, I recommend you use rbenv and install whatever ruby versions (yes, you can install any and multiple side by side). In my wiki on installing Ruby, I try to describe a few considerations when deciding whether it's better to use the openSUSE repos or the official Ruby repos.
    When you use rbenv and configure the "global" option as described in various documentation, the ruby from the ruby repos will over-ride all the ruby packages installed from the OSS but I haven't yet found that will cause any problems with YaST or any other openSUSE Ruby apps... openSUSE developers have apparently done a very good job writing apps which aren't version specific.

    You can install following either the official rbenv documentation or my Wiki page... The official documentation will configure your Ruby to run only in the security context of your logged in normal User. The documentation I wrote up allows your Ruby to run in any security context... eg. your logged in User, as root or as another User.

    https://github.com/rbenv/rbenv
    https://en.opensuse.org/User:Tsu2/Install_Ruby

    Once you have rbenv and Ruby installed either way, as I described in my documentation there are only a few things to keep in mind and it's very easy to use...

    And, using rbenv or rvm to manage your Rubies from the official Ruby repos does <not> cause your system to become mixed up and confused, contrarily that's exactly what a "Ruby manager" is supposed to do compared to simply running the gem command which is to keep everything straight and separate so that package locations, versions and environments are all kept separate. So, for instance it would be trivial to uninstall and remove rbenv and/or all its managed Ruby repos, and by extension any environments it's used for.

    If you have any questions about either the install or how to configure and use Rubies, ask away.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  2. #22

    Default Re: Ruby update problem

    Quote Originally Posted by tsu2 View Post
    The official documentation will configure your Ruby to run only in the security context of your logged in normal User. The documentation I wrote up allows your Ruby to run in any security context... eg. your logged in User, as root or as another User.
    Thank you. I did this for a normal User only. But I was forced to do this for Tumbleweed (otherwise it did not work.):

    Code:
    echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
    Code:
    curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bashChecking for `rbenv' in PATH: /home/alex/.rbenv/bin/rbenv
    Checking for rbenv shims in PATH: OK
    Checking `rbenv install' support: /home/alex/.rbenv/plugins/ruby-build/bin/rbenv-install (ruby-build 20190130-4-g0e33b11)
    Counting installed Ruby versions: 2 versions
    Checking RubyGems settings: OK
    Auditing installed plugins: OK

  3. #23
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,708
    Blog Entries
    2

    Default Re: Ruby update problem

    Quote Originally Posted by aleksejsmir View Post
    Thank you. I did this for a normal User only. But I was forced to do this for Tumbleweed (otherwise it did not work.):

    Code:
    echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
    Code:
    curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bashChecking for `rbenv' in PATH: /home/alex/.rbenv/bin/rbenv
    Checking for rbenv shims in PATH: OK
    Checking `rbenv install' support: /home/alex/.rbenv/plugins/ruby-build/bin/rbenv-install (ruby-build 20190130-4-g0e33b11)
    Counting installed Ruby versions: 2 versions
    Checking RubyGems settings: OK
    Auditing installed plugins: OK
    Interesting. Hope your contribution helps someone.
    Last time I reviewed the official rbenv documentation which you should have followed if installing only for your logged in User, bashrc should have been modified sufficiently to find rbenv... there shouldn't be a need to modify ~./profile AFAIK. Modifications to your User PATH should have been taken care of when you ran "rbenv init" in the following section

    https://github.com/rbenv/rbenv#how-r...nto-your-shell

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #24

    Default Re: Ruby update problem

    Interesting. I cannot start a new migration for my old project when I switched to rbenv - "cannot load such file -- bundler/setup (LoadError)".
    However, my application works.
    Solution to this problem:


    Code:
    rails app:update:bin
    Am I doing something wrong?

  5. #25
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,708
    Blog Entries
    2

    Default Re: Ruby update problem

    Quote Originally Posted by aleksejsmir View Post
    Interesting. I cannot start a new migration for my old project when I switched to rbenv - "cannot load such file -- bundler/setup (LoadError)".
    However, my application works.
    Solution to this problem:


    Code:
    rails app:update:bin
    Am I doing something wrong?
    I don't know how long it's going to be an issue,
    But in my Wiki for installing Ruby, you have to install bundler from the openSUSE repos regardless whether you continue to install from openSUSE repos or branch into installing rbenv.

    bundler is not always needed, but is a vry popular way to install entire groups of Ruby packages.
    If you need it, it should be installed from openSUSE.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 3 of 3 FirstFirst 123

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •