Open fsafq41 opened 12 months ago
gem
installs packages system-wide by default, which requires root permissions. I recommend using the --user-install
flag to install gems in your home directory instead:
$ gem install --user-install weblink
It will install the gem in ~/.gem/ruby/2.6.0
(depending on your Ruby version), and you can run it as follows:
$ ~/.gem/ruby/2.6.0/bin/weblink
For convenience, you can add ~/.gem/ruby/2.6.0/bin/
to your PATH
.
Thank you. The instructions above made the trick to bypass the previous error message. However, I am now having another error.
ERROR: Error installing weblink: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20231111-25447-1en0m7n.rb extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Looks like you need to install Command Line Developer tools first:
$ xcode-select --install
When trying to install on a mac apple silicon with a default ruby i obtain the following error message:
gem install weblink ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Any reason, why weblink (and related packages) tries to install directly into the ruby directory? Note: i tried a sudo install (not recommended at all, of course) and got other errors also...