2022 Developer Survey is open! Take survey.

Questions tagged [ruby]

Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 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 ...
user avatar
  • 202
0 votes
0 answers
23 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': ...
user avatar
0 votes
0 answers
23 views

psql not working in Slackware

I downloaded the slack builds for pd, pd-sql and postgres and when I Run psql in the terminal I receive: bash-5.1# psql psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" ...
user avatar
0 votes
0 answers
18 views

Ruby and sqlite3 gem not working with bundle. SLackware

I need to run a ruby project with gems and specs. When I type bundle install I received: bash-5.1# bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing ...
user avatar
0 votes
0 answers
51 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 ...
user avatar
  • 1
0 votes
0 answers
34 views

How to install Jekyll with rbenv on a Debian-based distro?

What I have tried: Installing ruby with: rbenv install 2.4.1 Then installing Jekyll with gem: gem install bundler jekyll Error messages: user@user:~/git$ rbenv global 2.4.1 user@user:~/git$ gem ...
user avatar
0 votes
0 answers
52 views

How to get native RubyGems with extensions to compile on MSys2

RubyInstaller for Windows mostly works pretty well. But as a learning exercise, I want to turn the whole process upside down (RI4W installs MSys2 alongside Ruby and uses a helper script, 'RIDK', which ...
user avatar
0 votes
0 answers
18 views

Ruby gem install gem_name from the command line raising LoadError

I am using a MacBook Pro early 2015 running Big Sur. I used to OS version of ruby. It was working 6 hours ago but now when I run gem install from the command line I get the following error: (base) ...
user avatar
0 votes
1 answer
41 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]...
user avatar
0 votes
0 answers
587 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. 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 ...
user avatar
1 vote
2 answers
2k views

Ruby installation in Manjaro (Arch-Based Linux)

I was reading the documentation. 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-essential libssl-dev But, ...
user avatar
0 votes
1 answer
50 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,...
user avatar
  • 103
0 votes
0 answers
59 views

how to run a Ruby on rails server

Would anyone have a tip for how to run a ruby on rails server? There is an API that I would like to explore. This is the git repo. Thanks for any tips, I just dont have any experience for what would ...
user avatar
  • 101
1 vote
1 answer
93 views

Permissions problem when using ruby based snap 'mdl'

Because I don't understand Ruby, but want to use the ruby based program mdl (markdownlint), I have installed it using snap. While I can run the program, if I try and set up a customizations in a ~/....
user avatar
0 votes
0 answers
54 views

Ruby script to create a temporary file for use with greenletters

I'm using expect to test autocompletions in zsh (actually using the Ruby greenletters gem, with uses Ruby's PTY under the covers, to call expect). After digging through the documentation and old ...
user avatar
  • 101
0 votes
1 answer
762 views

Metasploit error on Alpine

When I trying to run ./msfconsole I got this error: Traceback (most recent call last): 9: from ./msfconsole:48:in `<main>' 8: from ./msfconsole:48:in `require' 7: from /...
user avatar
0 votes
1 answer
102 views

Vagrant: errors about ignoring Rubygems as their extensions are not built after install on Fedora 31

After installing the vagrant packages on Fedora 31 and subsequently running the vagrant command, there are these errors regarding ignored Rubygems: Ignoring ffi-1.10.0 because its extensions are not ...
user avatar
  • 514
0 votes
1 answer
135 views

How do I insert my bash variable into my ruby command?

I'm using bash shell. I have defined the following variable ... localhost:tmp davea$ echo $json {"id": "abc", "name": "dave"} I would like to insert the value of this var into a ruby command, so I ...
user avatar
  • 1,810
0 votes
0 answers
105 views

Help need to setup a Ruby on Rails App stack using docker

I have setup a Rails app on a docker container and a apache web server on another container. I need the apache web server to access the rails app for every request made. The issue is I have to ...
user avatar
  • 381
0 votes
1 answer
48 views

Difference between interactive bash and commands executed via ssh

I have a setup on a server of ruby using a tool called rvm (Ruby Version Manager. It works fine. rvm adds some stuff to the path so that it can control what version of Ruby I get when I just type ruby....
user avatar
  • 627
-1 votes
2 answers
251 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 ...
user avatar
1 vote
1 answer
167 views

Do subprocesses keep pipes open?

I am trying to understand the behaviour of programs that launch subprocesses, when run in a pipeline. This bash program, fork.sh, prints and returns immediately: (sleep 1) & echo 'here' But ...
user avatar
  • 13
0 votes
1 answer
175 views

Use ERB in tmuxinator with a bash array environment variable?

I want to use tmuxinator to open panes (and run commands with an argument in each) by looping through a bash array. Is that possible? How would I do that?
user avatar
  • 4,049
0 votes
1 answer
4k views

Gem::Ext::BuildError: ERROR: Failed to build gem native extension

I have the following Dockerfile: FROM debian:stretch-backports RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ ruby ruby-dev \ ...
user avatar
1 vote
1 answer
2k views

How to preserve filename and folder structure when using foremost recovery program?

I am desperately needing to run the linux recovery software foremost and preserve filenames and folder structure. As you might know the program renames the recovered files with a numerical value and ...
user avatar
  • 459
1 vote
2 answers
572 views

Choose an option from select in bash

I am trying to run gem uninstall bundler through a bash script. The issue occurs when I have multiple bundler versions installed. It prompts the number of versions, and last option is to uninstall all ...
user avatar
-1 votes
2 answers
2k views

Ubuntu could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

I'm trying to create a new user form my rails application. I already ran psql -p 5432 -h localhsot -U postgres and created a new user. Then I added the user with sudo adduser user_name and afterwards ...
user avatar
5 votes
2 answers
1k views

How does 'Open with' a custom executable in Linux work?

I have a file called foo.txt. I want to associate my own program with the mime-type .txt so that my program opens a terminal and shows the contents of foo.txt as standard output. I would prefer Ruby, ...
user avatar
  • 1,635
-1 votes
1 answer
609 views

Ruby on Rails Routing Error [closed]

I am running ruby on rails on an Ubuntu Droplet and I am encountering the following error when I navigate to my domain name: Routing Error uninitialized constant HomeController Rails.root: /home/...
user avatar
4 votes
1 answer
756 views

With gnu find, what is the difference between -print0 and -printf "%p\0"

In a terminal I can run... find . -type f -print0 ./testdir/testfile2.txt./testdir/testfile.txt And then... find . -type f -printf "%p\0" ./testdir/testfile2.txt./testdir/testfile.txt They both ...
user avatar
3 votes
1 answer
1k views

Remove multiple strings from file on command line, high performance [closed]

Is there an elegant, high-performance one-liner way to remove multiple complete strings from an input? I process large text files, e.g., 1 million lines in inputfile, and 100k matching strings in ...
user avatar
1 vote
0 answers
322 views

Can't install ruby on rails MacOSX

While trying to install ruby on rails with sudo gem install rails I get the following error Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed ...
user avatar
1 vote
1 answer
792 views

Ruby on NixOS -- FFI Gem installation failing when building native extensions

I am a Rubyist of many years. I cannot determine what's missing to prevent FFI from installing. Here is the error from the make.out file (gotta love that name): make[3]: *** [Makefile:1048: ...
user avatar
1 vote
1 answer
389 views

NixOS Ruby Development - Installing all needed devkit libraries and headers to build native extensions

I'm a Ruby developer thoroughly enjoying NixOS. I just need to know how to set up dependencies to build native dependencies on gems like FFI and Nokogiri. Currently I am getting this error: The ...
user avatar
1 vote
0 answers
445 views

Can't access gems after installing ruby and gems with ansible

I'm working on an Ansible script to install my standard working environment (Ruby on Rails). Ansible runs under sudo, and the gems that have been installed are only accessable under sudo too. If I ...
user avatar
  • 1,027
0 votes
1 answer
129 views

emerge install package with flag which not in ruby_targets

$ emerge --info | grep ruby ..... RUBY_TARGETS="ruby23" ...... And I run emerge with --newuse and --deep, it will ask me to add use flag with ruby22. These packages are not in @system. These ...
user avatar
  • 248
1 vote
1 answer
424 views

sh script to run multiple files in multiple languages

Is it possible to have an sh script that would run a python file, run a command ruby file and run a ruby sonicPI file? What would this look like? Thank you! Adi
user avatar
  • 13
4 votes
1 answer
1k views

Fastest way to determine if directory contents have changed since last time

I have a script that checks a directory using mdls* (to sort by added time) and them performs some operations. However, mdls is a bit slow so I’d like to run it only when absolutely necessary (i.e. ...
user avatar
0 votes
1 answer
228 views

where are codiad projects stored locally?

In Firefox I installed codiad as: where is ruby_hello actually located? (When it asked for the absolute path, I wasn't able to put in /home/thufir/... because of permission, so just typed in "...
user avatar
  • 1,710
0 votes
2 answers
2k views

Error installing Ruby on Rails (Arch Linux)

I'm currently having an issue when trying to install Ruby on Rails on my Arch Linux ARM system. But it's also not just rails that won't install, it's anything I try to install using gem. Here is some ...
user avatar
4 votes
1 answer
3k 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 ...
user avatar
  • 41
1 vote
1 answer
51 views

How to start gem ffaker in Debian?

I install ffaker but cannot find it in my PATH masi@masi:~$ sudo gem install ffaker Fetching: ffaker-2.6.0.gem (100%) Successfully installed ffaker-2.6.0 Parsing documentation for ffaker-2.6.0 ...
user avatar
0 votes
1 answer
494 views

Incompatible character encoding in Jenkins can't resolve

I am attempting to run a Cucumber (Ruby) Test Suite from Jenkins that tests whether or not 2-4 byte UTF-8 characters are valid names for groups. I have tried a number of solutions and have been ...
user avatar
1 vote
2 answers
4k 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 -...
user avatar
1 vote
1 answer
281 views

How can I use ruby gem commands like bundler when ruby is installed by nix package manager?

I'm new to nix package manager. After installing nix into Ubuntu 16.04 LTS(Japanese translated version), I installed ruby with nix-env command. Then I did gem install bundler. That seemed to work ...
user avatar
  • 319
1 vote
1 answer
309 views

Use RVM to point to custom Ruby path

I have my ruby-2.3.1 installed in /opt/rubies/ruby-2.3.1/bin/ruby, but by some problems with dependencies KDE downloads ruby-2.1 to /usr/bin/ruby and now my system uses that version. I've install RVM ...
user avatar
0 votes
1 answer
46 views

How to install KDE without Ruby?

For a project I'm using Ruby 2.3.1, I'm using a CentOS7 OS with ruby 2.3.1 installed. When I run yum install kde-workspace it installs/downgrades to ruby 2.0.0.648-29.el7 which makes the application ...
user avatar
0 votes
2 answers
1k views

How to iterate over files using awk, bash, or ruby?

I have three markdown files on my machine: $ ls | grep md bar.md baz.md foo.md Each file has the given content: $ cat *md i am bar i am baz i am foo As an example, I'd like "loop over all the ...
user avatar
  • 2,546
0 votes
1 answer
3k views

ulimit value not changing for a process

We have a ruby application that started throwing lot of "unable to create new socket: Too many open files" errors recently I have updated "etc/security/limits.conf" as below root soft nofile ...
user avatar
  • 332
0 votes
3 answers
90 views

using linux command and gnu software inside a ruby script

Can I use ls command or wget gnu software inside a Ruby script? Actually, can I use Ruby instead of Bash , and use all of Linux commands and Gnu Software ?
user avatar