Page MenuHomeSolus

lolcat ruby error (ruby-paint not found)
Closed, ResolvedPublic


Something wrong with most important app called lolcat and maybe with ruby in general.

How to reproduce:

install lolcat and it's dependencies
run lolcat
get error

Traceback (most recent call last):
	8: from /usr/bin/lolcat:23:in `<main>'
	7: from /usr/lib64/ruby/2.6.0/rubygems.rb:303:in `activate_bin_path'
	6: from /usr/lib64/ruby/2.6.0/rubygems.rb:303:in `synchronize'
	5: from /usr/lib64/ruby/2.6.0/rubygems.rb:304:in `block in activate_bin_path'
	4: from /usr/lib64/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
	3: from /usr/lib64/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
	2: from /usr/lib64/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
	1: from /usr/lib64/ruby/2.6.0/rubygems/specification.rb:1449:in `block in activate_dependencies'
/usr/lib64/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'paint' (~> 2.0.0) - did find: [paint-2.1.0] (Gem::MissingSpecVersionError)
Checked in 'GEM_PATH=/home/username/.gem/ruby/2.6.0:/usr/lib64/ruby/gems/2.6.0', execute `gem env` for more information

running gem env says this:

RubyGems Environment:
  - RUBY VERSION: 2.6.0 (2018-12-25 patchlevel 0) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib64/ruby/gems/2.6.0
  - USER INSTALLATION DIRECTORY: /home/username/.gem/ruby/2.6.0
  - RUBY EXECUTABLE: /usr/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - SPEC CACHE DIRECTORY: /home/username/.gem/specs
    - ruby
    - x86_64-linux
     - /usr/lib64/ruby/gems/2.6.0
     - /home/username/.gem/ruby/2.6.0
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - /sbin
     - /bin
     - /usr/sbin
     - /usr/bin
     - /snap/bin

Installation is fairly new from Solus 4 iso (haven't messed with anything critical) and system is up-to-date. I ran eopkg rdb && eopkg up but that didn't do anything.

I don't know much about ruby, paths or anything at all but i noticed that maybe folder structure/path is somehow messed up because gem env and running lolcat tries to find gems from /usr/lib64/ruby/gems/2.6.0 but in that folder there is new folder called gems where i can see folders paint-2.1.0 etc, so it's /usr/lib64/ruby/gems/2.6.0/gems/paint-2.1.0. One gems folder too much?

Event Timeline

aalhitennf updated the task description. (Show Details)Mar 29 2019, 10:51 AM
aalhitennf edited projects, added Software; removed Lacks Project.
aalhitennf updated the task description. (Show Details)Mar 29 2019, 10:56 AM

Ruby-paint installed?

Harvey added a subscriber: Harvey.EditedMar 29 2019, 11:46 AM

sed -i 's/~> 2.0.0/~> 2.1.0/' $installdir/usr/lib64/ruby/gems/2.6.0/specifications/lolcat-99.9.21.gemspec

Now I get another error:
/usr/lib64/ruby/2.6.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'optimist' (~> 3.0.0) among 46 total gem(s) (Gem::MissingSpecError)

Related: D5755 D5756

aalhitennf added a comment.EditedMar 29 2019, 11:46 AM

Ruby-paint installed?

Yes, it gets installed automatically as a dependency.

I made an issue to lolcat project on GitHub about it. Lolcat works just fine when it is installed using gem command.
See issue here

Girtablulu triaged this task as Normal priority.Mar 29 2019, 10:12 PM
Girtablulu moved this task from Backlog to Package Fixes on the Software board.

figured out the issue, somehow the update to paint 2.1.0 brakes lolcat for us, when reverted it gets fixed

Could not find 'paint' (~> 2.0.0) - did find: [paint-2.1.0]

The ~ has an explicit meaning in locking to particular version or branch which I don't know exactly how it works.. Maybe 2.0.3 would work (or perhaps it would need to be [~> 2.0] for it to work), but 2.1 or higher definitely wouldn't meet the requirement.