Sponsored Content
Top Forums UNIX for Dummies Questions & Answers What Makes an App the System Default? Post 302770437 by bakunin on Friday 15th of February 2013 09:51:55 PM
Old 02-15-2013
I notice with satisfaction you still tenaciously learn UNIX despite my efforts to let the subject look boring and hard to grasp - good!
Quote:
Originally Posted by sudon't
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

To me it looks like the problem is the name: the new ruby in "/opt/local/bin" is not named "ruby", but "ruby1.9". If you issue which ruby1.9 you would probably see this one, but if you search for "ruby", you get the one in "/usr/bin" simply because it is the only "ruby" you have.

Now, why ruby decided to install as "ruby1.9" and not as "ruby" i don' know. I don't know Macs version of UNIX at all, so i can only tell you what is the possible reason for the problem, not how to solve it.

You can, of course, try to solve the problem brute-force:

Rename "/usr/bin/ruby" to something else, say, "/usr/bin/ruby1.8". Then create a softlink:

Code:
ln -s /opt/local/bin/ruby1.9 /usr/bin/ruby

Whenever "ruby" is used, this link is followed and your new executable is used. If this works, i don't know. (There might be libraries or whatever necessary for ruby to work and it will probably not find them in any arbitrary place.) If this is not working, just delete the softlink and move the original ruby back into place:

Code:
rm /usr/bin/ruby
mv /usr/bin/ruby1.8 /usr/bin/ruby

I hope this helps.

bakunin
 

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
install-solaris(1M)                                                                                                            install-solaris(1M)

NAME
install-solaris - install the Solaris operating system SYNOPSIS
install-solaris install-solaris invokes the Solaris Install program. Depending on graphical capability and available memory at the time of invocation, install-solaris invokes either a text-based installer or a graphical installer. The following minimum requirements for physical memory dictate which features are available during installation: For SPARC machines: 128 MB Minimum physical memory for all installation types 128 MB Minimum physical memory required for windowing system 384 MB Minimum physical memory required for graphical-based installation For x86 machines: 256 MB Minimum physical memory for all installation types 256 MB Minimum physical memory required for windowing system 512 MB Minimum physical memory required for graphical-based installation In some cases, even if the minimum physical memory is present, available virtual memory after system startup can limit the number of fea- tures available. install-solaris exists only on the Solaris installation media (CD or DVD) and should be invoked only from there. Refer to the for more details. install-solaris allows installation of the operating system onto any standalone system. install-solaris loads the software available on the installation media. Refer to the for disk space requirements. Refer to the for more information on the various menus and selections. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcdrom (Solaris instal- | | |lation media) | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ pkginfo(1), install(1M), pkgadd(1M), attributes(5) It is advisable to exit install-solaris by means of the exit options in the install-solaris menus. 23 Sep 2005 install-solaris(1M)
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy