mac os x how to upgrade to ruby 1.9.2
Perhaps not the answer you're looking for in the short term, but I highly recommend looking into Ruby Version Manager. It makes running concurrent versions of Ruby a breeze by switching out the entire environment for you (by means of updating your environment variables, generally). Different versions, different gems per version, etc.
I think that the best option is to use Homebrew. The installation is simple:
brew install ruby
By the way, RVM does not support LLVM based gcc!
P. S. Homebrew is great choice because it has clear and good way to install things (without ruining your system), you can use it to install various "packages" like git, ghc, emacs etc.
P. P. S. Don't forget to path your new ruby, something like:
export PATH="$PATH:/usr/local/opt/ruby/bin"]
P. P. P. S. If you would like to use rvm, try this link: http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/
RVM main site doesn't install properly on OS X Lion. The instructions are incorrect, the error messages it spews are incorrect (refer to non-existent log files, etc).
Route that (eventually) worked for me:
Open Xcode, go to Preferences - Downloads
Make sure that "Command Line Tools" is installed (150 MB download); this is (silently) required for Ruby to install, and used to be part of OSX / Xcode by default, but no longer
Ignore the RVM website - it links to bad installers for OS X (don't bother, not worth the pain. I tried them, they failed)
use JewelryBox, which is a little less rubbish than the official installer: http://unfiniti.com/software/mac/jewelrybox
Run it, click Add Ruby, select ruby-1.9.3-p125 (has to be that version or higher, or it won't compile, because the previous versions need a compiler thats no longer in OS X)
Select "Autodetect" and "use clang"
...wait a LONG time...
If JewelryBox crashes immediately, it means you missed either step 2 above, or step 6 above (RVM crashes spectacularly if clang isn't installed, and neither RVM nor jewelrybox checks in advance)
NB -- downloading will take approx 5 mins; "installing" will take 30-45 mins, because everything has to be compiled. There is apparently no "normal" way of installing Ruby :(.
Related
Greetings fellow problem solvers.
I'll start by saying my level of expertise regarding coding/anything compsci is somewhere right above ZERO (intro to java last semester & currently teaching myself python, but that's it). Also I have a macbook air running 10.14.6(mojave). Ok, here are my questions.
What I did:
I installed macvim version 8.1.2234 before realizing my machine was shipped with vim 8.0.1365 preinstalled. I installed macvim using the download .dmg & "drag/drop to applications" method.
What I'd like to know:
Firstly, MacVim and Vim appear to be separate programs (when I type mvim -v as opposed to vim -v in the terminal, each one shows a different version number as described above). So, how can I remove/replace/update/overwrite or whatever, so that I only have either macvim or vim? I don't really care which one I have as long as I only have one
--> Before telling me to just rename an alias so that one maps to the other, please read the info below <--
I REALLY don't want two nearly identical programs on my computer because, a)it seems like a waste a space b)don't want the possibility of accidentally saving something to the wrong place, or calling something from the wrong place, but mostly c)so I can sleep at night.
That being said, do I NEED both? Does macvim rely on vim to work or do they both exist and work independently? Also does renaming an alias mean that the other will be replaced? Because I would assume that just renaming one would be a lot like having two houses, but making both driveways only go to one house.
Additional info: I have do homebrew but I didn't install macvim using homebrew. I found another post recommending to use (i don't remember exact syntax but something like..) $brew overwrite vim--with-macvim. So I thought great, I'll uninstall macvim since I haven't used it at all yet, and then I'll re-download using the homebrew overwrite method. But then I read that it's a little more complicated than moving the "Vim" folder to the trash, and after two unsuccessful attempts in the terminal that looked like this:
$brew uninstall mvim (throws no keg error)
$brew uninstall macvim (same error)
I decided to reach out for help before I break anything.
Thanks in advance for any info/advice, it is much appreciated!
I don’t have time for a longer explanation at the moment, but:
Breathe Easy
MacVim is nearly completely independent from (terminal) vim. They do share your vimrc, but MacVim also reads gvimrc, and uses its own runtime directories.
You’re not wasting much space, and it would be a Bad Idea™️ to mess with the system installation of some programs.
I need a debug version of glibc.I have some doubts regarding the installation of glibc-2.29 from source in kali linux.Based on the post https://www.tldp.org/HOWTO/html_single/Glibc-Install-HOWTO/,
To install glibc you need a system with nothing running on it, since many processes (for example sendmail) always try to use the library and therefore block the files from being replaced. Therefore we need a "naked" system, running nothing except the things we absolutely need. You can achieve this by passing the boot option
init=/bin/bash to your kernel.
it says that we need to install the glibc in a single usermode environment.In another post https://www.tldp.org/HOWTO/Glibc2-HOWTO-5.html
single usermode is not required for installation but backing up the old libraries.I dont know which one to follow.Can anyone help?
I found that we can use glibc without installing but building from source by adding '-g' flag in ./configure and setting LD_LIBRARY_PATH varible as follows after building
LD_LIBRARY_PATH=/path/to/the/build_directory gdb -q application
Note: this solution only works when the system GLIBC and the built-from-source GLIBC exactly match, as explained here.
I need a debug version of glibc.
Most distributions supply ready-made libc6-dbg packages that match your installed GLIBC. This is the best approach unless you are a GLIBC developer (or plan to become one).
I have some doubts regarding the installation of glibc-2.29 from source in kali linux.
Installing / replacing system libc is almost guaranteed to render your system unbootable if there are any mistakes. Recent example.
Before you begin, make sure you either know how to recover from such a mistake (have a rescue disk ready and know how to use it), or you have nothing of value on the system and can re-image it from installation media in the likely case that you do make a mistake.
The document you referenced talks about upgrading from libc5 to libc6. It was last updated on 22 June 1998, and is more than 20 years old. I suggest you find some more recent sources. Current documentation does suggest doing make install while in single-user mode.
I'm fairly experienced in Python, but a total noob on OSX. I've been using it for a couple of years on windoze then linux OK. Unfortunately I now need to port stuff to an iMac with El Capitain 10.11.3.
I checked out the guides before I tried to install it, in particular the issues around the versions of the tk/tcl libraries. I therefore visited ActiveState, and installed the latest version, then python 3.5.1. This is something that I have never done with 'doze or 'nux.
Simple text programs run OK, whether from IDLE/run, python3 progname, or shebang. The following simple tki program also runs OK, also from those three launch methods.
#! /Library/Frameworks/Python.framework/Versions/3.5/bin/python3
import tkinter as tki
def cmd():
print('doing command')
exit()
root = tki.Tk()
but = tki.Button(root, text='hello', command=cmd)
but.grid()
root.mainloop()
But when I try to run a sizeable tki based app, it complains that it has found classes TKApplication, TKMenu, TKContentView and TKWindow in both /Library/Frameworks/... which is where python is installed, and /System/Library/Frameworks/... which is presumably where the tcl/tk install from ActiveState went. It then exits with a segfault 11. The app is basically low level tk stuff, just a lot of it. Both locations include /Versions/8.5/ in the name.
I suspect the key is that it says which one of each of those TKxx will be used is undefined. Perhaps it's picking a mix of those, and so when they go to talk to each other, they are not in predictable locations.
Is this what's happening? Why does the simple tk app work but not the complex one, is it the size, or the need to use several classes from different libraries?
As there seems to be a set of tk libraries in the python tree, I'm inclined to remove the ActiveState ones. Is this sensible? How do I do this (Mac noob alert)!
I don't seem to be able to find a definitive 'how to' install python 3 on OSX. Not found too much specifically for 10.11.3, could this OSX version need a different procedure?
As you may tell from the screenshot I have included. I'm trying to get rbenv ruby 2.1.2 to replace the system ruby on Raspberry pi and there's no earthly reason it should still be pointed at 1.9.3!
Thanks to a lot of help from #dteoh, I was finally able to ascertain how this happened.
As it turns out, when I was doing my rbenv install 2.1.2 the process was taking so long I went to bed. I didn't put it together until the ~/.rbenv/shims was empty, but one of my digital clocks was blinking. Apparently that night I lost power in the night, which put it in some strange state.
The fix was blowing away the Ruby version and doing another (long) but successful Ruby build.
Thank you for your patience in this RARE but troublesome situation.
run rbenv version, you may find that a env var named RBENV_VERSION was set, after unsetting the env var using export RBENV_VERSION=, you will have the correct ruby version
For some reasons I had to uninstall/reinstall homebrew on my MacBook Pro (OS X 10.9).
I wanted to reinstall swi-prolog via homebrew (like I did the first time). The installation process worked without any visible issue, but now every time in want to run swi-prolog in my terminal this message appears: "Abort trap: 6"
I have no clue of what that means. There is a lot of things about this message on the internet but I can't relate them with my issue.
Could you help me?
For some reason it seems that the symbolic link doesn't work correctly. In my version of swi-prolog I had to type the full path to get it to run correctly, for example:
/usr/local/Cellar/swi-prolog/6.4.1/bin/swipl
Remember to keep in mind that your version number could be different than what I have listed above.
This became extremely tedious however to remember when having to type it every time I wanted to use Prolog, so I was able to add it as an alias with this command:
alias prolog='/usr/local/Cellar/swi-prolog/6.4.1/bin/swipl'
From that point on in the current terminal session, I was able to open it by just typing:
prolog
This way is obviously much easier, however you need to remember to change the alias if the version also changes.
The command "prolog" can of course be exchanged with any command you wish to use.
Keep in mind, if you want this command to be more permanent (as in after you close the terminal window), you will need to also add the above alias command to the ~/.bash_profile file so it runs on startup.
Hope this helps!
if i am not mistaken, swi-prolog required x11 to run but now in mac 10.9, there were no x11 anymore instead of xQuartz.
i am not sure if this is the real problem now.