All Questions
2,086
questions
642
votes
32
answers
607k
views
How to install a gem or update RubyGems if it fails with a permissions error
I'm trying to install a gem using gem install mygem or update RubyGems using gem update --system, and it fails with this error:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't ...
327
votes
9
answers
109k
views
How to avoid "cannot load such file -- utils/popen" from homebrew on OSX
I'm getting an error when I run brew in the terminal:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such ...
316
votes
17
answers
73k
views
gem eventmachine fatal error: 'openssl/ssl.h' file not found
Just installed El Capitan and can't install gem eventmachine 1.0.7. openssl is at 1.0.2a-1. Tried to use --with-ssl-dir but it seems ignored.
Reported it to their github repo as well.
Any ...
305
votes
25
answers
408k
views
Failed to build gem native extension (installing Compass)
When I attempt to install the latest version of compass (https://rubygems.org/gems/compass/versions/1.0.0.alpha.17), I get the following error.
ERROR: Error installing compass:
ERROR: Failed to ...
268
votes
20
answers
79k
views
Running pod setup gives me "bad interpreter: No such file or directory" error
Recently I tried to do pod setup and I get this error:
-bash: /usr/local/bin/pod: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory
I followed Ray Wenderlich's guide to install ...
201
votes
9
answers
224k
views
How to resolve "gpg: command not found" error during RVM installation?
I have a new mac pro (OS X 10.9.5) that I get to set up from scratch. I want to install RVM and the first thing it says to do is:
Install mpapis public key (might need gpg2 and or sudo)
gpg --...
189
votes
36
answers
134k
views
how to solve "ruby installation is missing psych" error?
I used rvm to install ruby 1.9.3. even though it was successfully installed, it complained about libyaml. and now every time i wanna install a gem (say rails) this warning shows up:
It seems your ...
188
votes
22
answers
54k
views
RMagick installation: Can't find MagickWand.h
Updating RMagick and Imagemagick is a painful expierence. I have updated the Imagemagick version on my mac (MacOS El Capitan Version 10.11.5) with homebrew for one project in Ruby 2.3 to 6.9.5-9
$ ...
184
votes
15
answers
111k
views
Can't install gems on OS X "El Capitan"
I am not able to install and run fakes3 gem on El Capitan Beta 5.
I tried:
sudo gem install fakes3
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/fakes3
Then ...
171
votes
5
answers
23k
views
ZSH complains about RVM __rvm_cleanse_variables: function definition file not found
When using the latest ZSH and RVM on Mac OS X 10.7.4 ZSH complains about this:
__rvm_cleanse_variables: function definition file not found
171
votes
8
answers
165k
views
'sudo gem install' or 'gem install' and gem locations
Running 'sudo gem list --local' and 'gem list --local' give me differing results. My gem path is set to my home folder and only contains the gems from 'gem list --local'.
It's probably not good to ...
165
votes
8
answers
158k
views
Removing all installed Gems and starting over
I recently started learning Ruby and Ruby on Rails, and have watched a plethora of getting started materials. I have been finding lately that I keep getting errors where gems won't install or they ...
163
votes
33
answers
79k
views
Why does installing Nokogiri on Mac OS fail with libiconv is missing?
I've been trying to install Nokogiri on Mac OS 10.9.3 and whatever I try, the install fails in the end with the following error message:
$ sudo gem install nokogiri -- --with-xml2-include=/usr/local/...
153
votes
2
answers
126k
views
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted [duplicate]
I just updated my Mac to OSX 10.11 El Capitan and some gems didn't remain.
The problem arose when I tried to run installations of different gems... e.g.:
> sudo gem install compass
Once I ...
128
votes
28
answers
114k
views
rails + MySQL on OSX: Library not loaded: libmysqlclient.18.dylib
I'm just starting out with Ruby (and rails). I did the setup according to http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:ruby gems, using rvm. I have everything working well with sqlite....
125
votes
8
answers
95k
views
How to resolve "You need to have Ruby and Sass installed and in your PATH for this task to work" Warning?
I am in the process of setting up a new Mac for work. I have installed Grunt & Grunt CLI globally. Then I did a npm install inside a project folder to install all dependencies.
No problems so ...
110
votes
30
answers
54k
views
Error to install Nokogiri on OSX 10.9 Maverick?
I upgraded my OSX (Lion) to Mavericks and I can't install Nokogiri for my projects.
I already install XCode 5.0.1, Command Line Tools (using xcode-select --install), and already installed libxml2 ...
108
votes
9
answers
158k
views
How to update Ruby to 1.9.x on Mac?
I have created a new user account on my mac and I am trying to update to the current version of ruby on it (1.9.2) from the snow leopard default of 1.8.7. Can somebody point me to tutorial or explain ...
107
votes
11
answers
52k
views
Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply_definedsuppress'
I was trying run gem install json and got the following error
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/...
106
votes
6
answers
185k
views
How to update Ruby with Homebrew?
I want to know how to update to the latest stable version of Ruby with Homebrew. I am not interested in using RVM. Thanks.
105
votes
10
answers
150k
views
How can I switch to ruby 1.9.3 installed using Homebrew?
I have installed ruby 1.9.3 using hombrew
brew install ruby
But default 1.8.7 is still used. How can I switch osx to use 1.9.3 as default ruby?
103
votes
6
answers
64k
views
RVM is not working in ZSH
I'd like to try out the ZSH shell on my Mac, but I also do a lot of Ruby and Rails development, so I use RVM quite a bit too. The problem is that I can't seem to get RVM to work in ZSH, and it's ...
89
votes
11
answers
47k
views
Invalid active developer path on MAC OS X after installing Ruby
I get this error:
xcrun: error: invalid active developer path (/Applications/Xcode.app), missing xcrun at: /Applications/Xcode.app/usr/bin/xcrun
This solution works, but the error occurs again after ...
89
votes
3
answers
94k
views
How do you uninstall rbenv on macOS?
How do you uninstall rbenv on macOS? My version of rbenv is messed up, and brew uninstall rbenv isn't working because brew relies on ruby.
86
votes
19
answers
173k
views
ERROR: While executing gem ... (Gem::FilePermissionError)
I have checked all the other similar answers and none was exactly like mine, neither did any of those solutions work for me.
gem environment and sudo gem environment give the same result:
RubyGems ...
85
votes
6
answers
146k
views
How do I install ruby gems on Mac
How do I install RubyGems on my Mac?
I tried to run $ gem install rubygems-update with no luck. It returns:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write ...
83
votes
16
answers
38k
views
Mac user and getting WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.7.3
I have done all kinds of research and tried many different things. I know this question has been answered many times, but none of the suggested solutions are working for me.
After upgrading to Lion I ...
83
votes
14
answers
29k
views
Why can't I install Rails on Lion using RVM?
I'm running into issues trying to install Rails on OS X Lion using RVM.
So far, I have done the following:
Installed Mac OS X Lion Version 10.7 (Build 11A459e).
Installed XCode 4.1 Developer Preview ...
80
votes
10
answers
184k
views
Why do I get a "permission denied" error while installing a gem?
I'm attempting to install Jekyll. After running gem install jekyll I get this error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /usr/local/lib/ruby/gems/2.0.0/gems/jekyll-...
75
votes
5
answers
46k
views
Ruby Gems Not Installing, Hangs While Getting Gems
I recently cleared out all of my ruby install and installed form sources using the instructions at hivelogic
I have have been able to install a few gems, but most of the time, "sudo gem install rails"...
73
votes
18
answers
58k
views
nokogiri gem installation error
I know there are a lot of questions about this gem but no answer has worked for me.
When I run in SSH gem install nokogiri I get this error:
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-unknown-...
72
votes
10
answers
21k
views
rails console doesn't load due to libreadline
I have recently reinstalled ruby 2.1.2 like so since I wanted to install a gem (ruby-debug-ide)
sudo rvm reinstall 2.1.2 --disable-binary --with-gcc=gcc-4.2
Since then, I can't load my console using ...
69
votes
4
answers
100k
views
Can I upgrade to the current version of Ruby (2.2.3) on OS X v10.6.8?
I'm looking at "Install Ruby on Rails · Mac OS X Yosemite", and in the instructions it says to update your OS which I don't really want to do because my computer is getting old.
I also found "How to ...
67
votes
6
answers
53k
views
Insecure world writable dir /Users/username in PATH, mode 040777 when running Ruby commands
When I run Ruby commands like gem -v I get this error:
/Users/kristoffer/.rvm/rubies/ruby-1.9.2-p180/bin/gem:4:
warning: Insecure world writable dir
/Users/kristoffer in PATH, mode 040777
...
66
votes
17
answers
65k
views
Ruby and "You must recompile Ruby with OpenSSL support or change the sources in your Gemfile"
Using rvm I upgraded my ruby to 1.9.3-p392, also added 2.0.0, anytime I try to use this version when I run my bundle command I get this error.
Could not load OpenSSL.
You must recompile Ruby with ...
65
votes
10
answers
33k
views
rbenv install --list does not list version 2.1.2
I installed rbenv via Homebrew on an OS X 10.9.3 MacBook Pro:
brew update
brew upgrade rbenv ruby-build
According to rbenv install --list on my laptop Ruby 2.1.0-dev is the latest.
64
votes
25
answers
31k
views
Error Installing Jekyll - Native Extension Build
I'm having some trouble installing jekyll. Can't quite figure out how to patch the missing link. I think it's an update to Ruby, but RVM is having trouble installing alternate versions of ruby as well....
64
votes
6
answers
67k
views
Bundle command not found mac
I'm using ruby, and I was given a zip file with some ruby programs and it says: inside the folder, run bundle install to install the packages required.
When I run the command in my terminal, it ...
63
votes
11
answers
71k
views
gem install fails with openssl failure
I tried to install cocoapods (http://cocoapods.org/) on my OSX Mountain Lion.
moshe-mbp:~ moshem$ gem install cocoapods
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
...
63
votes
8
answers
37k
views
How do I use RVM and create globally available gems?
I'm running Mac OSX 10.6.4 and have installed RVM. Its been great so far, I really love the way it lets me manage having multiple versions of rails and ruby on the same machine without headaches!
...
56
votes
11
answers
53k
views
How can I install Ruby 1.9.3 in Mac OS X Lion?
I am trying to install Ruby 1.9.3 but am having problems.
I installed RVM, then typed:
rvm install 1.9.3
The output says:
ERROR: Error running ' ./configure....
The log says:
configure: WARNING: ...
55
votes
1
answer
16k
views
fail to bundle install puma 4.3.5 or gem puma with ruby-2.6.6 on macos-10.15.6 [duplicate]
fail to bundle install puma 4.3.5 or gem puma with ruby-2.6.6 on macos-10.15.6
try to bundle dependencies for my project, but puma 4.3.5 occured an error.
someone know about this?
xxxxxxxxxxxx
here is ...
55
votes
8
answers
67k
views
Bundler cannot install any gems without sudo
I'm trying to install a rails app and every time I use bundle it fails without sudo. My current situation is that everything works as long as use sudo for everything, including rails. I don't think ...
54
votes
20
answers
101k
views
Homebrew install: Failed during: git fetch origin master:refs/remotes/origin/master -n --depth=1
I ran the following command on terminal (Mac El Capitan)
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
and got the following error message:
...
53
votes
12
answers
25k
views
Can't install mysql2 gem on macOS Sierra
I'm setting up my development environment in the new macOS Sierra .
First of all, I installed Rbenv, Ruby (2.3.1), Homebrew and so the latest version of MySQL (5.7.15).
$ brew install mysql
$ mysql....
51
votes
3
answers
28k
views
Why does Mac OS X come with ruby/rails?
Why does Mac OS X come with ruby and ruby on rails pre-installed? Does the OS actually use it at all? Can I update my Ruby, Rails or Gem versions safely without something spitting the dummy?
48
votes
7
answers
72k
views
Installing Ruby gems not working with Homebrew
The gems I install via sudo gem install ... can't be executed (I get a command not found).
They seem to install into /usr/local/Cellar/ which is Brew's install directory (also, the gems in /Library/...
48
votes
2
answers
20k
views
The command "ruby" does nothing on my Mac
I can't get the Ruby interpreter to run on either of my Macs (one MacBook and one MacBook Pro, both running Snow Leopard). When I run it, by typing ruby in Terminal, nothing happens. It just sits ...
45
votes
7
answers
46k
views
You may have encountered a bug in the Ruby interpreter or extension libraries
I have got a new MacBook, and are trying to install some pods.
I first did sudo gem install cocoapods on root, then did pod install in the directory I need the pods.
Got this error, and have no clue ...
44
votes
10
answers
32k
views
Rubygems do not install on OS X Lion
I used to have no problems at all with ruby, gems and all related stuff. But after installing X Code Developer Tools and upgrading to Lion the gems do not install.
I get the following error for ...