- MAC OS RUBY UPDATE FOR MAC OS X
- MAC OS RUBY UPDATE INSTALL
- MAC OS RUBY UPDATE UPDATE
- MAC OS RUBY UPDATE SOFTWARE
Don't do it! You may leave the system in a broken or compromised state. In this case, you need sudo because you're altering system files that are managed by the OS.
MAC OS RUBY UPDATE INSTALL
But don't do this! $ sudo gem install railsĪny time you are about to run sudo, you should stop and ask if you're about to shoot yourself in the foot. You can install gems as a superuser to override the permissions restriction. Unix-based systems are powerful, so there's a workaround. You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory If you try to install a gem, for example gem install rails, you'll get a permissions error: ERROR: While executing gem. Ordinary users are not allowed to write to it (and you really shouldn't alter this folder). That directory is owned by root, the system superuser. If you use the Mac system Ruby, running gem install will try to save gems to the system Ruby directory /Library/Ruby/Gems/2.6.0. Most Ruby projects use at least a few gems.
MAC OS RUBY UPDATE SOFTWARE
RubyGems are the ready-made software libraries that make development easy and fun in Ruby. For a guide that compares version managers and shows the best way to install Ruby, see my article Install Ruby on a Mac.īut why not use the macOS default Ruby? Let's take a look at the reasons why it's a bad idea to use the Mac default Ruby for development.
MAC OS RUBY UPDATE UPDATE
Ruby for developmentįor developing projects with Ruby, you should Install Ruby with Homebrew or use a version manager such as asdf, chruby, rbenv, or rvm.Ī version manager helps if you're juggling multiple projects and can't update all at once. It's fine to use the system Ruby for running sysadmin scripts, as long as you don't alter the system Ruby by attempting to update it or add gems.īut you don't want to use it when you are developing projects in Ruby. If you see /usr/bin/ruby, it is the pre-installed macOS system Ruby. Use the which command to see where Ruby is installed: $ which ruby MacOS comes with a "system Ruby" pre-installed. I'm running 10.11.Someone may have once told you, "Don't use the system Ruby." It's good advice, but why? Let's find out.
MAC OS RUBY UPDATE FOR MAC OS X
Puzzled by the references to built for Mac OS X 10.12 which doesn't officially come out for a week or so. dylib make : *** Trace / BPT trap : 5 make : *** Waiting for unfinished jobs. 1 /./ miniruby ( which was built for Mac OS X 10.12 ) Expected in : / usr / lib / libSystem. dylib dyld : Symbol not found : _clock_gettime Referenced from : / private / var / folders / lj / knd圆mlx3flcd0gl8xp7_680000gn / T / ruby - build. log Last 10 log lines : Referenced from : / private / var / folders / lj / knd圆mlx3flcd0gl8xp7_680000gn / T / ruby - build. 6 using ruby - build 20160602 ) Inspect or clean up the working tree at / var / folders / lj / knd圆mlx3flcd0gl8xp7_680000gn / T / ruby - build. However if I cd /var/folders/_y/qc89fk7n3m1f1p5pt8kpsgvdv009dp/T/ruby-build.20160909110514.33878/ruby-2.3.1 and run make install it seems to install it successfully to ~/.rbenv/versions/Īny ideas or can I provide more information? Does installing ruby 2.3.1 this way cause any problems? make test also passed.
Perhaps antivirus or something like that is the culprit? I have checked and there is nothing strange about the perms of these files. miniruby : Permission denied make : *** Error 1 make : *** Waiting for unfinished jobs. log Last 10 log lines : compiling enc / unicode. 6 using ruby - build 20160602 ) Inspect or clean up the working tree at / var / folders / _y / qc89fk7n3m1f1p5pt8kpsgvdv009dp / T / ruby - build.