Stack Exchange Network

Stack Exchange network consists of 175 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
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [ruby]

Ruby is a programming language that ships with macOS.

0
votes
0answers
58 views

Error while attempting to install Homebrew on Mac OS X 10.7 (Lion)

I'm attempting to update my installation of Homebrew by re-installing as prescribed by http://brew.sh: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)...
1
vote
1answer
413 views

How to undo a software installation process in Mac Mini with OSX 10.11

I followed the instructions on this site and installed qbittorent. I run the command: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /...
1
vote
1answer
57 views

Xcode is constantly hijacking my Editor settings for .rb files

I'm quite baffled by this as i can't find how and why it's happening. For years i'm using Sublime Text to open ruby files and surely i have Xcode installed but except of command line tools i don't use ...
3
votes
1answer
1k views

How can I change the keyboard layout through the terminal?

This is necessary, because I write the program on Ruby, and I need to programmatically change the layout of the keyboard
2
votes
1answer
109 views

Ruby -e does not execute the code in the argument

I am running Mac OS High Sierra v10.13.2 on a MacBook Pro (Retina, Mid 2012). My Ruby version (output from >ruby -v) is ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]. When ...
2
votes
2answers
363 views

High Sierra user trying to set up a new user for Rails, without interfacing w/ previous users

I'm getting this error when I'm trying to use Rails. It seems there are problems with using local files. pasting below to show the versions of ruby and rails ~ $ ruby -v ruby 2.4.2p198 (2017-09-14 ...
4
votes
1answer
1k views

How do I update Ruby from the default version to 2.1.6 via terminal?

I don't want to update my pre-installed Ruby to the latest version. My question is: how can I upgrade the version of Ruby to version 2.1.6 on Mac via terminal?
4
votes
1answer
531 views

How to manage newer Ruby installations in macOS without intervening with the default Ruby installations?

macOS comes with some default ruby installations, more here, that I do not want to overwrite by running gems commands as sudo. I tried rbenv, instructed here, but I am getting a permission error in ...
0
votes
1answer
66 views

Use LaunchControl to run pg_dump in a ruby file

Using Mac OSX 10.12.5, I have a ruby file with the following contents #!/usr/bin/env ruby Dir.chdir('/Users/my_files') do system("pg_dump -Fc --no-acl --no-owner -h localhost -U MyName development &...
2
votes
1answer
3k views

install gpg with homebrew

I want to install a new version of ruby via rvm. To install that, I need gnupg2. I installed it using brew, but it could not be linked. I get the following error message when linking with brew link ...
2
votes
1answer
1k views

How do I upgrade my openssl? A symlink isn't working for /usr/local/bin/OpenSSL

I'm having trouble updating my version of openssl so I can get Fastlane working. Can anyone explain where OpenSSL should be, and how different environments hook into it? MACOS:~ lamont$ openssl ...
3
votes
3answers
2k views

How do I save a text file with a Ruby (.rb) file extension?

I am new to Ruby and am trying to learn from a book. However, I have one problem – it says I should save a file so that it ends with .rb but my Mac only lets me use .rtf so that's what I used. But the ...
1
vote
1answer
486 views

rbenv global version of ruby vs Sierra ruby version

Following this OSX Sierra tutorial from the folks at gorails, I am having trouble getting rbenv global to associate the install of 2.3.0 with the ruby command and to override the default ruby version ...
6
votes
3answers
10k views

ruby version on macOS Sierra

Can someone let me know the version of ruby on macOS sierra? I have a public beta of macOS Sierra (10.12.1 build-16B2327e) and the version is 2.0.0. I wanted to know if the stable version of macOS ...
3
votes
1answer
3k views

Homebrew refuses to work on macOS Sierra

Just yesterday I updated my machine, a MacBook Pro (Mid 2010), to macOS Sierra. Everything seems to work fine, except when I try to use the homebrew packet manager with any command, for example brew ...
4
votes
1answer
1k views

RBENV managed Rubies: VIM upgrade forcing homebrew to install Ruby

I've recently switched from RVM to RBENV as my Ruby manager under MacOS Sierra. $ rbenv version 2.3.1 (set by /Users/meltemi/.rbenv/version) $ which ruby /Users/meltemi/.rbenv/shims/ruby I've used ...
1
vote
1answer
506 views

How to start scripting automation on OS X without AppleScript or Automator?

I want to start writing scripts to automate common use cases in OS X El Capitan 10.11.6. I'd like to work with ruby but I'd be willing to learn any high level language to do it with the exception of ...
-1
votes
1answer
23 views

What is my issue when trying to install rails?

I have all the pac managers and etc that i can get from any book or online resources anywhere, ive tried many methods and just about everything i can find online. Can someone who knows exactly what ...
0
votes
1answer
1k views

Rails reporting error: Failed to build gem native extension

I have installed up-to-date command line tools, and followed steps on other threads with this subject. I know this seems like a duplicate, but I don't see any answers to my issue here: Jacobs-MacBook-...
1
vote
1answer
36 views

Why my CodeRunner mac app keep output “(B[m” before my correct output?

When I code test ruby script, it keeps output "(B[m" before my other output, even thought I just have single line puts statement. Just as follow: See the "(B[m" before my output text " test". ...
1
vote
1answer
2k views

How to install ruby gems without sudo

I want to install a Ruby Gem to my computer, but since I don't have an administrator account I can't use sudo. How do I install a Gem without sudo, and what (if any) privileges do I loose? This is in ...
6
votes
0answers
2k views

rbenv not overriding default Ruby version

I used the thoughtbot laptop script to setup a new Macbook Air (OSX 10.10.5), but when I navigate within a Rails project that contains a .ruby-version file, running commands such as rails s returns an ...
4
votes
5answers
5k views

Can't install bundler using gem

I'm trying to install Bundler on my Mac which is running OS X El Capitan Public Beta 6 (15A278b). I try sudo gem install bundler but I get the following error back ERROR: While executing gem ... (...
0
votes
1answer
374 views

How to create automatic launchd job that sets the Ruby version to use

I’d like to run a ruby script automatically once or twice a day on my MacBook running OS X Yosemite. Problem is that I currently have three versions of Ruby on my system including 1.8.7 and 2.2.1, ...
0
votes
0answers
981 views

Configure: error: clang version 3.0 or later is required - but I already have it

I'm trying to follow this RVM installation guide, supposedly for Snow Leopard 10.6.8 (I should point out that $ rvm -v returns -bash: rvm: command not found), but when I run $ curl -L https://get.rvm....
1
vote
1answer
1k views

Reinstalling ruby

I somehow screwed up my ruby installation. It says: ruby .... /Library/Ruby/Site/2.0.0/rubygems.rb:1098:in `register_default_spec': undefined method `default_gems_use_full_paths?' for Gem:Module (...
1
vote
0answers
29 views

recover deleted /Library/Ruby/ [duplicate]

I accidentally deleted files under /Library/Ruby/ and /System/Library/Frameworks/Ruby.framework/ folders. Now, is there any way to recover them or install fresh Ruby setup?
1
vote
1answer
161 views

Installing a major Ruby implementation without XCode

A user is wanting to get started with Ruby (and Ruby on Rails), and they don't have XCode installed, and the current internet connection is rather weak. Are there any major implementations of Ruby (...
1
vote
2answers
2k views

Using RVM and installing rspec gem for Ruby

I think I installed rvm correctly. When I type in rvm -v it outputs rvm 1.25.33 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/] ...
0
votes
1answer
968 views

How can I make Ruby net::http stop stalling on ipv6?

There are some tools critical to my workflow that talk to www.pivotaltracker.com using ruby. Some combination of updating from Ruby 2.1.2 to Ruby 2.1.3, recent os x system updates, and brew updates ...
36
votes
8answers
20k views

Ruby on OS X 10.9 Ignoring gems because extensions are not built

Every few days this will happen when doing various things in Ruby CLI (notably, using the knife utility for Chef) on OS X (unable to replicate in other environments; Linux, FreeBSD, etc.): Ignoring ...
1
vote
0answers
740 views

OSX Mavericks: reinstall Ruby without reinstalling the whole system

I was "wise" enough to uninstall system Ruby on my Mac. So the question is: how to install Ruby without reinstalling everything? Maybe important: I can't use AppStore because it wants credit card ...
-2
votes
1answer
329 views

Nothing happens on calling ruby

If I type in terminal ruby it just gets stuck, nothing happens. When I type which ruby it outputs /usr/bin/ruby. How do I restore ruby on my mac?
0
votes
0answers
655 views

Want to Update OpenSSL with Ruby 2.0.0 Already Installed

I have Ruby 2.0.0-p451 installed via RVM. From what I have read online the newer versions of openssl need Ruby 2 installed. I'm running RVM 1.25.25. I currently host Ruby on Rails websites on my Mac ...
1
vote
1answer
408 views

Installing ruby to specific directory/usb

I am trying to install ruby to a specific directory, a USB stick, so I can move the usb back and forth without having to install ruby on each machine I get to (I need ruby 2.0+). How can I do this? I ...
1
vote
1answer
4k views

Nokogiri gem fails to install in OS X Mavericks

Install fails showing: checking for iconv_open() in iconv.h... no checking for iconv_open() in -liconv... no checking for iconv_open() in -liconv... no checking for libiconv_open() in iconv.h... no ...
1
vote
2answers
921 views

Open Ruby installed gems in editor

How to open installed gems in editor such Sublime Text or Text Mate or Atom? I would like to do it from command line like: open -a Sublime\ Text\ 2 something_here
1
vote
0answers
345 views

How to automatically add `brew update ruby` to `rbenv` versions?

I just did a brew update which updated a ruby version (brew ruby --version), but when I rbenv versions it isn't listed there because I didn't do ruby install <ruby version>. Is there a way to ...
1
vote
2answers
1k views

Upgrade RVM and now PATH is broken

My PATH no longer includes /usr/local/bin even though it is the first line of /etc/paths: #/etc/paths /usr/local/bin /usr/bin /bin /usr/sbin /sbin $PATH: $ echo $PATH /usr/bin:/bin:/Users/meltemi/....
15
votes
2answers
8k views

Which version(s) of Mac OS X have Ruby installed by default?

I'm thinking about using Ruby to write an installation script, but I'm not sure if all major versions of Mac OS X install it by default. Which version(s) of Mac OS X have the Ruby interpreter ...
1
vote
0answers
128 views

Rails Command Fails Because of Space in Path

I tried setting up a Ruby on Rails project on my nice safe volume called "Data RAID". The set up failed with some strange errors that I eventually tracked down to the space in the path name. It works ...
4
votes
2answers
4k views

Uninstalled zsh, terminal gone weird

I uninstalled zsh pretty soon after I installed it as I realised I had got used to the normal Terminal. The uninstall went successfully and I restarted Terminal, but now it displays my computer-name (...
2
votes
1answer
246 views

Least intrusive way to install Ruby 1.9 on a borrowed MacBook?

I need to use Ruby 1.9 for a programming test, and I'll be borrowing my dad's MacBook Air to do so. He's running OSX 10.7.5 and has Ruby 1.8.7 What's the least "invasive" way to install a newer ...
0
votes
1answer
6k views

How to get “Subl” to work in my terminal?

Whenever I enter "subl" in the command line of iTerm it tells me that the command is not found. I have seen many message boards pertaining to this and nothing seems to work. I have tried entering "ln ...
8
votes
2answers
12k views

Ruby 2.0.0 install via RVM: errors surrounding openssl

Using: Mountain Lion 10.8.2, RVM 1.18.15 Having trouble with, apparently, openssl when trying to install Ruby 2.0.0 via RVM: $ rvm install 2.0.0 ... Extracting openssl to /Users/meltemi/.rvm/src/...
1
vote
3answers
7k views

Ruby 2.0.0 fails to install because of openssl

I can't install ruby from source, on configuration (./configure) it states Ignore OpenSSL broken by Apple. Please use another openssl. (e.g. using `configure --with-openssl-dir=/path/to/openssl') ...
1
vote
2answers
5k views

How to Run Shell Script upon Application Launch?

Not sure if this belongs here or on SuperUser, but it's Mac specific, so I'll go with here. I wrote a Ruby script that edits TextMate's global properties file and changes the theme based on the time ...
6
votes
1answer
1k views

How to build last version of Ruby for jailbroken iOS?

I jailbrake my iPad and want to run Ruby in the console. I installed OpenSSH & Ruby from Saurik. But it is too old (1.9.2) & buggy. I would like to compile and install the latest version of ...
7
votes
2answers
12k views

where is Ruby looking for SSL_CERT_FILE?

I am trying to find out where Ruby expects to find its openssl CA list. My environment is: Mac OS 10.7.5 OpenSSL from homebrew Rbenv from homebrew Ruby 1.9.3, installed using rbenv and CONFIGURE_OPTS=...
9
votes
2answers
4k views

Problems installing Ruby versions via RVM in Mountain Lion

So I recently joined the Mac world and bought a MacBook - which I love, by the way. I'm having some trouble getting all my dev tools up setup properly and am not quite 100% familiar with the ...