Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
2
answers
4690
views
unable to access my rails using Public IP of my Ubuntu server in a browser
I have a Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-63-generic x86_64) server and my public IP is something like 183.xx.xxx.xx (curl -4 icanhazip.com).I have started my rails app using the command: rails s -b0.0.0.0 -p3002 and puma server has started successfully => Booting Puma => Rails 5.0.3 application...
I have a Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-63-generic x86_64) server and my public IP is something like 183.xx.xxx.xx (curl -4 icanhazip.com).I have started my rails app using the command:
rails s -b0.0.0.0 -p3002
and puma server has started successfully
=> Booting Puma
=> Rails 5.0.3 application starting in development on http://localhost:3002
=> Run
rails server -h
for more startup options
Puma starting in single mode...
* Version 3.9.1 (ruby 2.4.0-p0), codename: Private Caller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3002
Use Ctrl-C to stop
I tried to access my app in the browser using:
http://183.xx.xxx.xx:3002
I am getting
This site can’t be reached
172.xx.xxx.xx took too long to respond.
ERR_CONNECTION_TIMED_OUT
Any help is highly Appreciate.Thanks in Advance!
**EDIT 1**
**netstat -plnt**
tcp 0 0 0.0.0.0:45109 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3002 0.0.0.0:* LISTEN 25689/0.0.0.0:3002)
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN -
A process is running with a pid 25689
current_user
(81 rep)
Jun 15, 2017, 06:17 AM
• Last activity: Jul 16, 2025, 05:00 PM
4
votes
1
answers
3860
views
Gem install producing "OpenSSL" error
For at least a week now i have been trying to install Bettercap on my Raspberry PI using gem but whenever i type in: sudo gem install bettercap i receive an error message that says ERROR: While executing gem ... (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild ruby (preferred)...
For at least a week now i have been trying to install Bettercap on my Raspberry PI using gem but whenever i type in:
sudo gem install bettercap
i receive an error message that says
ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
Every fix that has been suggested to other people yields no results:
**Option 1: "http option"**
According to the answer by Filippo De Bortoli in this thread on the same issue, disabling the https protocol will solve it. However after running these commands:
gem source -r https://rubygems.org/
gem source -a http://rubygems.org/
I still get this error:
ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
**Option 2: rebuild**
As suggested by Filippo De Bortoli in the same thread he reinstalled ruby after installing OpenSSL, however my raspbian came with OpenSSL and running
sudo apt-get install openssl
only confirms i have the latest version. I have also re-built ruby 3 times since i started getting this.
**Option 3: install locally**
After finding out that you could install the gems locally i installed the source and ran.
sudo gem install --local bettercap-1.6.2b.gem
and got the output:
ERROR: Could not find a valid gem 'em-proxy' (>= 0.1.8, ~> 0.1) in any repository
I am guessing since it is only searching the local disk it can not find the dependencies it needs, so i decided to locally install "em-proxy" only to find it needed dependencies, which also needed dependencies. Great. So i decided to leave it for the sake of my sanity and it was overall impractical.
----------
To wrap up, **how do i get rid of this error or at the very least bypass it?**
Just in case you wanted to know here is the output of gem -v
:
2.4.5
and the output of ruby -v
:
ruby 2.2.2p95 (2015-04-13 revision 50295) [armv6l-linux-eabihf]
aidan
(41 rep)
Jul 29, 2017, 08:37 PM
• Last activity: Jun 19, 2025, 02:06 AM
0
votes
0
answers
37
views
Ruby GEM nokogiri does not build on Rocky 9 Linux due to missing XML libraries even though packages are installed
I have a Rocky 9 host with multiple versions of Ruby installed using rbenv. # rbenv versions * system (set by /usr/local/rbenv/version) 2.4.1 2.7.1 2.7.6 The *system version of Ruby is 3.0.7p220. As part of my deployment of a Ruby (2.4.1) on Rails app, I can see the following errors when attempting...
I have a Rocky 9 host with multiple versions of Ruby installed using rbenv.
# rbenv versions
* system (set by /usr/local/rbenv/version)
2.4.1
2.7.1
2.7.6
The *system version of Ruby is 3.0.7p220.
As part of my deployment of a Ruby (2.4.1) on Rails app, I can see the following errors when attempting to build and install nokogiri defined in a Gemfile:
checking if the C compiler accepts ... no
Building nokogiri using system libraries.
pkg-config could not be used to find libxml-2.0
Please install either
pkg-config
or the pkg-config gem per
gem install pkg-config -v "~> 1.1.7"
pkg-config could not be used to find libxslt
Please install either pkg-config
or the pkg-config gem per
gem install pkg-config -v "~> 1.1.7"
pkg-config could not be used to find libexslt
Please install either pkg-config
or the pkg-config gem per
gem install pkg-config -v "~> 1.1.7"
ERROR: cannot discover where libxml2 is located on your system. please make sure
pkg-config
is installed.
*** extconf.rb failed ***
However, if I run the following, I can see the first 3 libraries are installed.
# pkg-config --exists libxml-2.0 && echo "Package exists" || echo "Package not found"
Package exists
# pkg-config --exists libxslt && echo "Package exists" || echo "Package not found"
Package exists
# pkg-config --exists libexslt && echo "Package exists" || echo "Package not found"
Package exists
pkg-config does seem to find libxml2:
# pkg-config --exists libxml2 && echo "Package exists" || echo "Package not found"
Package not found
The packages already installed are:
# rpm -qa libxml2-devel libxslt-devel libxml2
libxml2-2.9.13-6.el9_5.2.x86_64
libxml2-devel-2.9.13-6.el9_5.2.x86_64
libxslt-devel-1.1.34-9.el9_5.1.x86_64
Any idea what I am missing?
Confounder
(131 rep)
Mar 28, 2025, 05:30 PM
• Last activity: Mar 28, 2025, 11:40 PM
0
votes
1
answers
133
views
Arch linux: gem update
when I try to update my gems on my system using `gem update` I get this error: ``` /usr/lib/ruby/3.3.0/rdoc/version.rb:8: warning: already initialized constant RDoc::VERSION /home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/version.rb:8: warning: previous definition of VERSION was here...
when I try to update my gems on my system using
gem update
I get this error:
/usr/lib/ruby/3.3.0/rdoc/version.rb:8: warning: already initialized constant RDoc::VERSION
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/version.rb:8: warning: previous definition of VERSION was here
/usr/lib/ruby/3.3.0/rdoc.rb:70: warning: already initialized constant RDoc::VISIBILITIES
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:68: warning: previous definition of VISIBILITIES was here
/usr/lib/ruby/3.3.0/rdoc.rb:76: warning: already initialized constant RDoc::DOT_DOC_FILENAME
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:74: warning: previous definition of DOT_DOC_FILENAME was here
/usr/lib/ruby/3.3.0/rdoc.rb:81: warning: already initialized constant RDoc::GENERAL_MODIFIERS
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:79: warning: previous definition of GENERAL_MODIFIERS was here
/usr/lib/ruby/3.3.0/rdoc.rb:86: warning: already initialized constant RDoc::CLASS_MODIFIERS
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:84: warning: previous definition of CLASS_MODIFIERS was here
/usr/lib/ruby/3.3.0/rdoc.rb:91: warning: already initialized constant RDoc::ATTR_MODIFIERS
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:89: warning: previous definition of ATTR_MODIFIERS was here
/usr/lib/ruby/3.3.0/rdoc.rb:96: warning: already initialized constant RDoc::CONSTANT_MODIFIERS
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:94: warning: previous definition of CONSTANT_MODIFIERS was here
/usr/lib/ruby/3.3.0/rdoc.rb:101: warning: already initialized constant RDoc::METHOD_MODIFIERS
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:99: warning: previous definition of METHOD_MODIFIERS was here
Updating installed gems
Updating bundler
Fetching bundler-2.6.3.gem
Successfully installed bundler-2.6.3
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:36: warning: already initialized constant RDoc::RDoc::GENERATORS
/usr/lib/ruby/3.3.0/rdoc/rdoc.rb:36: warning: previous definition of GENERATORS was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:41: warning: already initialized constant RDoc::RDoc::UNCONDITIONALLY_SKIPPED_DIRECTORIES
/usr/lib/ruby/3.3.0/rdoc/rdoc.rb:41: warning: previous definition of UNCONDITIONALLY_SKIPPED_DIRECTORIES was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:46: warning: already initialized constant RDoc::RDoc::TEST_SUITE_DIRECTORY_NAMES
/usr/lib/ruby/3.3.0/rdoc/rdoc.rb:46: warning: previous definition of TEST_SUITE_DIRECTORY_NAMES was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/darkfish.rb:64: warning: already initialized constant RDoc::Generator::Darkfish::BUILTIN_STYLE_ITEMS
/usr/lib/ruby/3.3.0/rdoc/generator/darkfish.rb:64: warning: previous definition of BUILTIN_STYLE_ITEMS was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/darkfish.rb:80: warning: already initialized constant RDoc::Generator::Darkfish::GENERATOR_DIR
/usr/lib/ruby/3.3.0/rdoc/generator/darkfish.rb:80: warning: previous definition of GENERATOR_DIR was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/darkfish.rb:85: warning: already initialized constant RDoc::Generator::Darkfish::VERSION
/usr/lib/ruby/3.3.0/rdoc/generator/darkfish.rb:85: warning: previous definition of VERSION was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/darkfish.rb:90: warning: already initialized constant RDoc::Generator::Darkfish::DESCRIPTION
/usr/lib/ruby/3.3.0/rdoc/generator/darkfish.rb:90: warning: previous definition of DESCRIPTION was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/darkfish.rb:637: warning: already initialized constant RDoc::Generator::Darkfish::SVNID_PATTERN
/usr/lib/ruby/3.3.0/rdoc/generator/darkfish.rb:637: warning: previous definition of SVNID_PATTERN was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/ri.rb:12: warning: already initialized constant RDoc::Generator::RI::DESCRIPTION
/usr/lib/ruby/3.3.0/rdoc/generator/ri.rb:12: warning: previous definition of DESCRIPTION was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/pot.rb:63: warning: already initialized constant RDoc::Generator::POT::DESCRIPTION
/usr/lib/ruby/3.3.0/rdoc/generator/pot.rb:63: warning: previous definition of DESCRIPTION was here
Parsing documentation for bundler-2.6.3
Before reporting this, could you check that the file you're documenting
has proper syntax:
/usr/bin/ruby -c lib/bundler.rb
RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.
The internal error was:
(ArgumentError) wrong number of arguments (given 4, expected 5)
ERROR: While executing gem ... (ArgumentError)
wrong number of arguments (ArgumentError)
/usr/lib/ruby/3.3.0/rdoc/parser.rb:167:in `for'
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:359:in `parse_file'
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:415:in `block in parse_files'
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:413:in `map'
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:413:in `parse_files'
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:202:in `block in generate'
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:201:in `chdir'
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:201:in `generate'
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:62:in `block in generate'
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:61:in `each'
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:61:in `generate'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:313:in `block in install_hooks'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:312:in `each'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:312:in `install_hooks'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:210:in `install'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/dependency_installer.rb:250:in `install'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/commands/update_command.rb:248:in `update_gem'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/commands/update_command.rb:260:in `block in update_gems'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/commands/update_command.rb:259:in `each'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/commands/update_command.rb:259:in `update_gems'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/commands/update_command.rb:120:in `execute'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/command.rb:326:in `invoke_with_build_args'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/command_manager.rb:253:in `invoke_command'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/command_manager.rb:194:in `process_args'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/command_manager.rb:152:in `run'
/usr/lib/ruby/site_ruby/3.3.0/rubygems/gem_runner.rb:57:in `run'
/sbin/gem:12:in `'
I am using gem 3.5.23
and `ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux]
`
Thank you for help
Jan Černý
(1723 rep)
Jan 17, 2025, 11:40 PM
• Last activity: Jan 17, 2025, 11:40 PM
1
votes
2
answers
4281
views
Ruby installation in Manjaro (Arch-Based Linux)
I was reading [the documentation](https://www.jetbrains.com/help/ruby/2021.1/set-up-a-ruby-development-environment.html#prerequisite_dependencies). In Debian based Linux, I have to install `build-essential, libssl-dev`. But, what about Arch-Based Linux? I had tried ``` sudo pacman -Syy build-essenti...
I was reading [the documentation](https://www.jetbrains.com/help/ruby/2021.1/set-up-a-ruby-development-environment.html#prerequisite_dependencies) . In Debian based Linux, I have to install
gem executables will not run.
Successfully installed bundler-2.2.17
1 gem installed When I check rails version I get there's no
gem executables will not run.
Successfully installed rails-6.1.3.2
1 gem installed
build-essential, libssl-dev
. But, what about Arch-Based Linux? I had tried
sudo pacman -Syy build-essential libssl-dev
But, unfortunately those packages aren't available. I had tried with yay
command also. But, I couldn't install them using yay
also. I had installed base-devel
also. I was reading [the question](https://bbs.archlinux.org/viewtopic.php?id=122984) also. But, don't need them. PHP works by Lampp/Xampp. But, Ruby needs build-essential && libssl-dev
. While they aren't available in Manjaro than, how Ruby programmer works in Manjaro? So, there must be similar package like this.
- I am using Rubymine
- Ruby version : ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]
- gem version : 3.2.15
I had installed openssl
while Google is saying build-essential
is base-devel
and, libssl-dev
is openssl
.
sudo pacman -Sy openssl
Then, I had run following commands
gem install rails
ruby -v
gem -v
rake -v
bundle install
When I tried
- Bundler version : Bundler version 2.2.15
But, when I installed bundler using the command bundle install
I got an error Could not locate Gemfile
.
gem install bundler
I got following error
>WARNING: You don't have /home/istiak/.local/share/gem/ruby/3.0.0/bin in your PATH,gem executables will not run.
Successfully installed bundler-2.2.17
1 gem installed When I check rails version I get there's no
rails
package. And, I had installed rails successfully.
gem install rails
>WARNING: You don't have /home/istiak/.local/share/gem/ruby/3.0.0/bin in your PATH,gem executables will not run.
Successfully installed rails-6.1.3.2
1 gem installed
When I try to compile the file in Rubymine than, I get
I am adding error in short below :
1. I don't have rails after installation also
2. Run Configuration Error: No Gemfile found
.
No Gemfile found
error while compiling ruby file from Rubymine
3. Could not locate Gemfile
while executing bundle install
Softunes
(23 rep)
May 22, 2021, 06:30 AM
• Last activity: Sep 25, 2024, 05:55 AM
0
votes
2
answers
1141
views
Replace all backslash escape sequence-producable characters with their escaped escape sequences
EDIT: I'm very sorry, that I initially didn't make my requirements clear. I don't actually have access to the string written in a backslash-escaped way and have amended the example to make that clearer. The two answers that I got as of now require me to have backslashes in the string to begin with,...
EDIT: I'm very sorry, that I initially didn't make my requirements clear. I don't actually have access to the string written in a backslash-escaped way and have amended the example to make that clearer. The two answers that I got as of now require me to have backslashes in the string to begin with, which is not the case.
I have a string that may contain lots of difficult characters, which I want to write to a file in an escaped way, so that it would generate the same string if given in double-quotes to
echo -e
, perl
, etc. I tried using shell-quote
and perl's quotemeta
function, but they do different quoting.
Example:
# I have a file containing difficult characters:
$ cat text
line0'field0
line1 field1"
$ cat -v text
line0'field0
line1 field1"
Expected raw output including the enclosing double-quotes:
"line0'field0\nline1\tfield1\""
I'm sure there must already be a built-in solution to this.
Johannes Riecken
(783 rep)
Nov 20, 2019, 09:06 AM
• Last activity: Mar 4, 2024, 03:10 PM
1
votes
3
answers
450
views
How do I print out the file size in a shell script?
I'm trying to record the size of the compressed build file using Fastlane in my CICD pipeline. If I try this in the command line: du -h fileName.ipa | awk '{print $1}' it works fine. However, if I try to put it in my script, like so: sh ''' # Add filesize to release message var fileName=`cat '"#{IPA...
I'm trying to record the size of the compressed build file using Fastlane in my CICD pipeline. If I try this in the command line:
du -h fileName.ipa | awk '{print $1}'
it works fine. However, if I try to put it in my script, like so:
sh '''
# Add filesize to release message
var fileName=
cat '"#{IPA_FILE_NAME_FILE}"'
fileSizeInfo=(du -h '"#{IPA_FILE_PATH}"'$fileName | awk '{print $1}')
echo "$buildInfo"
sed -i -e "s|FILESIZE_INFO|'"$fileSizeInfo"'|g" '"#{RELEASE_MESSAGE_HTML_FILE_NAME}"'
'''
it gives me these syntax errors:
[!] Syntax error in your Fastfile on line 263: Fastfile:263: syntax error, unexpected '{', expecting `end'
..._FILE_PATH}"'$fileName | awk '{print $1}')
... ^
Fastfile:285: syntax error, unexpected `end', expecting end-of-input
end
^~~
I'm kind of a newbie to shell scripting, so any help is appreciated - I probably just have some quotes in the wrong place or something. If it helps, Fastlane uses Ruby syntax, so that's Ruby string interpolation in there.
Edit:
Here's the whole lane I'm calling in my fastfile, for more context:
# Send message MS Teams Channel
lane:sendTeamsMessage do |options|
=begin
MS Teams messages are sent using webhooks and it got limited support to HTML and Markdown.
This implementation uses HTML formatted message.
Webhook will not accept new lines or double quotes because it can break the JSON struture.
The message file preparation is done in multiple steps.
1. Add .ipa file size info to release message HTML
2. Replace all double quotes with single quotes
3. Copy the Teams message payload template and update it with the message content
4. Replace 'MESSAGE_INFO' string with the HTML formatted content file
5. Send the message to Teams channel
=end
sh '''
# Add filesize to release message
var fileName=cat '"#{IPA_FILE_NAME_FILE}"'
var fullFilePath='"#{IPA_FILE_PATH}"'$fileName
echo fullFilePath
fileSizeInfo=(du -h $fullFilePath | awk '{print $1}')
echo "$buildInfo"
sed -i -e "s|FILESIZE_INFO|'"$fileSizeInfo"'|g" '"#{RELEASE_MESSAGE_HTML_FILE_NAME}"'
'''
sh '''
# Copy the release message html file
cp -fr '"#{RELEASE_MESSAGE_HTML_FILE_NAME}"' '"#{TEAMS_MESSAGE_FILE_NAME}"'
'''
# Replace all double quotes with single quotes to make it JSON friendly
sh("sed","-i","-e","s|\"|\'|g","#{TEAMS_MESSAGE_FILE_NAME}")
sh'''
cp -fr '"#{TEAMS_PAYLOAD_TEMPLATE_FILE_NAME}"' '"#{TEAMS_PAYLOAD_FILE_NAME}"'
message=cat '"#{TEAMS_MESSAGE_FILE_NAME}"'
sed -i -e "s|MESSAGE_INFO|'"$message"'|g" '"#{TEAMS_PAYLOAD_FILE_NAME}"'
'''
# Send the message to Teams channel
sh '''
echo '"#{options[:webhook]}"'
curl -H "Content-Type: application/json" -d @'"#{TEAMS_PAYLOAD_FILE_NAME}"' '"#{options[:webhook]}"'
'''
end
I tried moving the filepath/filename out to its own variable, but I'm still getting the same issue.
KDBartleby
(13 rep)
Sep 6, 2023, 02:04 PM
• Last activity: Nov 12, 2023, 04:53 PM
1
votes
1
answers
157
views
Why does my Vagrant loop fail to create all VMs?
With Vagrant, I aim to have three master and two node machines on my Ubuntu host. My `Vagrantfile`: ```ruby Vagrant.configure("2") do |config| config.ssh.insert_key = false (1..3).each do |i| config.vm.define "master" do |master| master.vm.box = "ubuntu/bionic64" end end (1..2).each do |i| config.vm...
With Vagrant, I aim to have three master and two node machines on my Ubuntu host.
My
Vagrantfile
:
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
(1..3).each do |i|
config.vm.define "master" do |master|
master.vm.box = "ubuntu/bionic64"
end
end
(1..2).each do |i|
config.vm.define "node" do |node|
node.vm.box = "ubuntu/bionic64"
end
end
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
vb.memory = "3072"
vb.cpus = "3"
end
end
I have after vagrant up
:
$ vagrant status
Current machine states:
master running (virtualbox)
node running (virtualbox)
Why did the loop fail?
Richard Rublev
(319 rep)
Apr 20, 2023, 09:48 AM
• Last activity: Apr 20, 2023, 11:12 AM
0
votes
1
answers
1016
views
Ruby won't update
Help! Trying to install Cocoapods on my mac, kept getting an error, thought it might be something to do with having a really old version of Ruby. Then this happened: ``` % ruby -v ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22] % brew upgrade ruby Warning: ruby 3.2.1 already...
Help! Trying to install Cocoapods on my mac, kept getting an error, thought it might be something to do with having a really old version of Ruby.
Then this happened:
% ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]
% brew upgrade ruby
Warning: ruby 3.2.1 already installed
% ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]
Why is it saying that it's already installed?
subatomic particle
(1 rep)
Feb 18, 2023, 02:33 AM
• Last activity: Feb 18, 2023, 05:12 PM
0
votes
1
answers
1512
views
Unable to install pg gem on CentOS Linux release 7.6.1810
ruby --version ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux] gem --version 3.3.7 `PostgreSQL 9.2.24 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit` When I run env ARCHFLAGS="-arch x86_64" gem install pg according to [this][1], I get Buildi...
ruby --version ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
gem --version 3.3.7
PostgreSQL 9.2.24 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
When I run
env ARCHFLAGS="-arch x86_64" gem install pg
according to this , I get
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
current directory: /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/pg-1.3.5/ext
/root/.rbenv/versions/3.1.2/bin/ruby -I /root/.rbenv/versions/3.1.2/lib/ruby/3.1.0 -r ./siteconf20220601-102563-hl61l1.rb extconf.rb
Calling libpq with GVL unlocked
checking for pg_config... yes
Using config values from /bin/pg_config
Using libpq from /usr/lib64
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*****************************************************************************
Unable to find PostgreSQL client library.
Please install libpq or postgresql client package like so:
sudo apt install libpq-dev
sudo yum install postgresql-devel
sudo zypper in postgresql-devel
sudo pacman -S postgresql-libs
or try again with:
gem install pg -- --with-pg-config=/path/to/pg_config
or set library paths manually with:
gem install pg -- --with-pg-include=/path/to/libpq-fe.h/ --with-pg-lib=/path/to/libpq.so/
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/root/.rbenv/versions/3.1.2/bin/$(RUBY_BASE_NAME)
--with-pg
--without-pg
--enable-gvl-unlock
--disable-gvl-unlock
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pq-dir
--without-pq-dir
--with-pq-include
--without-pq-include=${pq-dir}/include
--with-pq-lib
--without-pq-lib=${pq-dir}/lib
--with-pqlib
--without-pqlib
--with-libpq-dir
--without-libpq-dir
--with-libpq-include
--without-libpq-include=${libpq-dir}/include
--with-libpq-lib
--without-libpq-lib=${libpq-dir}/lib
--with-libpqlib
--without-libpqlib
--with-ms/libpq-dir
--without-ms/libpq-dir
--with-ms/libpq-include
--without-ms/libpq-include=${ms/libpq-dir}/include
--with-ms/libpq-lib
--without-ms/libpq-lib=${ms/libpq-dir}/lib
--with-ms/libpqlib
--without-ms/libpqlib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0/pg-1.3.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/pg-1.3.5 for inspection.
Results logged to /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0/pg-1.3.5/gem_make.out
I have done sudo yum install postgresql-devel
Package postgresql-devel-9.2.24-7.el7_9.x86_64 already installed and latest version
Nothing to do
and curl -I https://rubygems.org/specs.4.8.gz
HTTP/1.1 200 Connected
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 4701495
...
I have also done yum groupinstall 'Development Tools'
What should I do to install pg gem?
nidooooz
(57 rep)
Jun 1, 2022, 09:54 AM
• Last activity: Aug 9, 2022, 04:47 PM
0
votes
1
answers
200
views
Convert puppet manifest config to hiera
I installed corosync-pacemaker cluster via puppet. Now I would to like keep my data into hiera file. How should I convert cs_primitive section into yaml file? cs_primitive { 'nfsshare_fs': primitive_class => 'ocf', primitive_type => 'Filesystem', provided_by => 'heartbeat', parameters => { 'device'...
I installed corosync-pacemaker cluster via puppet. Now I would to like keep my data into hiera file. How should I convert cs_primitive section into yaml file?
cs_primitive { 'nfsshare_fs':
primitive_class => 'ocf',
primitive_type => 'Filesystem',
provided_by => 'heartbeat',
parameters => { 'device' => '/dev/disk/lvname', 'directory' => '/share', 'fstype' => 'ext4' },
}->
I tried the below code but it didn't work.
corosync::cs_primitive:
'nfsshare_fs':
primitive_class: 'ocf'
primitive_type: 'Filesystem'
provided_by: 'heartbeat'
parameters:
device: '/dev/disk/by-id/lvname'
directory: '/share'
fstype: 'ext4'
Thanks.
fortunate1357
(1 rep)
Apr 4, 2022, 06:21 PM
• Last activity: Jul 14, 2022, 07:27 PM
0
votes
2
answers
709
views
Ruby and Git refuse to update. (Mac)
I've been trying to update Git for a while. I'm currently stuck on 1.7.3.4, and I've tried updating to 1.7.4.x, and 1.7.5.x but it never works. Today I compiled and installed Ruby 1.9.2, but it still shows up as 1.8.7. I'm running 10.6.7 on a MacBook Pro. I have no idea why it won't update. Any idea...
I've been trying to update Git for a while. I'm currently stuck on 1.7.3.4, and I've tried updating to 1.7.4.x, and 1.7.5.x but it never works.
Today I compiled and installed Ruby 1.9.2, but it still shows up as 1.8.7.
I'm running 10.6.7 on a MacBook Pro.
I have no idea why it won't update. Any ideas? :(
McKayla
(103 rep)
May 14, 2011, 03:49 AM
• Last activity: Jun 7, 2022, 06:51 AM
0
votes
1
answers
1602
views
Ruby version issues
I have been practising setting up a production environment with puppet, and now I'm setting up everything to accommodate HTTP requests with Apache. Since Puppet runs on Ruby, I also need Passenger to get it running, but I can't install it because I keep getting an error saying that I need a fresher...
I have been practising setting up a production environment with puppet, and now I'm setting up everything to accommodate HTTP requests with Apache.
Since Puppet runs on Ruby, I also need Passenger to get it running, but I can't install it because I keep getting an error saying that I need a fresher version of Ruby installed.
At first this was an actual issue because I'm using a core version of CentOS 6.5 that only comes with Ruby 1.8.
I then updated the yum repos, the system itself and did
wget
to download the current version, configured and installed which gets me to where I stand right now. I installed Gems and tried to get Passenger again but I am faced with the same wall, version problems.
Here you can see the installed version of ruby and the issue.
[vagrant@puppetmaster ~]$ sudo gem install rack passenger
ERROR: Error installing rack:
rack requires Ruby version >= 2.2.2.
ERROR: Error installing passenger:
rake requires Ruby version >= 1.9.3.
[vagrant@puppetmaster ~]$ ruby --version
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
Miguel Antunes
(11 rep)
Jan 11, 2017, 12:48 PM
• Last activity: May 29, 2022, 11:02 AM
1
votes
1
answers
1491
views
Why do I have to stop/restart cups in redhat linux in order to use a custom filter?
A colleague wrote a filter utility for me in ruby that allows me to print barcodes from a textfile. (The filter replaces @{blah} with the proper PCL and a barcode checksum character so that "blah" prints in a barcode font.) I call this filter from an executable in my local bin directory. However on...
A colleague wrote a filter utility for me in ruby that allows me to print barcodes from a textfile. (The filter replaces @{blah} with the proper PCL and a barcode checksum character so that "blah" prints in a barcode font.)
I call this filter from an executable in my local bin directory. However on a fresh reboot, this process fails. (I can switch between 2 particular failures by manipulating permissions; either the filter fails to replace @{blah} with anything, or nothing prints.)
If I stop and restart cups, it all works like I want it to. How can I make this work without having to restart CUPS?
jim
Feb 2, 2012, 09:39 PM
• Last activity: May 8, 2022, 04:03 AM
0
votes
0
answers
945
views
SFTP: rename/remove commands fail intermittently
I have a background job written in Ruby that connects to several SFTP servers, download some files and finally, move the downloaded files to another folder in the sftp server. The issue is that the `rename` command fails when in just one server. What is interesting about this issue is that **if I co...
I have a background job written in Ruby that connects to several SFTP servers, download some files and finally, move the downloaded files to another folder in the sftp server.
The issue is that the
rename
command fails when in just one server.
What is interesting about this issue is that **if I connect to the server using ubuntu's sftp library or using Ruby's interactive console and run the same code used by the background job, it doesn't fail.** So, it is not a permission issue.
---
**2nd approach:**
I updated the implementation with the following workaround hoping that the remove
method will work:
def move(from_path, to_path)
sftp.rename(from_path, to_path) do |response|
sftp.remove(from_path) unless response.ok?
end
end
The code above works for about 75% of the file by deleting them.
Any ideas of what could be the issue here?
Libraries used here are:
https://github.com/net-ssh/net-sftp
https://github.com/resque/resque
Rodrigo
(212 rep)
Apr 6, 2022, 09:04 AM
0
votes
0
answers
169
views
Postgresql issue on Manjaro 21.2.1
It was working just fine a couple of months ago, but now it just returns the following, any ideas why libldap-2.4.so.2 could not be found all of the sudden? OS: Manjaro 21.2.1 ``` ~ postgres --version postgres: error while loading shared libraries: libldap-2.4.so.2: cannot open shared object file: N...
It was working just fine a couple of months ago, but now it just returns the following, any ideas why libldap-2.4.so.2 could not be found all of the sudden?
OS: Manjaro 21.2.1
~ postgres --version
postgres: error while loading shared libraries: libldap-2.4.so.2: cannot open shared object file: No such file or directory
➜ ~
OR
~: rails server
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java
.
/home/zil/.rvm/gems/ruby-2.7.2/gems/json-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
Traceback (most recent call last):
56: from bin/rails:2:in `'
55: from bin/rails:2:in `load'
54: from /home/zil/DEV/RAILS/launch_calendar/bin/spring:7:in `'
53: from /home/zil/DEV/RAILS/launch_calendar/bin/spring:7:in `tap'
52: from /home/zil/DEV/RAILS/launch_calendar/bin/spring:10:in `block in '
51: from /home/zil/DEV/RAILS/launch_calendar/bin/spring:10:in `require'
50: from /home/zil/.rvm/gems/ruby-2.7.2/gems/spring-3.0.0/lib/spring/binstub.rb:11:in `'
49: from /home/zil/.rvm/gems/ruby-2.7.2/gems/spring-3.0.0/lib/spring/binstub.rb:11:in `load'
48: from /home/zil/.rvm/gems/ruby-2.7.2/gems/spring-3.0.0/bin/spring:49:in `'
47: from /home/zil/.rvm/gems/ruby-2.7.2/gems/spring-3.0.0/lib/spring/client.rb:30:in `run'
46: from /home/zil/.rvm/gems/ruby-2.7.2/gems/spring-3.0.0/lib/spring/client/command.rb:7:in `call'
45: from /home/zil/.rvm/gems/ruby-2.7.2/gems/spring-3.0.0/lib/spring/client/rails.rb:28:in `call'
44: from /home/zil/.rvm/gems/ruby-2.7.2/gems/spring-3.0.0/lib/spring/client/rails.rb:28:in `load'
43: from /home/zil/DEV/RAILS/launch_calendar/bin/rails:5:in `'
42: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
41: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
40: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
39: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
38: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
37: from /home/zil/.rvm/gems/ruby-2.7.2/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `'
36: from /home/zil/.rvm/gems/ruby-2.7.2/gems/railties-6.1.4.1/lib/rails/command.rb:48:in `invoke'
35: from /home/zil/.rvm/gems/ruby-2.7.2/gems/railties-6.1.4.1/lib/rails/command/base.rb:69:in `perform'
34: from /home/zil/.rvm/gems/ruby-2.7.2/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
33: from /home/zil/.rvm/gems/ruby-2.7.2/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
32: from /home/zil/.rvm/gems/ruby-2.7.2/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
31: from /home/zil/.rvm/gems/ruby-2.7.2/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:135:in `perform'
30: from /home/zil/.rvm/gems/ruby-2.7.2/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:135:in `tap'
29: from /home/zil/.rvm/gems/ruby-2.7.2/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:138:in `block in perform'
28: from /home/zil/.rvm/gems/ruby-2.7.2/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
27: from /home/zil/.rvm/gems/ruby-2.7.2/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
26: from /home/zil/.rvm/gems/ruby-2.7.2/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
25: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
24: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
23: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
22: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
21: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
20: from /home/zil/DEV/RAILS/launch_calendar/config/application.rb:20:in `'
19: from /home/zil/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/bundler.rb:174:in `require'
18: from /home/zil/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/bundler/runtime.rb:58:in `require'
17: from /home/zil/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/bundler/runtime.rb:58:in `each'
16: from /home/zil/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/bundler/runtime.rb:69:in `block in require'
15: from /home/zil/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/bundler/runtime.rb:69:in `each'
14: from /home/zil/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/bundler/runtime.rb:74:in `block (2 levels) in require'
13: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
12: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
11: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
10: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
9: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
8: from /home/zil/.rvm/gems/ruby-2.7.2/gems/pg-1.2.3/lib/pg.rb:5:in `'
7: from /home/zil/.rvm/gems/ruby-2.7.2/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
6: from /home/zil/.rvm/gems/ruby-2.7.2/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
5: from /home/zil/.rvm/gems/ruby-2.7.2/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
4: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
3: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
1: from /home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/zil/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.9.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': libldap_r-2.4.so.2: cannot open shared object file: No such file or directory - /home/zil/.rvm/gems/ruby-2.7.2/gems/pg-1.2.3/lib/pg_ext.so (LoadError)
Zilton
(1 rep)
Jan 19, 2022, 06:21 PM
0
votes
1
answers
65
views
Cannot start sensu-service due to libc6 error
I am trying to install `sensu-client` on Ubuntu 16.04 node and after installation I am unable to start the service. Below is the error I am getting while trying to start the service. ``` sensu-service[4885]: /opt/sensu/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not foun...
I am trying to install
sensu-client
on Ubuntu 16.04 node and after installation I am unable to start the service. Below is the error I am getting while trying to start the service.
sensu-service: /opt/sensu/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /opt/sensu/embedded/lib/libruby.so.2.4)
My sensu
version is 1.9.0-2
I have verified that libc6
is already installed in my node
$sudo dpkg -l | grep libc6
ii libc6:amd64 2.23-0ubuntu11.3 amd64 GNU C Library: Shared libraries
ii libc6-dev:amd64 2.23-0ubuntu11.3 amd64 GNU C Library: Development Libraries and Header Files
Is there a way I can make them work with current os version?
Narendra Reddy
(3 rep)
Jun 17, 2021, 09:59 AM
• Last activity: Jun 17, 2021, 12:31 PM
0
votes
0
answers
1861
views
how to install specific version of Ruby in Arch-Based Linux
I was trying to install specific version Ruby in Manjaro. I had tried some query. ```bash sudo pacman -Sy ruby:2.6.6 sudo pacman -Sy ruby-2.6.6 ``` Both of them returning `target not found`. I was reading [the thread](https://bbs.archlinux.org/viewtopic.php?id=245606). But, Some people said that pac...
I was trying to install specific version Ruby in Manjaro. I had tried some query.
RVM is not a function, selecting rubies with 'rvm use ...' will not work.You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use
sudo pacman -Sy ruby:2.6.6
sudo pacman -Sy ruby-2.6.6
Both of them returning target not found
. I was reading [the thread](https://bbs.archlinux.org/viewtopic.php?id=245606) . But, Some people said that pacman doesn't allow to install specific version. How can I install specific version of Ruby then? Current Ruby version is 3.0.1. But, I need 2.6.6. So, I must have to install that version of Ruby.
I had installed 2.6.6 following way.
sudo rvm install 2.6.6
When I tried to use it
sudo rvm use 2.6.6
sudo rvm use 2.6.6 --default
I got following error
>RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /home/istiak/qpixel/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.RVM is not a function, selecting rubies with 'rvm use ...' will not work.You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use
/bin/bash --login
as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for an example.
user472251
Jun 15, 2021, 08:10 AM
• Last activity: Jun 15, 2021, 09:47 AM
0
votes
1
answers
194
views
where did yum install my ruby executable?
I'm trying to install a modern Ruby on Amazon Linux which I think is RHEL based. I ran `sudo yum install rh-ruby26` which is a legit package, and it installed some files. However when I try and run ruby, there's no executable found. I tried `rpm -ql rh-ruby26` but it says "contains no files". Am I m...
I'm trying to install a modern Ruby on Amazon Linux which I think is RHEL based. I ran
sudo yum install rh-ruby26
which is a legit package, and it installed some files. However when I try and run ruby, there's no executable found.
I tried rpm -ql rh-ruby26
but it says "contains no files".
Am I missing something ? Where did yum install my binary to run ruby ?
ether_joe
(103 rep)
Apr 19, 2021, 07:04 PM
• Last activity: Apr 19, 2021, 09:18 PM
3
votes
4
answers
11928
views
Unable to install libyaml-devel libffi-devel in CentOS
I am trying to install latest of ruby through RVM. I could not install install as it requires libyaml-devel and libffi-dev. When ever i try to install them i get error that no package found [root@dev workspace]# rvm requirements Checking requirements for redhat. Enabling optional repository Username...
I am trying to install latest of ruby through RVM. I could not install install as it requires libyaml-devel and libffi-dev. When ever i try to install them i get error that no package found
[root@dev workspace]# rvm requirements
Checking requirements for redhat.
Enabling optional repository
Username: ^C
User interrupted process.
Installing requirements for redhat.
Installing required packages: libyaml-devel, libffi-devel..
Error running 'requirements_centos_libs_install libyaml-devel libffi-devel',
showing last 15 lines of /usr/local/rvm/log/1467891146/package_install_libyaml-devel_libffi-devel.log
+ __rvm_try_sudo yum install -y libyaml-devel libffi-devel
+ typeset -a command_to_run
+ typeset sudo_path sbin_path missing_paths
+ command_to_run=("$@")
+ (( UID == 0 ))
+ yum install -y libyaml-devel libffi-devel
Failed to set locale, defaulting to C
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Setting up Install Process
No package libyaml-devel available.
No package libffi-devel available.
Error: Nothing to do
+ return 1
+ return 1
syed imty
(133 rep)
Jul 7, 2016, 11:36 AM
• Last activity: Mar 10, 2021, 06:41 PM
Showing page 1 of 20 total questions