Hi;
Tell me how to install Rails? The instructions of this page do not work:
~> LC_ALL=C sudo zypper in rubygem-rails-2_3
Loading repository data...
Reading installed packages...
'rubygem-rails-2_3' not found in package names. Trying capabilities.
No provider of 'rubygem-rails-2_3' found.
Resolving package dependencies...
Nothing to do.
~> LC_ALL=C sudo zypper in rubygem-rails*
Loading repository data...
Reading installed packages...
'rubygem-rails*' not found in package names. Trying capabilities.
No provider of 'rubygem-rails*' found.
Resolving package dependencies...
Nothing to do.
The package in Leap-42.3 OSS repository is called
** ruby2.1-rubygem-rails**
There are a few related packages. I recommend using YaST > Software Manager and searching fo “rubygem” or “rails”.
If, like me, you are accessing a remote headless machine you can still use the “yast” command for the text (ncurses) interface to YaST2.
Problem: nothing provides rubygem(ruby:2.4.0:activemodel) = 5.1.6 needed by ruby2.4-rubygem-rails-5_1-5.1.6
-8.1.x86_64
Solution 1: do not install ruby2.4-rubygem-rails-5_1-5.1.6-8.1.x86_64
Solution 2: break ruby2.4-rubygem-rails-5_1-5.1.6-8.1.x86_64 by ignoring some of its dependencies
Choose from above solutions by number or cancel [1/2/c] (c): c
*~> LC_ALL=C zypper repos
Repository priorities are without effect. All enabled repositories share the same priority.
You do not seem to be using the standard Leap-42.3 repositories, which contain everything needed to install Ruby Rails.
If you are going to paste shell commands and output plese use the Code tags (#) and show URLs of the repositories you are using.
E.g. (including recommends)
sysman@ns3:~> zypper lr -Ed
Repository priorities are without effect. All enabled repositories share the same priority.
# | Alias | Name | Enabled | GPG Check | Refresh | Priority | Type | URI | Service
---+---------------------+---------------------+---------+-----------+---------+----------+--------+----------------------------------------------------------------------------------------------------------------+--------
7 | 42.3-Packman | 42.3-Packman | Yes | (r ) Yes | Yes | 99 | rpm-md | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_42.3/ |
8 | 42.3-Repo-oss | 42.3-Repo-oss | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/distribution/leap/42.3/repo/oss/ |
9 | 42.3-Update-non-oss | 42.3-Update-non-oss | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/leap/42.3/non-oss |
10 | 42.3-Update-oss | 42.3-Update-oss | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/leap/42.3/oss |
sysman@ns3:~>
sysman@ns3:~> sudo zypper in ruby2.1-rubygem-rails-4_2
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 58 NEW packages are going to be installed:
nodejs-common nodejs6 nodejs6-devel npm6 ruby2.1-rubygem-actionmailer-4_2
ruby2.1-rubygem-actionpack-4_2 ruby2.1-rubygem-actionview-4_2
ruby2.1-rubygem-activejob-4_2 ruby2.1-rubygem-activemodel-4_2
ruby2.1-rubygem-activerecord-4_2 ruby2.1-rubygem-activesupport-4_2
ruby2.1-rubygem-arel ruby2.1-rubygem-bcrypt ruby2.1-rubygem-binding_of_caller
ruby2.1-rubygem-builder ruby2.1-rubygem-bundler ruby2.1-rubygem-byebug
ruby2.1-rubygem-coffee-rails ruby2.1-rubygem-coffee-script
ruby2.1-rubygem-coffee-script-source ruby2.1-rubygem-debug_inspector
ruby2.1-rubygem-erubis ruby2.1-rubygem-execjs ruby2.1-rubygem-globalid
ruby2.1-rubygem-i18n ruby2.1-rubygem-jbuilder ruby2.1-rubygem-jquery-rails
ruby2.1-rubygem-kgio ruby2.1-rubygem-loofah ruby2.1-rubygem-mail
ruby2.1-rubygem-mime-types ruby2.1-rubygem-mini_portile ruby2.1-rubygem-minitest
ruby2.1-rubygem-multi_json ruby2.1-rubygem-nokogiri ruby2.1-rubygem-rack
ruby2.1-rubygem-rack-test-0_6 ruby2.1-rubygem-rails-4_2
ruby2.1-rubygem-rails-deprecated_sanitizer ruby2.1-rubygem-rails-dom-testing
ruby2.1-rubygem-rails-html-sanitizer ruby2.1-rubygem-railties-4_2
ruby2.1-rubygem-raindrops ruby2.1-rubygem-sass ruby2.1-rubygem-sass-rails
ruby2.1-rubygem-sdoc ruby2.1-rubygem-spring ruby2.1-rubygem-sprockets
ruby2.1-rubygem-sprockets-rails ruby2.1-rubygem-sqlite3 ruby2.1-rubygem-thor
ruby2.1-rubygem-thread_safe ruby2.1-rubygem-tilt ruby2.1-rubygem-turbolinks
ruby2.1-rubygem-tzinfo ruby2.1-rubygem-uglifier ruby2.1-rubygem-unicorn
ruby2.1-rubygem-web-console-2
The following 16 recommended packages were automatically selected:
nodejs6 npm6 ruby2.1-rubygem-bcrypt ruby2.1-rubygem-byebug
ruby2.1-rubygem-coffee-rails ruby2.1-rubygem-coffee-script-source
ruby2.1-rubygem-jbuilder ruby2.1-rubygem-jquery-rails ruby2.1-rubygem-sass-rails
ruby2.1-rubygem-sdoc ruby2.1-rubygem-spring ruby2.1-rubygem-sqlite3
ruby2.1-rubygem-turbolinks ruby2.1-rubygem-uglifier ruby2.1-rubygem-unicorn
ruby2.1-rubygem-web-console-2
58 new packages to install.
Overall download size: 26.1 MiB. Already cached: 0 B. After the operation,
additional 60.5 MiB will be used.
Continue? [y/n/...? shows all options] (y):
I’m sorry … I really do not understand… An installation rails for Fedora 27 takes 1.5 minutes. How can I achieve a similar result for Leap 42.3?
~> zypper se rails
-------
| ruby2.4-rubygem-rails-5_1 | Full-stack web application framework | package
| rubygem-rails-5_1 | Full-stack web application framework | srcpackage
-------
~> LC_ALL=C sudo zypper in ruby2.4-rubygem-rails-5_1
Loading repository data...
Reading installed packages...
Resolving package dependencies...
Problem: nothing provides rubygem(ruby:2.4.0:activemodel) = 5.1.6 needed by ruby2.4-rubygem-rails-5_1-5.1.6-8.1.x86_64
Solution 1: do not install ruby2.4-rubygem-rails-5_1-5.1.6-8.1.x86_64
Solution 2: break ruby2.4-rubygem-rails-5_1-5.1.6-8.1.x86_64 by ignoring some of its dependencies
**Choose from above solutions by number or cancel [1/2/c] (c): **c
~> LC_ALL=C sudo zypper in rubygem-rails-5_1
Loading repository data...
Reading installed packages...
'rubygem-rails-5_1' not found in package names. Trying capabilities.
No provider of 'rubygem-rails-5_1' found.
Resolving package dependencies...
Nothing to do.
If you ultimately decide that what you need might not be in the openSUSE repos,
I’d recommend installing rbenv to install Ruby (and Rails) from the Ruby repos.
When you use rbenv…
You can install any number of Ruby versions side by side and easily specify globally, for each Ruby project directory tree, or the CLI.
Since you have support for all Ruby versions, you have access to everything from experimental to legacy.
If you decide to remove rbenv and all the Ruby you downloaded from the Ruby repos, it’s a simple matter of just deleting the rbenv directory and its contents.
The original install instructions I wrote for openSUSE sets up so that rbenv and its Rubies are available to all Users on the machine. The later install instructions that were added to the official rbenv documentation will install only for the specified logged in User. Either procedure should work fine, but I highly recommend you start with the page I wrote to get an introduction, then choose your install procedure.
In fact, the documentation for rbenv which was originally very good is today really excellent (and some may know I don’t throw around that compliment everywhere). You may want to skim the following before deciding whether to go in this direction.
At the end of my Wiki page, you’ll find two links that direct the User on two possible paths after installing Ruby using rbenv, one is to Laura Scott’s excellent page on setting up Rails, and the other to another of my published pages how to set up a javascript framework like Jekyll on Github.
Installing and managing Ruby with rbenv is my personal preference so that
If I’m managing a team of Developers on a project and each person is running a different distro, I can guarantee an identical Project setup on everyone’s machine.
If I’m working on projects which don’t use the same version Ruby, I can support them all simultaneously on my machine.
Now that pyenv exists, you can manage multiple python on your system using the exact same commands
So, in the end it might not be the fastest to install but is the most versatile and is rock solid.
You’ll need to add the devel:languages:ruby:extensions repo.
There is a one-click install on the following page (click on experimental, then the repo I specified, not the others)
I can confirm that the Rails packages in the “extensions” repository are broken, althogh the docs and test-suites may be ok. I would disable or remove that repository.
I tried the packages from Tumbleweed on Leap-42.3 and it seems to install.
This is currently ruby2.5-rubygem-rails-5_1.
If you keep the TW repository enabled you will have to be careful about 42.3 updates/patches.
sysman@ns3:~> sudo zypper ar -f http://download.opensuse.org/tumbleweed/repo/oss/ Tumbleweed
Adding repository 'Tumbleweed' ...............................................[done]
Repository 'Tumbleweed' successfully added
URI : http://download.opensuse.org/tumbleweed/repo/oss/
Enabled : Yes
GPG Check : Yes
Autorefresh : Yes
Priority : 99 (default priority)
Repository priorities are without effect. All enabled repositories share the same priority.
sysman@ns3:~>
sysman@ns3:~> sudo zypper in ruby2.5-rubygem-rails-5_1
Retrieving repository 'Tumbleweed' metadata ..................................[done]
Building repository 'Tumbleweed' cache .......................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 80 NEW packages are going to be installed:
libffi7 libicu60_2 libicu60_2-ledata libnsl2-32bit libnss_nis2 libnss_nis2-32bit
libopenssl1_1 libreadline7 libruby2_5-2_5 libtirpc3-32bit nodejs-common nodejs8
nodejs8-devel npm8 rpcgen ruby2.1-rubygem-bcrypt ruby2.1-rubygem-byebug ruby2.5
ruby2.5-rubygem-actioncable-5_1 ruby2.5-rubygem-actionmailer-5_1
ruby2.5-rubygem-actionpack-5_1 ruby2.5-rubygem-actionview-5_1
ruby2.5-rubygem-activejob-5_1 ruby2.5-rubygem-activemodel-5_1
ruby2.5-rubygem-activerecord-5_1 ruby2.5-rubygem-activesupport-5_1
ruby2.5-rubygem-arel-8 ruby2.5-rubygem-bindex ruby2.5-rubygem-builder
ruby2.5-rubygem-bundler ruby2.5-rubygem-coffee-rails ruby2.5-rubygem-coffee-script
ruby2.5-rubygem-coffee-script-source ruby2.5-rubygem-concurrent-ruby
ruby2.5-rubygem-crass ruby2.5-rubygem-erubi ruby2.5-rubygem-execjs
ruby2.5-rubygem-ffi ruby2.5-rubygem-globalid ruby2.5-rubygem-i18n-0_9
ruby2.5-rubygem-jbuilder ruby2.5-rubygem-jquery-rails ruby2.5-rubygem-listen-3_0
ruby2.5-rubygem-loofah ruby2.5-rubygem-mail ruby2.5-rubygem-method_source
ruby2.5-rubygem-mini_mime ruby2.5-rubygem-mini_portile2 ruby2.5-rubygem-multi_json
ruby2.5-rubygem-nio4r ruby2.5-rubygem-nokogiri ruby2.5-rubygem-puma
ruby2.5-rubygem-rack ruby2.5-rubygem-rack-test-0_6 ruby2.5-rubygem-rails-5_1
ruby2.5-rubygem-rails-dom-testing ruby2.5-rubygem-rails-html-sanitizer
ruby2.5-rubygem-railties-5_1 ruby2.5-rubygem-rb-fsevent ruby2.5-rubygem-rb-inotify
ruby2.5-rubygem-sass ruby2.5-rubygem-sass-listen ruby2.5-rubygem-sass-rails
ruby2.5-rubygem-sdoc ruby2.5-rubygem-spring ruby2.5-rubygem-spring-watcher-listen
ruby2.5-rubygem-sprockets ruby2.5-rubygem-sprockets-rails ruby2.5-rubygem-sqlite3
ruby2.5-rubygem-thor ruby2.5-rubygem-thread_safe ruby2.5-rubygem-tilt
ruby2.5-rubygem-turbolinks ruby2.5-rubygem-turbolinks-source
ruby2.5-rubygem-tzinfo ruby2.5-rubygem-uglifier ruby2.5-rubygem-web-console
ruby2.5-rubygem-websocket-driver-0_6 ruby2.5-rubygem-websocket-extensions
ruby2.5-stdlib
The following 6 packages are going to be upgraded:
glibc glibc-devel glibc-extra glibc-locale libncurses6 nscd
The following 18 recommended packages were automatically selected:
nodejs8 npm8 ruby2.1-rubygem-bcrypt ruby2.1-rubygem-byebug
ruby2.5-rubygem-coffee-rails ruby2.5-rubygem-coffee-script-source
ruby2.5-rubygem-jbuilder ruby2.5-rubygem-jquery-rails ruby2.5-rubygem-listen-3_0
ruby2.5-rubygem-puma ruby2.5-rubygem-sass-rails ruby2.5-rubygem-sdoc
ruby2.5-rubygem-spring ruby2.5-rubygem-spring-watcher-listen
ruby2.5-rubygem-sqlite3 ruby2.5-rubygem-turbolinks ruby2.5-rubygem-uglifier
ruby2.5-rubygem-web-console
6 packages to upgrade, 80 new.
Overall download size: 52.9 MiB. Already cached: 175.4 KiB. After the operation,
additional 142.0 MiB will be used.
Continue? [y/n/...? shows all options] (y): n
sysman@ns3:~>
See prior post by rayh.
Curious what the problem might be, but considering Rails is itself a framework the possibilities are great.
If a specific reason exists, then you can use that to qualify other repos… but… if that’s not available…
I only recommended the extensions repo as likely more tested and stable.
If you want to try other 42.3 repos, I’d try the OBS repos before private repos.
Note I am not a ruby programmer and the Leap-42.3 machine is remote. [EDIT] I did not try Ruby-2.3
I only tried installing ruby2.5-rubygem-rails-5_1 from Tumbleweed – I did not try to use it, and promptly removed all the rails stuff and reverting nscd and gcc etc. to the 42.3 versions.
The ruby2.5-rubygem-rails-5_1. install did not worry about ruby-common-2.1-8.3 from 42.3, TW uses ruby-common-2.1-12.1. I have since tried changeinging ruby-common on 42.3 machine to the TW version with no obvious ill effects – YaST and nscd still work.
Hmmmmm… problem. I installed rails and thoroughly tested the project. It worked. But now (after zipper dup) puma has stopped working …
/usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require': libssl.so.44: cannot open shared object file: No such file or directory - /usr/lib64/ruby/gems/2.5.0/gems/puma-3.11.3/lib/puma/puma_http11.so (LoadError)
any ideas?
alex@linux-yz6z:~/rails/test2> rails s
WARNING: Nokogiri was built against LibXML version 2.9.7, but has dynamically loaded 2.9.8
=> Booting Puma
=> Rails 5.1.6 application starting in development
=> Run `rails server -h` for more startup options
Exiting
**Traceback **(most recent call last):
50: from bin/rails:3:in `<main>'
49: from bin/rails:3:in `load'
48: from /home/alex/rails/test2/bin/spring:15:in `<top (required)>'
47: from /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
46: from /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
45: from /usr/lib64/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
44: from /usr/lib64/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
43: from /usr/lib64/ruby/gems/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
42: from /usr/lib64/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
41: from /usr/lib64/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
40: from /usr/lib64/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
39: from /usr/lib64/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
38: from /home/alex/rails/test2/bin/rails:9:in `<top (required)>'
37: from /home/alex/rails/test2/bin/rails:9:in `require'
36: from /usr/lib64/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
35: from /usr/lib64/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command.rb:44:in `invoke'
34: from /usr/lib64/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in `perform'
33: from /usr/lib64/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
32: from /usr/lib64/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
31: from /usr/lib64/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
30: from /usr/lib64/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `perform'
29: from /usr/lib64/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `tap'
28: from /usr/lib64/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:135:in `block in perform'
27: from /usr/lib64/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:44:in `start'
26: from /usr/lib64/ruby/gems/2.5.0/gems/rack-2.0.4/lib/rack/server.rb:297:in `start'
25: from /usr/lib64/ruby/gems/2.5.0/gems/puma-3.11.3/lib/rack/handler/puma.rb:61:in `run'
24: from /usr/lib64/ruby/gems/2.5.0/gems/puma-3.11.3/lib/rack/handler/puma.rb:14:in `config'
23: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
22: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
21: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require'
20: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
19: from /usr/lib64/ruby/gems/2.5.0/gems/puma-3.11.3/lib/puma/launcher.rb:4:in `<top (required)>'
18: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
17: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
16: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require'
15: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
14: from /usr/lib64/ruby/gems/2.5.0/gems/puma-3.11.3/lib/puma/cluster.rb:1:in `<top (required)>'
13: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
12: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
11: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require'
10: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
9: from /usr/lib64/ruby/gems/2.5.0/gems/puma-3.11.3/lib/puma/runner.rb:1:in `<top (required)>'
8: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
7: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
6: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require'
5: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
4: from /usr/lib64/ruby/gems/2.5.0/gems/puma-3.11.3/lib/puma/server.rb:15:in `<top (required)>'
3: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require'
2: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
1: from /usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require'
/usr/lib64/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require': **libssl.so.44: cannot open shared o**
bject file: No such file or directory - /usr/lib64/ruby/gems/2.5.0/gems/puma-3.11.3/lib/puma/puma_http11.so (**LoadError****)**