[opensuse] Proper way to install ruby gems in leap?
Hello, what is the proper way to install ruby gems in opensuse leap? I see there are lots of gems installable as rpm packages. I guess, those should be installed via zypper instead of gem? then, there is the gem program to install from rubygem.org. Should this one be run as root or as user? Google reveals lots of problems with this tool both ways. Then, there exists ruby-bundler. How do this one fit into the picture? Any help? -- Josef Wolf jw@raven.inka.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 29 Aug 2018 16:14:41 +0200
Josef Wolf
what is the proper way to install ruby gems in opensuse leap?
I don't know, but I was interested to take a look, but that has left me even more confused.
I see there are lots of gems installable as rpm packages. I guess, those should be installed via zypper instead of gem?
I would suppose so. I seem to have quite a few installed although I haven't installed any explicitly. But trying to explore tham as documented at https://guides.rubygems.org/rubygems-basics/ and https://guides.rubygems.org/what-is-a-gem/ doesn't seem to work. I can see what are instaled: $ gem list *** LOCAL GEMS *** abstract_method (1.2.1) bigdecimal (default: 1.3.4) cfa (0.6.4) cfa_grub2 (0.6.5) cheetah (0.5.0) cmath (default: 1.0.0) csv (default: 1.0.0) date (default: 1.0.0) dbm (default: 1.0.0) did_you_mean (1.2.0) etc (default: 1.0.0) fast_gettext (1.6.0) fcntl (default: 1.0.0) fiddle (default: 1.0.0) fileutils (default: 1.0.2) gdbm (default: 2.0.0) gem2rpm (0.10.1) io-console (default: 0.4.6) ipaddr (default: 1.2.0) json (default: 2.1.0) minitest (5.10.3) net-telnet (0.1.1) openssl (default: 2.1.0) power_assert (1.1.1) psych (default: 3.0.2) rake (12.3.0) rdoc (default: 6.0.1) ruby-augeas (0.5.0) ruby-dbus (0.14.0) scanf (default: 1.0.0) sdbm (default: 1.0.0) simpleidn (0.0.9) stringio (default: 0.0.1) strscan (default: 1.0.0) test-unit (3.2.7) webrick (default: 1.4.2) xmlrpc (0.3.0) zlib (default: 1.0.0) but I can't find anything more about them: (even after installing the -doc package in YaST) $ ri cheetah Nothing known about .cheetah $ tree cheetah cheetah [error opening dir] 0 directories, 0 files and from http://localhost:8808/doc_root/cheetah-0.5.0/ Error While processing http://localhost:8808/doc_root/cheetah-0.5.0/ the RDoc (6.0.1) server has encountered a NoMethodError exception: undefined method `path=' for #WEBrick::HTTPRequest:0x00007fed7024e450 Did you mean? path Please report this to the RDoc issues tracker. Please include the RDoc version, the URI above and exception class, message and backtrace. If you're viewing a gem's documentation, include the gem name and version. If you're viewing Ruby's documentation, include the version of ruby. Backtrace: /usr/lib64/ruby/2.5.0/rdoc/servlet.rb:114:in `do_GET' /usr/lib64/ruby/2.5.0/webrick/httpservlet/abstract.rb:105:in `service' /usr/lib64/ruby/2.5.0/webrick/httpserver.rb:140:in `service' /usr/lib64/ruby/2.5.0/webrick/httpserver.rb:96:in `run' /usr/lib64/ruby/2.5.0/webrick/server.rb:307:in `block in start_thread' So it seems there is something broken, and something non-standard about the way openSUSE packages gems.
then, there is the gem program to install from rubygem.org. Should this one be run as root or as user? Google reveals lots of problems with this tool both ways.
The ruby docs show a $ prompt, which suggests installation by an ordinary user. But YaST installations are system-wide. My $LOAD_PATH is entirely branches below /usr/lib64/ruby/.
Then, there exists ruby-bundler. How do this one fit into the picture?
Any help?
Sorry. More questions! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, Aug 29, 2018 at 04:55:22PM +0100, Dave Howorth wrote:
On Wed, 29 Aug 2018 16:14:41 +0200 Josef Wolf
wrote: what is the proper way to install ruby gems in opensuse leap?
I don't know, but I was interested to take a look, but that has left me even more confused.
Yes. Searching the internet reveals that people do many try+error on this topic, breaking things while they do that. Similar problems are with perl, python, emacs, lisp and other languages which provide own mechanisms to distribute their packages.
I see there are lots of gems installable as rpm packages. I guess, those should be installed via zypper instead of gem?
I would suppose so. I seem to have quite a few installed although I haven't installed any explicitly. But trying to explore tham as documented at https://guides.rubygems.org/rubygems-basics/ and https://guides.rubygems.org/what-is-a-gem/ doesn't seem to work.
[ ... ]
So it seems there is something broken, and something non-standard about the way openSUSE packages gems.
First problem is, they don't seem to be installed properly. What's the point of providing a zypper-installable package in the official repositories if it won't be installed properly? Second problem is: those packages in the opensuse repositories tend to be outdated, and many packages are missing. If you install additional packages with the gem tool, you get a mixture of outdated packages from suse repositories and up-to-date packages for the gem repositories. I'd not expect such a mixture to result in a very stable system. So it seems to be the best to wipe all zypper-installed gems and install all of them via gem tool?
then, there is the gem program to install from rubygem.org. Should this one be run as root or as user? Google reveals lots of problems with this tool both ways.
The ruby docs show a $ prompt, which suggests installation by an ordinary user.
So every user needs to install them? And how would one handle gems which are to be used for system maintanance?
Any help?
Sorry. More questions!
Yeah. Still looking for help... -- Josef Wolf jw@raven.inka.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 30 Aug 2018 11:12:56 +0200
Josef Wolf
Similar problems are with perl, python, emacs, lisp and other languages which provide own mechanisms to distribute their packages.
I take issues with the "Similar problems are with perl" part. It manages distinctions between packages installed by the system (zypper et al) and packages installed from CPAN automatically. The package mechanism allows for version dependencies to be dealt with automatically for instance, so a new version from CPAN coexists with the old version used by system utilities quite happily, for example. And you can happily install as many different versions of perl itself as you want, all with consistent libraries, and swap between them as you wish.
So every user needs to install them? And how would one handle gems which are to be used for system maintanance?
Any help?
Sorry. More questions!
Yeah. Still looking for help...
Indeed. It certainly doesn't seem to be as well documented as perl. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Dave Howorth
-
Josef Wolf