Ruby is a dynamic, open source programming language with a focus on simplicity and productivity.

learn more… | top users | synonyms

19
votes
3answers
21k views

how can I uninstall using homebrew?

Can I uninstall something I installed via homebrew using homebrew?
18
votes
2answers
2k views

Is there a git-like file system?

Git stores content uniquely in its repo based on the calculated hash of any file. Thus, if my directory has two copies of the same file somewhere inside it, git will only actually store it once. I ...
15
votes
5answers
24k views

When to use Bash and when to use Perl/Python/Ruby?

We are doing all our scripting with Bash so far, but I'm starting to feel a bit silly about it. While we can of course do everything we want with Bash (it's quite powerful), I'm starting to wonder if ...
14
votes
2answers
12k views

How to install the latest version of Ruby and Ruby on Rails in Ubuntu?

I installed Ruby with the command apt-get install ruby1.9.1, but when I enter ruby in the console, nothing happens. I have to use the command ruby1.9.1-v ruby 1.9.2p0 (2010-08-18 revision 29036) ...
14
votes
2answers
733 views

Sending mail from the command line

Ok, I've looked far and wide for something to take care of this little email project I have. First, some background: My family has a secret santa every year and I've offered to write a script to ...
13
votes
2answers
6k views

Ruby installation issues with RVM

I've been following the directions at http://installrails.com to get my Macbook Air setup for some ruby work but I am running in any issue with RVM. When I try to install Ruby I get the following ...
12
votes
4answers
5k views

Services that just return your public IP as text [closed]

I'm writing a script that does dynamic DNS updates for me, but my server is behind a router, and so I need to use a web service to determine my public IP. So far I've found this one which returns ...
11
votes
2answers
1k views

Install packages through apt-get or gem?

If a package is available both through apt-get and gem, which one should I choose? I'm on Ubuntu and I don't know if I should install rake through apt-get or gem. I use both apt-get and gem packages ...
10
votes
5answers
17k views

Is it possible to reinstall/fix Mac OS X's system ruby without doing a complete OS reinstall?

Is it possible? I'm running into various issues at least once a week since it got corrupted or something, especially with homebrew. If it is possible, but would just be a better idea to start from a ...
10
votes
2answers
8k views

I need a simple way to backup files to Amazon glacier from the command line?

I have a CentOS server online with a directory of cPmove files I need to back up to Amazon Glacier. I only have command line access, no GUI. I need a command line client that is relatively easy to ...
9
votes
3answers
15k views

How to install the MySQL Ruby Gem on Ubuntu 9.10?

I am having a problem installing the Ruby Gem for MySQL. This is the command that I am running: sudo gem install mysql and this is the output that I'm getting: Building native extensions. This ...
9
votes
2answers
17k views

How can I fix a Broken Pipe error?

I recently reinstalled RVM (following the instructions at http://rvm.io) after a fresh install of Ubuntu 12.10 when I got an SSD Drive. Now, when I type: type rvm | head -1 I receive the following ...
9
votes
5answers
3k views

Homebrew keeps saying XCode is not installed

I'm trying to installed Ruby using Homebrew, the OSX package manager. When I run 'brew install ruby' I keep getting the message 'Warning: XCode is not installed!'. XCode is installed, it's lying. ...
7
votes
5answers
3k views

How do I alias a Homebrew installed Ruby 1.9 gem binary in /usr/local/bin?

Homebrew's Ruby 1.9 ships with rubygems. Doing gem install ... installs files and binaries into some long-winded path. For example, bundler is installed at: ...
7
votes
3answers
1k views

Installing Homebrew packages without linking

I'd like to install several versions of Ruby (or really any Homebrew package) without linking any of them. Basically, I'd like to treat any formula as keg-only. I can't seem to find a way to do this, ...
6
votes
5answers
10k views

How to install RMagick RubyGem on Mac OS X 10.6 Snow Leopard?

I am getting this error while trying to install RMagick: $ sudo gem install rmagick Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to ...
6
votes
3answers
2k views

Ruby shell instead of Bash shell in Ubuntu?

It seems to me that Ruby is far more powerful, and you can also do more powerful scripting with it. Are there any open source implementations out there that could replace Bash with Ruby on Ubuntu, so ...
6
votes
2answers
5k views

Install rails on Mac OS X

I try to install Rails on Mac OS X. I already installed ruby. $ ruby -v ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin11.4.2] I check whether Rails is installed: $ rails -v Rails is ...
6
votes
2answers
1k views

Vim: “brace matching” for languages without braces? (Ruby, Python, etc)

Vim is great at highlighting matching braces. But lately I'm working in Ruby, where method definitions generally start with do and end with end instead of { and }. Similarly, if statements and case ...
5
votes
4answers
7k views

Errors when installing Ruby to Mac OSX Lion via RVM

I was trying to install the newest version of Ruby via RVM, after I upgraded my Mac to Lion and installed the new Xcode 4.1 from the App store. I get this error in the log: [2011-07-20 16:57:15] ...
5
votes
2answers
5k views

Why can't I set the default Ruby version in Ubuntu?

I'm trying to set my Ruby version to be 1.9.2, but I can't change it from the system Ruby installation. What am I doing wrong? My terminal output is: $ rvm list rvm rubies => ruby-1.9.2-p180 [ ...
5
votes
4answers
6k views

~/.profile is not loaded when using SSH (Ubuntu)

Edited to reflect the problem I really wanted to solve: I need to set up my ruby environment so I can deploy via Capistrano. export PATH=$HOME/.rbenv/bin:$PATH eval "$(rbenv init -)" I put these ...
5
votes
2answers
471 views

Set the OS X clipboard to a rich text link in a Ruby or shell script

I'm trying to generate a report by using a Ruby script to parse an XML document. I'm pulling link text and the actual URL and I'd like to be able to format those in a way that I could simply ...
5
votes
2answers
3k views

Readline problems installing Ruby with RVM

I'm struggling with rvm. This isn't the first time I've installed rvm, and it isn't the first time I've had problems with it, but this problem is proving to be a right pain; and all of the articles ...
5
votes
2answers
4k views

Installing Ruby with RVM in Ubuntu 14.04

I installed RVM using the following command \curl -L https://get.rvm.io | bash -s stable Then I restarted the terminal and executed this commands source ~/.rvm/scripts/rvm rvm requirements rvm ...
5
votes
1answer
2k views

Vim */dyn support

What does mean the plus sign before */dyn in the :version command's output, e.g.: +python/dyn +python3/dyn +ruby/dyn +tcl/dyn I didn't find any useful documentation on it. When I run :echo ...
5
votes
2answers
4k views

How to configure installed Ruby and gems?

My current gem env returns: RubyGems Environment: - RUBYGEMS VERSION: 1.3.6 - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] - INSTALLATION DIRECTORY: /home/USERNAME/.gems - ...
4
votes
3answers
2k views

Can't vagrant install a plugin: gem dependency fails despite being installed

I am attempting to install the vagrant-vbguest plugin in Windows 7 from within cygwin 64. $ vagrant plugin install vagrant-vbguest Installing the 'vagrant-vbguest' plugin. This can take a few ...
4
votes
1answer
569 views

How to backup ruby gems?

How do you backup ruby gems? I am re-installing the Operating System so I would like to know how to back up ruby gems so that I can re-install it when I have installed the Operating System? Is it ...
4
votes
4answers
16k views

Ruby RubyGems: Why do I always get error messages when trying to install gems?

So I always seem to get error messages when I'm installing new gems. I'm new to Ruby, Rails, and RubyGems so it makes it very frustrating. I'm not sure if I need to configure something, or if I ...
4
votes
1answer
3k views

How to rebuild all my Ruby gems?

I ran into an apparently known issue with the native C compiler on OS X 10.8 not building Ruby gems correctly, so I installed GCC as suggested. How do I have rvm rebuild all of the already-installed ...
4
votes
1answer
2k views

How do I set up Ruby + Thin server in Windows? [closed]

I need to setup the "Thin" server on Windows, but I'm running into some issues, anyone able to help?
4
votes
2answers
153 views

How can I get Syntastic to recognize newer Ruby syntax?

I'm using Syntastic in Vim, and it highlights newer Ruby syntax as errors. For example, if I use required keyword arguments (introduced in Ruby 2.1), like this: def distance(from:, to:) # whatever ...
4
votes
3answers
649 views

finding geolocation from an ip address

How can I find a location such as city/state or country from an ip address? Is there a ruby gem or python module to do this? Or if there is a website which has an API.
4
votes
2answers
243 views

Ruby commands are turning off tty echo

After running Ruby scripts, almost 100% of the time, the bash command line will appear to be inactive, while in fact it's silently accepting my keystrokes without showing them to me. This has ...
3
votes
4answers
5k views

how do i run a script 5mn after startup?

I have severals RoR websites running on my webserver and I need to run a ruby script at startup. So, I puted a bash script in /etc/init.d witch call a ruby process. Unfortunatly that ruby process ...
3
votes
4answers
5k views

What is the simplest way to download a gem without installing rubygems?

I would like to download a gem without installing all the required gems for a given gem. Specifically for the Rails 3 gem. It has a lot of dependencies, and I need to install it on a closed server ...
3
votes
2answers
820 views

Is there a way to “Execute and update '# => ' markers” in Sublime Text 2?

This is my most favourite feature from ruby bundle in TextMate. Unfortunately, I can't find how to do the same in ST2. It still inserts the marker when you press TAB after the # symbol, so, I hope, ...
3
votes
2answers
3k views

How to install and use different versions of ruby?

I'm learning rails from different books that use different versions of both ruby and rails. Right now I have ruby 1.87 installed on my Mac OS X Snow Leopard (in /usr/bin), but need to also use ruby ...
3
votes
1answer
17k views

How to completely remove Ruby, Ruby gems on Mac OS X 10.6.4

Most rubyists might be shocked when they'll read this, but I'd like to know if it's possible to completely remove the Ruby framework as well as all the tools and gems that ship with Mac OS X 10.6.4. ...
3
votes
1answer
1k views

bash vi mode: What does # -*- mode: ruby -*- # vi: set ft=ruby : mean?

I'm looking through some random code, and at the top of it, it says this: # -*- mode: ruby -*- # vi: set ft=ruby : What does this mean? I know it's a simple question, but I couldn't find it out ...
3
votes
1answer
3k views

How do I use Sublime Text as the OS editor in Mac OS X?

How do I set Sublime Text as the editor for git commits in Mac OS X? In my .zshrc I have: export EDITOR='subl -w' But, if I do: bundle open devise I get the error: Could not run 'subl -w ...
3
votes
3answers
1k views

Where can I find the rails executable in Debian?

I am having a problem with my installation of Ruby/Rails on Debian. I've installed Ruby 1.9.1(1.9.2) using the package manager and I've created links to ruby1.9.1 and whatnot to allow me to use the ...
3
votes
1answer
194 views

what does STOP service do in Windows?

I start my web server as web service on Windows XP. How it was done is described here My web server is coded in ruby/sinatra and I start it C:\Ruby187\bin\ruby c:\web\web2.rb. That code the service ...
3
votes
1answer
1k views

java wont run under chroot cause it can not find shared libraries

i have openjdk and jRuby installed and running properly. however when i run exactly same environment under chroot, i get: error while loading shared libraries: libjli.so: cannot open shared object ...
3
votes
3answers
7k views

Pass cmd.exe arguments via a shortcut?

I'd like to create a shortcut to run cmd at a particular location with a few commands. I'm hoping from there I can work out how to make it a right click option to "Run my cmd commands here..." I've ...
3
votes
1answer
1k views

Getting (Mac)Vim to Work With RVM

I'm using RVM to manage Ruby installs and Gems, and MacVim to create and edit Ruby files. I have a key command in my ~/.vimrc mapped to evaluate a loaded Ruby file and print the output. It looks ...
3
votes
2answers
2k views

How to install development tools when Ruby compiled from source

I have Windows 8, and I need to install Ruby 2.1.2 for a project. I followed these instructions. I unzipped the source into C:\Ruby2.1.2\src\, ran nmake in C:\Ruby2.1.2\build\, and ran nmake install ...
3
votes
1answer
86 views

How to execute Ruby scripts on Windows 7 with minimal technical effort?

I've written some Ruby scrappers which will be used by some non-technical guys. I want to make these Ruby scripts executable on Windows with minimal effort. What are my options beside installing Ruby? ...
3
votes
1answer
837 views

Issues compiling passenger for apache2 on CentOS

I am trying to install openproject on a CentOS 6.5 (Release 3 from OVH) following this tutorial but with mysql in place of postgresql. I'm nearly done but I can't seem to compile passenger for apache ...