Ruby update problem

Hello.
Could you tell me how to solve this problem?

alex@linux-1fj7:~> LC_ALL=C sudo zypper dup
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...


Problem: ruby2.5-rubygem-activesupport-5_1-5.1.6.1-1.1.x86_64 requires rubygem(ruby:2.5.0:tzinfo:1) >= 1.1, but this requirement cannot be provided
  deleted providers: ruby2.5-rubygem-tzinfo-1.2.5-1.1.x86_64
 Solution 1: deinstallation of ruby2.5-rubygem-activesupport-5_1-5.1.6-1.1.x86_64
 Solution 2: keep obsolete ruby2.5-rubygem-tzinfo-1.2.5-1.1.x86_64
 Solution 3: break ruby2.5-rubygem-activesupport-5_1-5.1.6.1-1.1.x86_64 by ignoring some of its dependencies


Choose from above solutions by number or cancel [1/2/3/c] (c):

Repos:

alex@linux-1fj7:~> LC_ALL=C zypper lr -Ed
#  | Alias                               | Name                                   | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                     | Service
---+-------------------------------------+----------------------------------------+---------+-----------+---------+----------+--------+-----------------------------------------------------------------------------------------+--------
 1 | google-chrome                       | google-chrome                          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://dl.google.com/linux/chrome/rpm/stable/x86_64                                     |        
 2 | graphics                            | Graphics Project (openSUSE_Tumbleweed) | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/graphics/openSUSE_Tumbleweed/                 |        
 3 | http-download.opensuse.org-f8390583 | devel:languages:nodejs                 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_Tumbleweed/ |        
 4 | http-ftp.uni-erlangen.de-419fcde3   | Packman Repository                     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://ftp.uni-erlangen.de/pub/mirrors/packman/suse/openSUSE_Tumbleweed                 |        
 5 | packman                             | packman                                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/                     |        
 7 | repo-non-oss                        | openSUSE-Tumbleweed-Non-Oss            | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/non-oss/                                   |        
 8 | repo-oss                            | openSUSE-Tumbleweed-Oss                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/oss/                                       |        
10 | repo-update                         | openSUSE-Tumbleweed-Update             | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/tumbleweed/ 
                                |        
alex@linux-1fj7:~> LC_ALL=C zypper repos
Repository priorities are without effect. All enabled repositories share the same priority.


#  | Alias                               | Name                                   | Enabled | GPG Check | Refresh
---+-------------------------------------+----------------------------------------+---------+-----------+--------
 1 | google-chrome                       | google-chrome                          | Yes     | (r ) Yes  | Yes    
 2 | graphics                            | Graphics Project (openSUSE_Tumbleweed) | Yes     | (r ) Yes  | Yes    
 3 | http-download.opensuse.org-f8390583 | devel:languages:nodejs                 | Yes     | (r ) Yes  | Yes    
 4 | http-ftp.uni-erlangen.de-419fcde3   | Packman Repository                     | Yes     | (r ) Yes  | Yes    
 5 | packman                             | packman                                | Yes     | (r ) Yes  | Yes    
 6 | repo-debug                          | openSUSE-Tumbleweed-Debug              | No      | ----      | ----   
 7 | repo-non-oss                        | openSUSE-Tumbleweed-Non-Oss            | Yes     | (r ) Yes  | Yes    
 8 | repo-oss                            | openSUSE-Tumbleweed-Oss                | Yes     | (r ) Yes  | Yes    
 9 | repo-source                         | openSUSE-Tumbleweed-Source             | No      | ----      | ----   
10 | repo-update                         | openSUSE-Tumbleweed-Update             | Yes     | (r ) Yes  | Yes    

As YaST2 is almost completely Ruby-based, I can only recommend from experience not to uninstall anything of the default Ruby packages. I once made my YaST unusable that way, after issuing a »gem uninstall --all« as root, IIRC.

Having been using Ruby as my main scripting language since 2004, I ought to know more about rvm and other Ruby version managers, but as it is I’lm just using the pre-installed MRI (true to Matz’ POLS) and leave it as it is, otherwise. You can always compile Ruby into a local directory and use that one, but you have to be careful about different library and ruby-gem and ruby-doc paths as well (because commands as »ri«, »irb« and »gem« need to use the correct paths depending on the version of Ruby they run on).

Can you tell a bit about how you ended up with this configuration? Thanks!

Ok, here is my story. :slight_smile:
I have not had problems with Ruby for almost a year.
It would be cool if good advice …

Do you have the RPM package ruby2.5-rubygem-rails-5_1 installed with dependencies? Can you check with

  • YaST → Software Management (search and select the package for install or unconditional update)
  • then change to Tab »Installation Summary« → Menu »Extras« → »Install All Matching Recommended Packages«
  • in the dialog, take note of the recommendation (anything surprising?), then close the dialog with »OK«
  • finally, select »Accept« on the lower right

Does YaST complain about any package conflicts? Installing Rails really should be a 1.5-minute job just like on Fedora.
Maybe we can crack this nut…

Nothing. Empty. Zero.

Any ideas?

Well, I can’t seem to replicate this problem. Yet, if your installation isn’t a production-critical server installation, then of the three choices offered by zypper in your initial posting…

 Solution 1: deinstallation of ruby2.5-rubygem-activesupport-5_1-5.1.6-1.1.x86_64
 Solution 2: keep obsolete ruby2.5-rubygem-tzinfo-1.2.5-1.1.x86_64
 **Solution 3: break ruby2.5-rubygem-activesupport-5_1-5.1.6.1-1.1.x86_64 by ignoring some of its dependencies**

… I would choose Solution 3 because it’s very possible that Rails may work nevertheless. Otherwise, the output of »rails new your_project_name« would be helpful.

You may also give the official openSUSE-one-click installer for Rails 5.2 a try if you’re feeling adventurous (and if you don’t have any version constraints):
https://software.opensuse.org/package/ruby2.5-rubygem-rails-5.2

No, it does not work.

Really? It’s simple:

alex@linux-1fj7:~> LC_ALL=C sudo zypper in ruby2.5-rubygem-rails-5_1
Loading repository data...
Reading installed packages...
Resolving package dependencies...


Problem: nothing provides rubygem(ruby:2.5.0:tzinfo:1) >= 1.1 needed by ruby2.5-rubygem-activesupport-5_1-5.1.6.1-1.1.x86_64
 Solution 1: do not install ruby2.5-rubygem-rails-5_1-5.1.6.1-1.1.x86_64
 Solution 2: break ruby2.5-rubygem-activesupport-5_1-5.1.6.1-1.1.x86_64 by ignoring some of its dependencies


Choose from above solutions by number or cancel [1/2/c] (c): 

alex@linux-1fj7:~> LC_ALL=C sudo zypper in ruby2.5-rubygem-rails-5_2
Loading repository data...
Reading installed packages...
'ruby2.5-rubygem-rails-5_2' not found in package names. Trying capabilities.
No provider of 'ruby2.5-rubygem-rails-5_2' found.


alex@linux-1fj7:~> LC_ALL=C sudo zypper in ruby2.5-rubygem-railties-5.2
Loading repository data...
Reading installed packages...
Resolving package dependencies...


Problem: nothing provides rubygem(ruby:2.5.0:tzinfo:1) >= 1.1 needed by ruby2.5-rubygem-activesupport-5.2-5.2.2-1.1.x86_64
 Solution 1: do not install ruby2.5-rubygem-railties-5.2-5.2.2-1.1.x86_64
 Solution 2: break ruby2.5-rubygem-activesupport-5.2-5.2.2-1.1.x86_64 by ignoring some of its dependencies


Choose from above solutions by number or cancel [1/2/c] (c):

Help please.
I am a developer. I need a ruby.

NAME="openSUSE Tumbleweed" 
# VERSION="20190121"

Have you tried solution 2 there?


alex@linux-1fj7:~> LC_ALL=C sudo zypper in ruby2.5-rubygem-rails-5_2
...]
No provider of 'ruby2.5-rubygem-rails-5_2' found.

The repository from the 1-click-installer mentioned before seems missing — that’s why »no provider«.
Read up on openSUSE’s Website about any questions (there’s also a FAQ there; also, most often, it’s not really a one-click install.).
So if you sure you want Rails 5.2 and not Rails 5.1:

  1. Try https://software.opensuse.org/package/ruby2.5-rubygem-rails-5.2 again
  2. From there, download the package for Tumbleweed (currently, the official package is 5.2.2; alternatively, you can try the cutting-edge railties too: https://software.opensuse.org/package/rubygem-railties-5.2)
  3. Open your download folder, double-click the YMP file
    you’ve downloaded
  4. allow YaST to add the repositories; follow the instructions; YaST should resolve any missing dependencies automagically
  5. open a console window and create a test Rails project with »rails new
    your_project_name« (if any errors occur, post them here in this thread, please)
  6. … or check out David Heinemeier Hansson’s Rails 5 tour, following this video: https://www.youtube.com/watch?v=OaDhY_y8WTo (ca 20 minutes; again, please post any errors occuring, or anything out of the ordinary)

Help please.
I am a developer. I need a ruby.

If it’s only Ruby that you want, you already have it. Try a few one-liners in the shell:

ruby -v
ruby -we '10.times {|r| puts "#{r} rubies"}'
ruby -le '32.times {|y| print " "*(31-y), (0..y).map{|x|~y&x>0?" .":" A"}.join}'

You don’t even need an editor. :wink:

Concerning those inconsistencies with zypper, I have no explanation for that. Wish somebody more experienced with Tumbleweed and zypper could join in.
My experience with Tumbleweed was: too cutting-edge, too experimental, too many updates per week; if you’d like to concentrate on your work in a stable environment, give Leap 15 a try.
And if you want to learn more about those software packages than zypper or the rpm command provide, (e.g. their dependencies, variants, providers, file lists; what removing them would entail; ), get comfortable with the YaST2 Software Management module. Its menus are packed with functionality. It’s more versatile than one would think at first glance. Cheers, happy hacking!

hell, I don’t know what to do…

alex@linux-1fj7:/mnt/a/Rails/test2> ruby -v
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux-gnu]
alex@linux-1fj7:/mnt/a/Rails/test2> rails s
**Traceback** (most recent call last):
        12: from /usr/bin/rails:23:in `<main>'
        11: from /usr/lib64/ruby/2.5.0/rubygems.rb:309:in `activate_bin_path'
        10: from /usr/lib64/ruby/2.5.0/rubygems.rb:309:in `synchronize'
         9: from /usr/lib64/ruby/2.5.0/rubygems.rb:310:in `block in activate_bin_path'
         8: from /usr/lib64/ruby/2.5.0/rubygems/specification.rb:1440:in `activate'
         7: from /usr/lib64/ruby/2.5.0/rubygems/specification.rb:1458:in `activate_dependencies'
         6: from /usr/lib64/ruby/2.5.0/rubygems/specification.rb:1458:in `each'
         5: from /usr/lib64/ruby/2.5.0/rubygems/specification.rb:1472:in `block in activate_dependencies'
         4: from /usr/lib64/ruby/2.5.0/rubygems/specification.rb:1440:in `activate'
         3: from /usr/lib64/ruby/2.5.0/rubygems/specification.rb:1458:in `activate_dependencies'
         2: from /usr/lib64/ruby/2.5.0/rubygems/specification.rb:1458:in `each'
         1: from /usr/lib64/ruby/2.5.0/rubygems/specification.rb:1469:in `block in activate_dependencies'
/usr/lib64/ruby/2.5.0/rubygems/dependency.rb:312:in `to_specs': **Could not find 'tzinfo' (~> 1.1) - did find: **
[tzinfo-2.0.0] (**Gem::MissingSpecVersionError****)**
**Checked in 'GEM_PATH=/home/alex/.gem/ruby/2.5.0:/usr/lib64/ruby/gems/2.5.0', execute `gem env` for more infor**
mation


You could just go with the flow — give Rails what it says is missing:

gem install tzinfo -v 1.1

… and try »rails s« again. Rinse. Repeat.

(If your user »alex« doesn’t have sufficient privileges to install it, do it as root: »sudo gem install…«)

Thank you, this solved the problem.
But strange.
Why is this package not a dependency now?
Absurd.
A long time ago, Linux demanded to manually install dependencies. A very long time ago it was.
Is this time coming back?
:stuck_out_tongue:

Glad Rails is chooching again! :slight_smile:

A long time ago, Linux demanded to manually install dependencies. A very long time ago it was.
Is this time coming back?

I don’t think so, but sometimes I wish it would come back because some dependencies I find far too encompassing. For example, I have a udisks-free system, except for the odd old KDE4 program that has udisks as a dependency; same think with VLC: why does a video player need Samba as a dependency? Oftentimes, I just ignore the dependency and risk a little inconsistency for non-critical stuff. (Rails and KDE/Plasma5 aside, I am a fan of minimalism, and I don’t want unnecessary executable code to linger around. I’d like to have my KDE base system without file indexer, Android connector, PIM, password manager and on and on…)

As to tzinfo — either it is a packaging error (YaST/zypper being satisfied with tzinfo-2 but the actual Ruby gems being dependent on tzinfo-1), or your existing rails app »test2« explicitly demanding tzinfo-1.1 (via Bundler maybe?).

Maybe you want to do some post-hoc forensic research into what packages came in which order onto your system, using …

sudo zypper-log

… and/or …

rpm -qa --changelog | less

By the way, is you initial zypper problem resolved as well? (»LC_ALL=C sudo zypper dup«)
Cheers!

Yes. Thank you.

I don’t think so.
For example. This is my Class .
Probably you will tell me how to remove Traceback from the console? When I worked on Fedora, it (oh, ****ing limits on Twitter!) was not:

----------
adding friend to an array: seodroplet
adding friend to an array: seoforpeople
adding friend to an array: tolpek
follow: KanatYes 2019-01-27 10:19:55 +0300
follow: VoicemailSanta 2019-01-27 10:20:32 +0300
follow: e_jincharadze 2019-01-27 10:21:30 +0300
follow: ksegaksega 2019-01-27 10:22:03 +0300
#<Thread:0x00007f97b5bed0d0@/mnt/a/Rails/test2/vendor/bundle/ruby/2.5.0/gems/twitter-6.2.0/lib/twitter/rest/friends_and_followers.rb:108 run> terminated with exception (report_on_exception is true):
**Traceback** (most recent call last):
        7: from /mnt/a/Rails/test2/vendor/bundle/ruby/2.5.0/gems/twitter-6.2.0/lib/twitter/rest/friends_and_followers.rb:109:in `block in follow'
        6: from /mnt/a/Rails/test2/vendor/bundle/ruby/2.5.0/gems/twitter-6.2.0/lib/twitter/rest/friends_and_followers.rb:30:in `friend_ids'
        5: from /mnt/a/Rails/test2/vendor/bundle/ruby/2.5.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:162:in `cursor_from_response_with_user'
        4: from /mnt/a/Rails/test2/vendor/bundle/ruby/2.5.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:107:in `perform_get_with_cursor'
        3: from /mnt/a/Rails/test2/vendor/bundle/ruby/2.5.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:107:in `new'
        2: from /mnt/a/Rails/test2/vendor/bundle/ruby/2.5.0/gems/twitter-6.2.0/lib/twitter/cursor.rb:28:in `initialize'
        1: from /mnt/a/Rails/test2/vendor/bundle/ruby/2.5.0/gems/twitter-6.2.0/lib/twitter/rest/request.rb:39:in `perform'
/mnt/a/Rails/test2/vendor/bundle/ruby/2.5.0/gems/twitter-6.2.0/lib/twitter/rest/request.rb:81:in `fail_or_return_response_body': Rate limit exceeded (Twitter::Error::TooManyRequests)
rescue Twitter::Error 2019-01-27 10:22:49 +0300
follow: EvroAzia 2019-01-27 10:38:14 +0300
follow: hhh258022 2019-01-27 10:39:19 +0300
follow: 9b133b91d452457 2019-01-27 10:40:04 +0300
follow: guzelushka30 2019-01-27 10:40:59 +0300
follow: ivandanilov 2019-01-27 10:42:03 +0300
#<Thread:0x00007f97b562e400@/mnt/a/Rails/test2/vendor/bundle/ruby/2.5.0/gems/twitter-6.2.0/lib/twitter/rest/friends_and_followers.rb:108 run> terminated with exception (report_on_exception is true):
**Traceback** (most recent call last):
----------

Probably you will tell me how to remove Traceback from the console?

I prefer to read tracebacks, just to get an occasional insight into the complexity of code involved. I’m weird that way. :slight_smile:

Some comment on your solution…

Keep in mind that by installing using the gem command, you installed a package from the official Ruby repos, and not the openSUSE OSS. Do not forget this if you run into another possibly related problem in the future.

The other solution I might have recommended (IMO no need to do this if you have a working solution now) is to install the latest package from the OSS, I’m not sure why the package wasn’t proposed during your installation… The latest is version 2.0 and apparently was added to the OSS about 13 days ago.

https://software.opensuse.org/package/rubygem-tzinfo

Another thing to consider if you’re Developing is a version manager, that way you can develop to different Ruby versions on the same machine… Your choices are rbenv (which I recommend) and rvm(probably most used). You’ll find posts on rbenv in this and the Developer forums.

TSU

I tried to install this package.
Manually.
Package is not installed in dependencies.
Strange, this package does not solve the problem: ‘Could not find ‘tzinfo’ (~> 1.1) - did find’, etc

Mixed up threads and the system won’t let me delete this post, only re-edit.
Disregard

TSU

It can get really messy in hurry, and I’ve been there:

  • openSUSE’s RPM-based Rubygems, installed under /usr/lib64/ruby/gems/2.5.0/gems/
  • gems I installed without YaST/zypper knowing, also in /usr/lib64/ruby/gems/2.5.0/gems/, possible two or eight versions of those gems too :\
  • gems I installed not as root, but as an unprivileged user, installed in /home/$USER/.gem/ruby/2.5.0/gems/
  • RubyMine gems in /home/$USER/code/rubymine/rb/gems
    and again /home/$USER/.gem (RubyMine can be nice for comfortable debugging sessions) - If rbenv or rvm is used, you have other Ruby interpreters (maybe 2.3 and 2.6), and suddenly more gems installed in even more locations: /usr/lib64/ruby/gems**/2.3.0/**
    gems/, /home/$USER/.gem/ruby**/2.6.0/**gems/ and on and on…

It may be part and parcel of the life of a developer, and as long as there’s no communication between system-side package managers like RPM/apt/brew/emerge etc with language-specific gem/cpan/PIP/Cargo etc (see https://en.wikipedia.org/wiki/List_of_software_package_management_systems for extensive lists of those), the »fun« will go on. Such is life, it seems.

I agree with tsu2 here, of course: if possible, stick to openSUSE packages and have the dependencies resolved with zypper and YaST2 as long as possible.

cat /usr/lib/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20190209"

Well, I don’t know what to do. This is fu*kin 'garbage, I have no other words … the update has removed the ruby-on-rails and can not be reinstalled. Developers of Tumbleweed unable to ensure the normal operation of their distribution? I’m surprised and I have no words…