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

1
vote
3answers
5k 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 ...
1
vote
0answers
385 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
3answers
698 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 ...
1
vote
1answer
388 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
107 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 ...
4
votes
1answer
1k 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
105 views

Install Rails on linux

I am trying to install Ruby on Rails and I have followed the following link for the install ...
6
votes
2answers
1k 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
662 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 ...
3
votes
4answers
5k 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
3answers
3k 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. ...
1
vote
1answer
412 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 ...
1
vote
1answer
474 views

Why doesn't Ruby's configure script detect my executables and header files?

I'm trying to compile Ruby and really understanding what's going on while doing so. I've used and written Makefiles before, but not autoconf's configure.in files, so maybe the result I'm getting is by ...
1
vote
0answers
440 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
892 views

Opening a file with space from Ruby

When I need to progmatically open in emacs a file that has a space in its name, how can I do that? I've tried these commands from a Ruby script, inside backquotes or popen(…): emacs "foo bar" or ...
1
vote
1answer
346 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
1answer
161 views

How to add methods to rush (Ruby shell)?

I am starting to learn the basics of rush (ruby shell), and I know it is possible to invoke methods such as home['foobar.c'].vi. However, say I wanted to edit it with GNU Emacs, how do I add a new ...
0
votes
1answer
75 views

Why doesn't 'which ruby' output anything?

On Debian 6, I uninstalled Ruby 1.8 and installed 1.9.1. Now if I run which ruby it doesn't output anything. Why can't it find ruby anymore?
4
votes
3answers
986 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 ...
4
votes
2answers
717 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
2answers
2k views

Check the Existence of a Network Interface Card Redhat

I'm aware that I can use ethtool eth0|eth1|eth2 to check the existence of a NIC. But I wonder where the files are on the machine that contain information of an existing interface, as I need to use ...
0
votes
2answers
421 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 ...
3
votes
1answer
162 views

I shouldn't use root on my new ubuntu cloud instance, right?

I am playing with ubuntu on my new Rackspace cloud instance. However, the information they give me is for root access -- that doesn't seem like a best practice for doing development on this thing. ...
12
votes
2answers
6k 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 ...