Questions tagged [ruby]

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

1
vote
1answer
29 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 ...
1
vote
2answers
2k 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 -...
0
votes
0answers
21 views

Why is checkinstall freezing when I try to run “make install” for Ruby 2.5.5?

I'm compiling Ruby 2.5.5 with jemalloc in a Docker container, and I'm trying to build a deb package with the checkinstall tool. Here is the Dockerfile and build script I'm using. Steps to reproduce: ...
3
votes
1answer
1k 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 ...
1
vote
2answers
48 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 ...
0
votes
2answers
60 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 ...
0
votes
0answers
26 views

Easier way to run remote and monitor remote commands

I'm currently leveraging Ruby in a docker image to run some commands on my local Linux system via SSH and Tmux. However, this isn't feasible since I can't figure out a way to actually monitor the ...
0
votes
2answers
3k views

Error installing nokogiri: ERROR: Failed to build gem native extensions

I can build my rails application on my mac On my Ubuntu machine when I bundle I get errors with a bunch of gems including nokogiri, version 1.6.7.2 Error installing nokogiri: ERROR: Failed to build ...
6
votes
3answers
1k views

Small Linux distro with Ruby

I have been using Puppy Linux for basic Linux needs, however now I would prefer one that has Ruby included, so that it does not have to be downloaded. I would prefer a small distro that can run from ...
2
votes
3answers
3k views

How can I create a bash script which runs irb, then some ruby code?

I'm trying to do this to make unit testing a breeze for myself. The contents of an example script in question are as follows: irb require 'random_utils.rb' a = SuccessChecker.new Right now this ...
0
votes
1answer
890 views

`rvm list remote` not showing binaries for Ubuntu 14.04 box

I'm trying to provision a dev box with rvm on Ubuntu 14.04 (via Vagrant and Ansible). I've installed rvm: gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 \curl -sSL https://get.rvm.io | ...
1
vote
0answers
76 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, ...
0
votes
0answers
61 views

Kali Linux error showing unmet dependencies

I'm getting the following error: The following packages have unmet dependencies: libwxgtk3.0-0v5 : Depends: libgtk2.0-0 (>= 2.24.0) but it is not going to be installed E: Error, ...
0
votes
2answers
2k views

Ruby gems not recognized in bash script

I have built a node.js app that listens for webhooks. Currently it is used to build a jekyll website. I have configured it on my server and jekyll build works perfectly when I run it in the root of ...
5
votes
1answer
4k views

Can I refresh my shell within a shell script?

I am trying to setup a script that starts with a minimal CentOS 6 install and provisions it for Ruby development. #!/bin/bash # Add PostgreSQL Repo rpm -i http://yum.postgresql.org/9.1/redhat/rhel-6-...
2
votes
1answer
123 views

How do I make the “1.9.2” Ruby string point to the final release with RVM?

I'm using RVM to manage my Ruby environment on OSX, and currently it's interpreting '1.9.2' as ruby-1.9.2-rc2 instead of the final release. How can I update this to make it behave as expected?
8
votes
3answers
36k views

git push fails with remote: error: hook declined to update refs/heads/master

I'm recently trying to start my own project on a community git repo, and I've been having some complications. I'm new to git, but here's what I've been trying to do to just test it. I run the ...
-1
votes
1answer
80 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/...
-1
votes
1answer
45 views

How can I check the ruby format for a bunch of files and/or a single file?

Most of them have a common pattern that is a filename of ..._rspec.rb One of them is a filename without that ending (but does end in .rb). How can I run ruby -wc (or in fact any operations such as ...
4
votes
1answer
243 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 ...
3
votes
1answer
299 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 ...
0
votes
1answer
263 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 ...
0
votes
0answers
18 views

Execution of Embedded ruby code

I have ruby code written for user add in DB. User Add Code : `<h1>New User Group</h1> <%= f.label :name, 'Name:' %> <%= f.text_field :name, :class => '...
1
vote
0answers
232 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 ...
0
votes
1answer
255 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: ...
1
vote
1answer
146 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 ...
1
vote
0answers
175 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 ...
-2
votes
3answers
1k views

Kali linux : unable to “make” airdrop-ng / lorcon / pylorcon2

here is what I'm trying to do cd lorcon ./configure --libdir=/usr/lib make make install cd pylorcon2 python setup.py build python setup.py install cd ../ruby-lorcon/ ruby extconf.rb make make ...
2
votes
1answer
4k views

How can I run script without root to sniff network (libpcap)?

I have a script (in ruby): require 'ffi/pcap' pcap = FFI::PCap::Live.new(:dev => "wlan0", :timeout => 1) pcap.loop() do |this,pkt| puts pkt.body end When I try to run the script , I get the ...
0
votes
1answer
97 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 ...
1
vote
1answer
178 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
1
vote
1answer
33 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. ...
0
votes
1answer
61 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 "...
0
votes
1answer
757 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 ...
0
votes
2answers
749 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 ...
1
vote
1answer
39 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 ...
6
votes
2answers
22k views

Making ruby available to all users

I intend to use Ruby when programming my Raspberry Pi which is running the Debian based Occidentals. Via SSH, I executed: curl -L https://get.rvm.io | bash -s stable --ruby which downloaded the ruby ...
0
votes
3answers
67 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 ?
1
vote
1answer
158 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 ...
1
vote
1answer
153 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 ...
0
votes
1answer
34 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 ...
0
votes
2answers
592 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 ...
0
votes
1answer
1k 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 ...
0
votes
3answers
3k 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 ...
1
vote
2answers
5k views

How do I start Unicorn using systemd/systemctl?

I've wrote a systemd file for systemctl to start unicorn: [Unit] Description=Unicorn server [Service] SyslogIdentifier=my-app-unicorn User=deployer PIDFile=/tmp/unicorn.my-app.pid WorkingDirectory=/...
1
vote
1answer
518 views

What is the best way to update Ruby 2.x on Debian 7?

In fact, my goal is to install Capistrano. Currently it requires Ruby version 2.x and higher. But Ruby is available max 1.9.3 in Debian 7. So I was faced with dilemma, which is written in the title of ...
0
votes
1answer
207 views

Error installing the rmagick gem in Ruby 1.8.6 rvm - “checking for InitializeMagick() in -lMagick… no”

I have an old Rails app I maintain which uses Ruby 1.8.6. I'm trying to get a new install of Linux Mint 18 up and running so I can develop for the app. I managed to install the same (almost) version ...
0
votes
0answers
95 views

mysql.so: undefined symbol: vio_blocking

I'm trying to set up a Rails 2.2.2 installation (for an old app that I maintain) in a new Linux Mint 18 install. I've installed mysql (5.7.16-0ubuntu0.16.04.1 (Ubuntu)) and, using RVM, have installed ...
2
votes
4answers
5k views

Can't install pg gem

I can't get the pg gem to install. I have tried --with-pg_config and it didn't work. Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-1....
0
votes
1answer
654 views

Permission error when creating backup on gitlab omnibus installation

I am using gitlab version 7.10.4 and I am trying to upgrade the installation. But I am getting this when I tried to create back up gitlab-rake gitlab:backup:create Errno::EPERM: Operation not ...