Bug 851376

Summary: Yast does not work after installing ruby < 2.x
Product: [openSUSE] openSUSE 12.3 Reporter: Forgotten User CxVz4LpaB5 <forgotten_CxVz4LpaB5>
Component: YaST2Assignee: Josef Reidinger <jreidinger>
Status: RESOLVED INVALID QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: locilka
Version: Final   
Target Milestone: ---   
Hardware: 64bit   
OS: openSUSE 13.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User CxVz4LpaB5 2013-11-20 16:30:23 UTC
User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20100101 Firefox/25.0

Hi,
I have upgraded my 12.3 opensuse version to the 13.1 and yast was working at that point. I have installed prior the upgrade snorby which require ruby 1.9.x.
Now that yast works with ruby 2 pre-installed, I had to install ruby 1.9.3. I have used this method:
https://www.ruby-lang.org/fr/downloads/

I have went through the process of installing and configuring snorby again but I made it works.
But now, yast does not work anymore. The only thing I see in the /var/log/YaST2/y2log log file is:

2013-11-20 11:05:34 <1> server(5865) [liby2] genericfrontend.cc(main):575 Launched YaST2 component 'y2base' 'menu' 'ncurses'
2013-11-20 11:05:34 <1> server(5865) [ui-component] YUIComponentCreator.cc(createInternal):124 Creating UI component for ""
2013-11-20 11:05:34 <1> server(5865) [liby2] genericfrontend.cc(main):764 YAST_IS_RUNNING is yes
2013-11-20 11:05:36 <3> server(5865) [Y2Ruby] binary/YRuby.cc(callClient):238 cannot require yast:cannot load such file -- fast_gettext at /usr/lib64/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
2013-11-20 11:05:36 <1> server(5865) [liby2] genericfrontend.cc(main):778 Finished YaST2 component 'y2base'
2013-11-20 11:05:36 <1> server(5865) [liby2] genericfrontend.cc(main):783 Exiting with client return value 'false'
2013-11-20 11:07:14 <1> server(6079) [liby2] genericfrontend.cc(main):575 Launched YaST2 component 'y2base' 'menu' 'ncurses'
2013-11-20 11:07:14 <1> server(6079) [ui-component] YUIComponentCreator.cc(createInternal):124 Creating UI component for ""
2013-11-20 11:07:14 <1> server(6079) [liby2] genericfrontend.cc(main):764 YAST_IS_RUNNING is yes
2013-11-20 11:07:14 <3> server(6079) [Y2Ruby] binary/YRuby.cc(callClient):238 cannot require yast:cannot load such file -- fast_gettext at /usr/lib64/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
2013-11-20 11:07:14 <1> server(6079) [liby2] genericfrontend.cc(main):778 Finished YaST2 component 'y2base'
2013-11-20 11:07:14 <1> server(6079) [liby2] genericfrontend.cc(main):783 Exiting with client return value 'false'

I don't know what exactly is not working here. 
Maybe I have broke something with my ruby 1.9.3 installation...


Reproducible: Always

Steps to Reproduce:
1. Upgrade 12.3 with snorby installed and ruby 1.9.x to opensuse 13.1
2. Install ruby 1.9.3 using https://www.ruby-lang.org/fr/downloads/
3. Setup snorby then yast no longer works
Actual Results:  
Yast sinply return to the shell, no error on the console

Expected Results:  
yast should open
Comment 1 Lukas Ocilka 2013-11-22 16:07:52 UTC
Josef, please, have a look... insufficient hard-dependencies for Yast or
user error breaking their system too much?

If you don't speak French, use https://www.ruby-lang.org/en/downloads/

Romain: I suggest you to install both Ruby versions from RPM at once:

    Packages `ruby20` and `ruby19`

Search for `ruby` and you will see...
Comment 2 Lukas Ocilka 2013-11-22 16:09:07 UTC
Right now, I have these two packages installed at once:

  * ruby19-1.9.3.p448-2.1.3.x86_64
  * ruby20-2.0.0.p247-3.2.1.x86_64
Comment 3 Lukas Ocilka 2013-11-22 16:09:40 UTC
Please try as suggested above (NEEDINFO for now)
Comment 4 Josef Reidinger 2013-11-25 08:38:23 UTC
maybe related pull request that can help https://github.com/yast/yast-yast2/pull/155 . Yast need same major version of ruby as one to which it is compiled. I am not sure how manual install can break various linking to libraries.
Comment 5 Forgotten User CxVz4LpaB5 2013-11-26 19:26:29 UTC
(In reply to comment #4)
> maybe related pull request that can help
> https://github.com/yast/yast-yast2/pull/155 . Yast need same major version of
> ruby as one to which it is compiled. I am not sure how manual install can break
> various linking to libraries.

Thanks for the information. I see in the comments on the github link that some code will be pushed into to factory but I guess it will not be updated in 13.1.

Well, with 1.9 and 2 from the official rpm packages of opensuse, things work as expect for yast. Is there a way to switch from one ruby environment from the other so snorby will compile/install with the 1.9 opensuse version?
Right now, if 1.9 and 2 (officials) are installed, snorby only detect the 2.

I will post also something on snorby forum to know what could be done.

Thanks
Comment 6 Josef Reidinger 2013-11-27 07:10:45 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > maybe related pull request that can help
> > https://github.com/yast/yast-yast2/pull/155 . Yast need same major version of
> > ruby as one to which it is compiled. I am not sure how manual install can break
> > various linking to libraries.
> 
> Thanks for the information. I see in the comments on the github link that some
> code will be pushed into to factory but I guess it will not be updated in 13.1.
> 
> Well, with 1.9 and 2 from the official rpm packages of opensuse, things work as
> expect for yast. Is there a way to switch from one ruby environment from the
> other so snorby will compile/install with the 1.9 opensuse version?
> Right now, if 1.9 and 2 (officials) are installed, snorby only detect the 2.
> 
> I will post also something on snorby forum to know what could be done.
> 
> Thanks

I recommend to ask on opensuse-ruby mailing list (http://lists.opensuse.org/opensuse-ruby/), maybe some ENV variables that set ruby paths can help. or update-alternative maybe work, it depends how ruby packages are created.

Clossing this as invalid as yast doesn't support using mix of official and unofficial ruby.

Thanks for your report