Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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
votes
1answer
18 views

Rails Database Migration [closed]

I am trying to migrate my rails database using the following command: $ bin/rails db:migrate I am getting the following error: rails aborted! ActiveRecord::NoDatabaseError: FATAL: role "root" ...
0
votes
1answer
31 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/...
0
votes
0answers
18 views

Exporting Ruby Gems to $PATH

I am trying to run some ruby gems from my terminal, but I am getting the following error: You don't have /Users/developer/.gem/ruby/2.3.0/bin in your PATH, gem executables will not run. I added ...
4
votes
1answer
215 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
167 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
0answers
10 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 => '...
0
votes
0answers
153 views

Error: make: ./miniruby: Permission denied

I was trying to install RVM (Ruby Version Manager) with stable ruby on a mac and got this error: Error running '__rvm_make -j2' abbreviated console output: \curl -sSL https://get.rvm.io | bash -...
0
votes
0answers
120 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
93 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: ...
0
votes
0answers
55 views

inspec command script to read from a text file - linux

I have a text file filesystem.txt and the content as below: / = 26 /dev = 0 /dev/shm = 1 /run = 1 /sys/fs/cgroup = 0 /boot = 28 /dcs/data01 = 4 /home = 2 /var = 6 /opt = 42 /dcs/appl01 = 50 /run/user/...
1
vote
1answer
77 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 ...
0
votes
0answers
52 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 ...
0
votes
0answers
612 views

RVM halting installation please read /usr/local/rvm/log/

While trying to install RVM when I came across a problem: Error running '__rvm_make -j2', please read /usr/local/rvm/log/1519159695_ruby-2.4.1/make.log There has been an error while running ...
0
votes
0answers
84 views

Fail to install rubygems on Fedora 27: unpacking of archive failed on file /usr/lib/gems: cpio: mkdir

I'm installing a rubygems on Fedora, but get a cpio: mkdir error. Here's the full output: Running transaction Preparing : ...
0
votes
0answers
34 views

Switching directories under rake task fails to load new directory's gemset

Within the context of a rake task, I am attempting to cd into a sibling directory from which I would like to invoke another rake task. However, it seems that the gemset for the second directory is not ...
0
votes
1answer
61 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
89 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
26 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
0answers
39 views

Display the ruby version of the active pane in the status bar of TMUX

How do I display the current ruby version of the active pane? I've added this to my Tmux.conf but it's not quite right. It displays but not the current pane, rather the version of ruby that was set ...
0
votes
1answer
36 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
2answers
503 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 ...
3
votes
1answer
807 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
1answer
33 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 ...
0
votes
1answer
195 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
2answers
1k 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 -...
1
vote
1answer
113 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
83 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
32 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
415 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
602 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
59 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
413 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
0answers
66 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 ...
0
votes
1answer
552 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
1answer
504 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 ...
1
vote
1answer
191 views

Redirecting stderr of a Ruby script not working as expected

I have a command that I think is outputting to stderr because when I redirect stdout to /dev/null I still get output printed to the screen. However, when I redirect stderr to /dev/null I also get ...
0
votes
1answer
166 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 ...
1
vote
1answer
251 views

Service Start Issue Systemd

I have configured a dradis.service file in /lib/systemd/system, it is called dradis.service. And it is its content: [Unit] Description=Dradis web application [Install] WantedBy=multi-user.target [...
3
votes
1answer
398 views

Is there man command for bundle?

There is a command bundle in ruby. I want use man command or similar function for bundle. Does it exist? If there is it, I want to know how to look for separated command like bundle gem. I can see ...
-3
votes
3answers
925 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 ...
0
votes
0answers
459 views

Howto upgrade ruby on a Ubuntu 14.04.2 (Trusty) on a Raspberry Pi 2 (armhf architecture)

I need to install json via # gem install json --no-rdoc --no-ri but I get as result ERROR: Error installing json: json requires Ruby version ~> 2.0. I use Ubuntu Trusty (this image) and ...
2
votes
0answers
369 views

x64_mingw not a valid platform - Rails 5

Bluehost Shared Server ruby -v 2.2.2 rails -v 5.0.0.1 gem -v 2.4.5 ~/.bashrc export HPATH=$HOME export GEM_HOME=$HPATH/ruby/gems export GEM_PATH=$GEM_HOME:/lib64/ruby/gems/1.9.3 export GEM_CACHE=$...
2
votes
0answers
206 views

Metasploit ruby “bad interpreter: Permission denied”

When I'm typing in my terminal msfconsole I got something like this: bash: /usr/bin/msfconsole: /usr/share/metasploit-framework/ruby: bad interpreter: Permission denied ls -l /usr/share/metasploit-...
1
vote
1answer
469 views

Proxychains DNS error but not with ping

I'm having a weird issue with proxychains. I set up the DNS server to be 8.8.8.8 (Google), and I have a valid proxy in the configuration. When I ping google using proxychains, it pings normally. But ...
0
votes
3answers
2k 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 ...
0
votes
0answers
56 views

SSL error with rvm and ruby 2.2.2

I am getting the below error while doing a api call from one app to another: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed We are using using rvm ...
3
votes
2answers
757 views

Can you tell if a file has been renamed?

Many tools out there for syncing files aren't quite right for syncing you're home directory. Because of this, and to learn Ruby, I've been working on my own sync tool. An issue I've encountered, ...
1
vote
0answers
92 views

Sudden problem with a rack/passenger ruby app: “Connection closed”

I have a Ruby 1.8.7 app which runs under Phusion Passenger and Nginx, for one of my clients, on an Ubuntu VPS. It's been ticking away happily for years, but yesterday ran out of log space (sending me ...
2
votes
1answer
513 views

How can I launch irb from a bash script, execute some commands, then pass the irb session to the console?

I am creating a ruby gem and to speed my testing I wrote a script to build and install my gem, then to open irb for me to manually poke around. How can I run the following ruby commands before ...
1
vote
2answers
4k views

CentOS: How to install libyaml-devel from source?

I'm trying to install RVM in a CentOS server which for some weird reason I do not have access to internet. One of its dependencies is the library libyaml-devel. I already installed the libyaml ...