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

learn more… | top users | synonyms

0
votes
0answers
12 views

How to bring back `irb` back to teminal screen

I run a program by irb that have rescue and retry statement. Accidentally, I closed the irb running terminal. But process itself is still alive like this. ps ax | grep irb 17749 pts/0 S+ 0:00 ...
2
votes
1answer
281 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" ...
1
vote
0answers
351 views

Manually setting environment variables for Metasploit

How do I set manually environment variables for Metasploit, when I execute db_driver I get this message: [*] No Active Driver [*] Available: [*] DB Support: Enable the postgresql driver ...
1
vote
1answer
29 views

Can't find rbenv after installation

I've been trying to install rbenv on my fresh Debian 7.4 install, per the instructions here. I follow all the steps on the guide, and they all work fine: I can use rbenv to install Rubies and gems ...
3
votes
2answers
116 views

Time running a Ruby script is different locally than over SSH

Has anyone else seen this behavior? I created a simple Ruby script for giggles to see how fast it would count up on a couple machines I have. Here's the source: for n in 1...1000000 do ...
0
votes
2answers
190 views

Installing ruby 2.1 on Arch via RVM

I have problems installing ruby 2.1.0 via RVM on Arch. My vagrant provisioning file looks like this: sudo pacman -Syu --noconfirm sudo pacman -S --needed base-devel --noconfirm sudo pacman -S vim ...
1
vote
1answer
27 views

How can I add autocomplete for “gem which” with rbenv?

I am using rbenv on Mac OS X. I have autocomplete functionality already for the gem command: $ gem build environment lock query stale cert fetch ...
0
votes
0answers
31 views

Is there a difference between `command rspec` and `rspec`?

I want to call bundle exec rspec if Gemfile exists in current directory, and if it doesn't exists, call rspec itself. So I wrote like this. function rspec() { if [ -e 'Gemfile' ]; then echo ...
0
votes
1answer
86 views

Giving cron permission to execute command

I'm trying to get a ruby script to run via cron. The cron job looks like this: * * * * * /usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby ...
1
vote
0answers
295 views

How to install Ruby Test to Sublime Text 2

I am quite new to Ubuntu, so I am running into some problems. I was following this tutorial to install Ruby Tests for Sublime Text 2: https://github.com/maltize/sublime-text-2-ruby-tests There is ...
1
vote
1answer
175 views

“Failed to build gem native extension” when installing xively-rb for raspberry Pi

I'm trying to install the xively Ruby gem on the Raspberry Pi - http://rubygems.org/gems/xively-rb However, during install the following occurs: gem install xively-rb Building native extensions. ...
4
votes
2answers
1k 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 ...
2
votes
0answers
67 views

FreeBSD 8.4 pkgdb fails after upgrade to Ruby 1.9

I just upgrade Ruby 1.8 to Ruby 1.9. After the upgrade I followed the instructions in the UPDATING file located in /usr/ports. I issued the following two commands: portmaster -o lang/ruby19 ...
0
votes
1answer
138 views

Why is Ruby using 100% CPU in startup?

I installed GitLab on an EC2 instance a while ago, compiling Ruby from scratch: $ ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] $ which ruby /usr/local/bin/ruby What's really ...
1
vote
1answer
78 views

Ubuntu LTS : best practice for installing gems

Ubuntu 12.04 LTS Server I'm relatively new to Unix/Ubuntu. I need to install the ruby gem libopenssl-ruby. I know that Ubuntu LTS versions maintain lists of authorized package versions. apt-get ...
2
votes
2answers
521 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 ...
2
votes
2answers
102 views

sed - remove unmatched “}”, “)” or ']" (only for the line in question)

I have a file with a lot of lines Some of the lines end in unmatched braces, i.e. "}" This is only true for lines that contain ".to" How can I remove the unmatched braces with sed for ALL lines ...
0
votes
1answer
38 views

sed how to do “or”

I have the following two lines that work ok: /\.to <\=/ s/<\=/be <\=/ /\.to_not <\=/ s/<\=/be <\=/ I would like to combine them and I tried: /\.to( |_not )<\=/ s/<\=/be ...
0
votes
0answers
35 views

Why is Compass running on screen 1 printing its output onto screen 0?

I'm using 2 screen windows for this. screen window 0 is mostly used for git screen window 1 is used exclusively for running compass in watch mode. Now, whether I redirect all compass (run with the ...
2
votes
1answer
664 views

Crontab + Ruby on Rails: /usr/bin/env: ruby: No such file or directory

I have a ruby on rails app and I need to schedule a crontab for a rake task. */5 * * * * RAILS_ENV=production /usr/local/bin/rake -f /usr/local/www/mysite-web-production/current/Rakefile ...
3
votes
3answers
169 views

Command line options of rackup are not shown in ps output or procfs

As you know if you wish to get command-line runtime arguments for running command you can parse ps -e or /proc/<pid>/cmdline. But I have encountered issue when this method returns only command ...
-1
votes
2answers
90 views

Alternative shells (Javascript, Ruby, etc)? [duplicate]

Does anyone use a shell written in Javascript, Ruby, Clojure, etc as their everyday unix shell, instead of bash, zsh, etc? Is there any reason not to?
2
votes
1answer
275 views

How to use specify version of ruby for shell script with rbenv?

I'm going to write some short script in ruby. And I want to specify ruby version by shebang or in another way. I'll use the script in many environments. I'm using rbenv in the evironments, but it's ...
0
votes
0answers
34 views

Rvm posix error on arm Beagle bone black

I'm trying to run rvm on Angstrom linux on BBB. When I try to launch rvm, I obtain: RVM can not be run with `set -o posix`, please turn it off and try again. Someone know about this?
3
votes
2answers
235 views

Ruby update not working using two methods

I tried to install ruby version 1.9.3 with this on my mac 10.6.8: $ \curl -L https://get.rvm.io | bash -s stable --ruby Oskar-Niburskis-MacBook-Pro:~ oskarniburski$ rvm install ruby-1.9.3-p362 ...
2
votes
1answer
349 views

Bash Commands not working on Mac

Hello I open my terminal window on Mac Os 10.6.8 as I am trying to update my ruby to 1.9.3 and the terminal gives me this response immediately as I open it: -bash: export: ...
1
vote
1answer
106 views

How to pipe to bash as a different user

I am running an experiment as a way to solve a bigger problem. For the experiment, I need to install rvm as a user who does not have a shell. To install rvm, you use the following command \curl -L ...
2
votes
1answer
142 views

How to let pacman notice the ruby installed by rbenv?

I use rbenv to manage ruby versions. I want to install gvim on my ArchLinux and one of it's dependency is ruby. I'm already use rbenv to install the version 2.0.0-p247 of ruby as root ...
1
vote
1answer
1k views

How to properly automatically/manually rotate log files for production Rails App

I am taking over administration for a server which has a custom made 3rd party Rails app. The app developer informed me that the ruby log files are getting large and pointed me to the following link: ...
3
votes
4answers
2k views

Advantages (or downsides) of GVim over Vim to edit code

Should I install vim or GVim ? I develop mainly Ruby on Rails (I also use IDE's, but different topic). Are there any differences or advantage of using Gvim vs vim ?
1
vote
2answers
142 views

Using RVM with gvim without installing the ruby binary

In Arch Linux, apparently gvim requires to install ruby as a dependency. However, if I want to work with RVM, then I don't need the binary ruby installed. Can that cause problems? Can ruby be ...
2
votes
0answers
78 views

Ubuntu : puppet f5 device config : Partition '' doesn't exist

This is a Puppet question that I've posted on the PuppetLabs forums with no response. I'm also posting here because I'm hoping that with a wider audience I might find someone knowledgeable re Puppet ...
0
votes
0answers
98 views

Updating a homebrew formula

I am taking an attempt at updating a homebrew formula, it's the primer3 formula from homebrew-science. It's a simple, minor version update, and the source is at: ...
3
votes
2answers
502 views

How to install Ruby 1.9.3 on Arch?

The wiki suggests using $sudo pacman -S ruby1.9 but the package isn't there... I'd rather not compile it from source but I can if no one knows.
5
votes
3answers
555 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 ...
1
vote
3answers
403 views

Providing the full path doesn't work but calling just the name of the program does, why?

What am I missing? I can call "rvm" from the command line but not reference the entire path that which rvm says I'm using. Not that it's important, but I stay logged in as "jenkins" the entire time ...
0
votes
1answer
50 views

Installing Ruby on Mac OS X

I had ruby installed in /usr/local/bin/ but it was outdated, so I installed newer version using brew. Now I have two installations of ruby in different dirs. Should I remove one? And how do I update ...
4
votes
3answers
586 views

What's the best way to determine the working directory for UNIX process using 'ps'?

I am running a Ruby command line script (rufus.sh)which ultimately calls Thread.new, which spawns a UNIX process as shown below. I run this script for more than 1 directory as the output of the ps ...
6
votes
1answer
485 views

`kill -s TERM` works, `kill -s ABRT` gets “Operation not permitted”

There is a process that I own whose documentation claims I can send SIGABRT to in order to get some debugging information. However, when I try to send SIGABRT, I get back "Operation not permitted". I ...
1
vote
3answers
2k views

packages have unmet dependencies - unable to install packages

I am trying to install passenger module with bellow command: sudo passenger-install-apache2-module And I am getting following output: * GNU C++ compiler... found at /usr/bin/g++ * Curl ...
12
votes
2answers
5k views

Best way to upgrade vim/gvim to 7.3 in Ubuntu 10.04?

I have to use Ubuntu 10.04 at work, and cant upgrade it. I'm using Vim/gVim 7.2. I want to upgrade it to 7.3 (with Python and Ruby extension support). Which is the best way? Add an entry in ...
1
vote
1answer
281 views

How to get 'TZ' with out '$TZ' being set?

I writing a Ruby program. I need a way to get something like America/New_York as ActiveSupport::TimeZone and require "tzinfo" can't get my current timezone. (Note that Time.now.zone can get things ...
1
vote
0answers
93 views

Ruby on Rails missing Thor

When trying to run rails g migration a, I get the following message Thor is not available. If you ran this command from a git checkout of Rails, please make sure thor is installed, and run this ...
3
votes
1answer
573 views

Can I refresh my shell within a shell script?

Very new to Bash scripting... 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 ...
0
votes
0answers
101 views

Install Rails on linux

I am trying to install Ruby on Rails and I have followed the following link for the install ...
4
votes
2answers
670 views

How do you specify alternative script interpreters (shebangs)?

In an executable file, you specify the environment using a shebang: #!/usr/bin/env ruby # ruby code here But what if you want to specify multiple possible environments? For example, if you have ...
2
votes
2answers
382 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 ...
1
vote
3answers
2k views

Can't install pg gem

I cant get the pg gem to install. I have tried --with-pg_config and it didnt work. Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. ...
3
votes
1answer
553 views

TinyCore Linux & RVM

I'm running TinyCore Linux and when I tried to install RVM (needed a portable linux distro for QA Automation) I keep getting an error sh: syntax error:unexpected redirection. I am unsure why I am ...
1
vote
1answer
329 views

Customize Emacs Ruby Mode for PuppetLabs conifguration

I predominantly use emacs for editing my Puppet configuration files. I use the following settings in my .emacs to load Ruby mode and use it for Puppet config files (*.pp): (autoload 'ruby-mode ...