Sponsored Content
Top Forums UNIX for Dummies Questions & Answers What Makes an App the System Default? Post 302770436 by sudon't on Friday 15th of February 2013 09:07:01 PM
Old 02-15-2013
What Makes an App the System Default?

Hi!
I'm not sure how, (or if), Apple updates stuff in the standard unix installation of OS X, but whenever I have occasion to check a version number of something in my standard install, it is outdated. Normally, I will then install the newer version via ports, which usually becomes the default. Being a long-time Mac user, I am used to these things happening automagically, and I don't always give it much thought.
But today, I wanted to install a little Scrabble Solver script I found, and it required ruby 1.9.2, or better. I checked my version in /bin, and found I had 1.8, so I installed ruby19 via ports. Then I tried to install the script.
Code:
$ sudo gem install scrabble-solver
ERROR:  Error installing scrabble-solver:
	scrabble-solver requires Ruby version >= 1.9.2

$ which ruby
/usr/bin/ruby

$ ls -l /opt/local/bin/ |grep ruby
-rwxr-xr-x   1 root  admin     9024 Feb  6 11:21 ruby1.9
$

Why didn't ruby 1.9 become the default? How does the system determine which app is the default? I used to think it simply accepted the first one it came across in my PATH, but clearly that is not the case.
Code:
$ echo $PATH
/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.2/bin:/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/MacGPG2/bin:/usr/X11/bin

I haven't had occasion to invoke ruby myself, but I suppose other stuff uses it. Is there any reason I couldn't just set an alias to ruby 19 in my bash config? Would that solve the problem in terms of installing this script?
TIA!
 

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Loading App as the System starts

Hi Folks! I am a Mac OS X user, and have written an Applescript application that I would like it to be run before the user logs in. I have tryed leaving the Mac on the "Login Screen", that screen just before you log in typing name and password, and logging using ssh from another Mac on the... (0 Replies)
Discussion started by: fundidor
0 Replies

2. UNIX for Dummies Questions & Answers

chmod ug-s /System/Library/CoreServices/RemoteManagement/ARDAgent.app/.... NOT PERMITTED

After much reflecting I decided that I don't want to have a remote managemente in my computer and I digited in Terminal from the Administrator Account: chmod ug-s /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAgent But the answer is: NOT PERMITTED Why? Is it not... (6 Replies)
Discussion started by: Vera
6 Replies

3. Programming

Wuhan Coronavirus Status App for China - Rapid Prototype using MQTT and the IoT OnOff IOS App

With a little bit of work, was able to build a nice "Wuhan Coronavirus Status" app using MQTT and the IoT-OnOff app. More on this technique here: ESP32 (ESP-WROOM-32) as an MQTT Client Subscribed to Linux Server Load Average Messages The result turned out nice, I think. I like the look and... (10 Replies)
Discussion started by: Neo
10 Replies
IRB(1)							 Ruby Programmers Reference Guide						    IRB(1)

NAME
irb -- Interactive Ruby Shell SYNOPSIS
irb [--version] [-dfm] [-I directory] [-r library] [--[no]inspect] [--[no]readline] [--prompt mode] [--prompt-mode mode] [--inf-ruby-mode] [--simple-prompt] [--noprompt] [--tracer] [--back-trace-limit n] [--irb_debug n] [--] [program_file] [argument ...] DESCRIPTION
irb is the REPL(read-eval-print loop) environment for Ruby programs. OPTIONS
--version Prints the version of irb. -E external[:internal] --encoding external[:internal] Same as `ruby -E' . Specifies the default value(s) for external encodings and internal encoding. Values should be separated with colon (:). You can omit the one for internal encodings, then the value (Encoding.default_internal) will be nil. -I path Same as `ruby -I' . Specifies $LOAD_PATH directory -U Same as `ruby -U' . Sets the default value for internal encodings (Encoding.default_internal) to UTF-8. -d Same as `ruby -d' . Sets $DEBUG to true. -f Suppresses read of ~/.irbrc. -h --help Prints a summary of the options. -m Bc mode (load mathn, fraction or matrix are available) -r library Same as `ruby -r'. Causes irb to load the library using require. --inspect Uses `inspect' for output (default except for bc mode) --noinspect Doesn't use inspect for output --readline Uses Readline extension module. --noreadline Doesn't use Readline extension module. --prompt mode --prompt-mode mode Switch prompt mode. Pre-defined prompt modes are `default', `simple', `xmp' and `inf-ruby'. --inf-ruby-mode Uses prompt appropriate for inf-ruby-mode on emacs. Suppresses --readline. --simple-prompt Makes prompts simple. --noprompt No prompt mode. --tracer Displays trace for each execution of commands. --back-trace-limit n Displays backtrace top n and tail n. The default value is 16. --irb_debug n Sets internal debug level to n (not for popular use) ENVIRONMENT
IRBRC Also irb depends on same variables as ruby(1). FILES
~/.irbrc Personal irb initialization. EXAMPLES
% irb irb(main):001:0> 1 + 1 2 irb(main):002:0> def t(x) irb(main):003:1> x+1 irb(main):004:1> end => nil irb(main):005:0> t(3) => 4 irb(main):006:0> if t(3) == 4 irb(main):007:1> p :ok irb(main):008:1> end :ok => :ok irb(main):009:0> quit % SEE ALSO
ruby(1). REPORTING BUGS
Security vulnerabilities should be reported via an email to <security@ruby-lang.org>. Reported problems will be published after being fixed. And you can report other bugs and feature requests via the Ruby Issue Tracking System (http://bugs.ruby-lang.org). Do not report security vulnerabilities via the system because it publishes the vulnerabilities immediately. AUTHORS
Written by Keiju ISHITSUKA. UNIX
November 7, 2012 UNIX
All times are GMT -4. The time now is 01:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy