Skip to main content

Questions tagged [rubygems]

RubyGems is a package management tool for the Ruby programming language. It allows users to download and update Ruby libraries, and provides automatic dependency resolution.

Filter by
Sorted by
Tagged with
1094 votes
13 answers
281k views

How to make --no-ri --no-rdoc the default for gem install?

I don't use the RI or RDoc output from the gems I install in my machine or in the servers I handle (I use other means of documentation). Every gem I install installs RI and RDoc documentation by ...
Ricardo Acras's user avatar
1052 votes
8 answers
593k views

Ruby: How to install a specific version of a ruby gem?

Using the command-line gem tool, how can I install a specific version of a gem?
mjs's user avatar
  • 64.7k
645 votes
13 answers
273k views

How to remove RVM (Ruby Version Manager) from my system

How can I remove RVM (Ruby Version Manager) from my system?
lucianosousa's user avatar
  • 8,264
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 ...
Gaurav Taywade's user avatar
536 votes
33 answers
315k views

Error installing mysql2: Failed to build gem native extension

I am having some problems when trying to install mysql2 gem for Rails. When I try to install it by running bundle install or gem install mysql2 it gives me the following error: Error installing ...
spacemonkey's user avatar
  • 19.9k
517 votes
19 answers
317k views

Error while installing json gem 'mkmf.rb can't find header files for ruby'

For context, it on a remote server which has a firewall. I'm setting up my environment through a proxy. I have ruby 1.8.7. When I try to gem install.. sudo gem install --http-proxy <host address&...
Navneet's user avatar
  • 9,740
483 votes
38 answers
704k views

You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)

below is what I need to do. To run the specs, you'll need to install RSpec. First, run gem install bundler in the root directory of your project. Then, run bundle install. To run a single spec file, ...
user9426236's user avatar
  • 4,831
472 votes
10 answers
234k views

How to install gem from GitHub source?

I would like to install gem from the latest GitHub source. How do I do this?
Vojto's user avatar
  • 6,941
465 votes
9 answers
327k views

How to downgrade or install an older version of Cocoapods

How can I downgrade Cocoapods to an older version, or how can I install an older version of Cocoapods?
a fair player's user avatar
449 votes
6 answers
180k views

How can I specify a local gem in my Gemfile?

I'd like Bundler to load a local gem. Is there an option for that? Or do I have to move the gem folder into the .bundle directory?
picardo's user avatar
  • 24.8k
446 votes
30 answers
1.1m views

How do I install CocoaPods?

I referred to many links and tried, but I had no success. I read CocoaPods documents and many times tried to install, but I always failed because of the starting steps. I found one error whereby I can'...
kagmanoj's user avatar
  • 5,218
418 votes
7 answers
379k views

Uninstall old versions of Ruby gems

I have several versions of a Ruby gem: $ gem list rjb (1.3.4, 1.3.3, 1.1.9) How can I remove old versions but keep the most recent?
Philippe Blayo's user avatar
417 votes
12 answers
353k views

How to find where gem files are installed

I can finds gems that are installed using gem list, but it doesn't show me where the gems are installed. How can I find where the gems are, and how can I know before installing a gem where it will be ...
ironsand's user avatar
  • 14.9k
366 votes
9 answers
381k views

How can I install a local gem?

If I download a .gem file to a folder in my computer, can I install it later using gem install?
hectorsq's user avatar
  • 76.2k
363 votes
18 answers
250k views

gem install: Failed to build gem native extension (can't find header files)

I am using Fedora 14 and I have MySQL and MySQL server 5.1.42 installed and running. Now I tried to do this as root user: gem install mysql But I get this error: Building native extensions. This ...
Tim's user avatar
  • 13.2k
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 ...
kerokero's user avatar
  • 3,271
297 votes
9 answers
182k views

Update just one gem with bundler

I use bundler to manage dependencies in my rails app, and I have a gem hosted in a git repository included as followed: gem 'gem-name', :git => 'path/to/my/gem.git' To update this gem, I execute ...
sailor's user avatar
  • 7,964
279 votes
18 answers
202k views

find_spec_for_exe': can't find gem bundler (>= 0.a) (Gem::GemNotFoundException)

I used sudo bundle install and that might be the cause of the issue? Now I have: gem -v 2.6.14 ruby -v ruby 2.3.5p376 (2017-09-14 revision 59905) [x86_64-darwin15] jekyll -v jekyll 3.6.2 bundle -...
Alvaro's user avatar
  • 41.4k
266 votes
30 answers
205k views

bundle install fails with SSL certificate verification error

When I run bundle install for my Rails 3 project on Centos 5.5 it fails with an error: Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: ...
mrzasa's user avatar
  • 23.2k
260 votes
27 answers
180k views

unable to install pg gem

I tried using gem install pg but it doesn't seem to work. gem install pg gives this error Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ...
Rohit's user avatar
  • 5,701
247 votes
9 answers
302k views

How to upgrade rubygems

I need to upgrade gems to 1.8 i tried installing the respective debian packages but it seems its not getting upgraded anujm@test:~$ dpkg -l |grep -i rubygem ii rubygems ...
Anuj's user avatar
  • 9,462
241 votes
25 answers
148k views

rmagick gem install "Can't find Magick-config"

I get the error shown below when attempting to install the rmagick gem. I am on Snowleopard 10.6 using RVM, Ruby 1.9.2-head and Rails 3.05. Responses to similar questions recommended installing ...
Joe's user avatar
  • 3,392
240 votes
20 answers
269k views

How do I update Ruby Gems from behind a Proxy (ISA-NTLM)

The firewall I'm behind is running Microsoft ISA server in NTLM-only mode. Hash anyone have success getting their Ruby gems to install/update via Ruby SSPI gem or other method? ... or am I just being ...
Brett Veenstra's user avatar
238 votes
11 answers
116k views

Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)

When I want to create a Ruby on Rails project, I get the message below. /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:55: uninitialized constant ActiveSupport::...
Sokmesa Khiev's user avatar
236 votes
24 answers
159k views

Ignoring GEM because its extensions are not built

On both my work and home computers, I recently upgraded Ruby to 2.3.1, using ruby-install. I use chruby as my Ruby switcher. I started seeing this warning in my terminal: Ignoring bcrypt-3.1.11 ...
Phillip Longman's user avatar
229 votes
20 answers
96k views

Installing libv8 gem on OS X 10.9+

I'm trying to install libv8 3.16.14.3 but getting an error on OSX Mavericks using latest stable rvm and ruby-1.9.3-p125. This is the output of running the command 'gem install libv8': ~/src(branch:...
tanookiben's user avatar
  • 24.1k
216 votes
11 answers
93k views

Unresolved specs during Gem::Specification.reset:

When launching Guard, I'm getting this output: $ guard WARN: Unresolved specs during Gem::Specification.reset: lumberjack (>= 1.0.2) ffi (>= 0.5.0) WARN: Clearing out unresolved ...
reneruiz's user avatar
  • 2,445
213 votes
7 answers
138k views

Understanding the Gemfile.lock file

After running the bundle install command, 'Gemfile.lock' is created in the working directory. What do the directives inside that file mean? For example, let's take the following file: PATH remote: ...
Shamaoke's user avatar
  • 6,272
211 votes
18 answers
288k views

Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)

Ruby 1.9.3 The part of Gemfile #............... gem "pony" gem "bcrypt-ruby", :require => "bcrypt" gem "nokogiri" #.................. When I'm trying to install gems, I get an error alex@...
Alexandre's user avatar
  • 13.2k
208 votes
24 answers
106k views

Library not loaded: libmysqlclient.16.dylib error when trying to run 'rails server' on OS X 10.6 with mysql2 gem

I've been struggling with this for some time. I've installed Rails 3, gem, mysql on my Snow Leopard machine. All was going well until I created my first project and tried to run rails server Upon ...
Jonty Brook's user avatar
  • 3,027
208 votes
9 answers
55k views

Installing CocoaPods: no response

Trying to install CocoaPods from the terminal: $ sudo gem install cocoapods After entering my root password, nothing happens. How can I debug that?
Pierre de LESPINAY's user avatar
204 votes
13 answers
136k views

Uninstall all installed gems, in OSX?

There are instances where I would like to revert and uninstall all previous gem installations. For instance, I needed to assist a friend migrate their rails development machine to use RVM. As they ...
crftr's user avatar
  • 8,518
202 votes
16 answers
121k views

Rails: Installing PG gem on OS X - failure to build native extension

It seems many others have had problems installing the pg gem. None of the solutions posed for others have worked for me. I have tried to install the pg gem and postgres.app. The pg gem won't install....
Mel's user avatar
  • 2,775
197 votes
11 answers
235k views

List of installed gems?

Is there a Ruby method I can call to get the list of installed gems? I want to parse the output of gem list. Is there a different way to do this?
Prakash Raman's user avatar
192 votes
13 answers
125k views

You have already activated X, but your Gemfile requires Y

When running rake I get this error: You have already activated rake 0.9.2, but your Gemfile requires rake 0.8.7. Consider using bundle exec. Using bundle exec rake instead of just rake seems to ...
meow's user avatar
  • 27.9k
190 votes
13 answers
156k views

warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

Every time I run this command rails server: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 I searched for a solution here and they said to type: chmod go-w /usr/local/...
Xandman's user avatar
  • 1,963
186 votes
13 answers
217k views

You don't have write permissions for the /var/lib/gems/2.3.0 directory

I have ruby installed on my ubuntu 16.04. $which ruby /usr/bin/ruby $ruby -v ruby 2.3.0p0 (2015-12-25) [x86_64-linux-gnu] $gem install bundler ERROR: While executing gem ... (Gem::...
derek's user avatar
  • 9,966
186 votes
4 answers
61k views

What does tilde-greater-than (~>) mean in Ruby gem dependencies? [duplicate]

What does ~> mean in the context of Ruby gem depenedencies? For example, when opening a legacy project in the RubyMine IDE, I get this message Gems required for project are not attached: arel (~> ...
jwfearn's user avatar
  • 29.3k
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 ...
Himanshu Yadav's user avatar
179 votes
7 answers
124k views

How do I specify local .gem files in my Gemfile?

I have a couple of gem files which I install via gem install xx.gem. Can I tell Bundler to use them? Or do I have to specify the source path?
ddayan's user avatar
  • 4,142
179 votes
8 answers
129k views

The 'json' native gem requires installed build tools

I have ruby 1.9.2p180 (2011-02-18) [i386-mingw32] installed on my windows 7 machine. Now I tried to install the JSON gem using the command, "gem install json" and got the following error. ERROR: ...
sridhar249's user avatar
  • 4,825
177 votes
23 answers
98k views

Can't find the PostgreSQL client library (libpq)

I'm trying to install PostgreSQL for Rails on Mac OS X 10.6. First I tried the MacPorts install but that didn't go well so I did the one-click DMG install. That seemed to work. I suspect I need to ...
Jason Swett's user avatar
  • 44.7k
176 votes
9 answers
418k views

Could not locate Gemfile

I'm certainly no Ruby developer but I have an application on my server using Ruby, Gems, and Bundler. I am trying to install another Ruby on under a different user account but on the same VPS. When I ...
ianyoung's user avatar
  • 2,975
174 votes
2 answers
42k views

How to get a specific "commit" of a gem from github?

I'm using rails_admin, and since it is in (very) active development, bugs turn up every now and then. There are no versions for the gem as far as I can tell, for the gem in github, so I can't use the ...
Zabba's user avatar
  • 65.1k
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 ...
raphael_turtle's user avatar
166 votes
4 answers
90k views

Where do gems install?

I'm trying to edit one of the gem's config files and I can't find it. I'm not sure how I did this in the past.
Trip's user avatar
  • 27k
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 ...
Dave Long's user avatar
  • 9,719
162 votes
4 answers
51k views

Set up RSpec to test a gem (not Rails)

It is pretty easy with the added generator of rspec-rails to set up RSpec for testing a Rails application. But how about adding RSpec for testing a gem in development? I am not using jeweler or such ...
medihack's user avatar
  • 16.5k
162 votes
3 answers
32k views

Ruby : How to write a gem? [closed]

I'd like to write a package for Ruby and make it available as a gem. What are the tools, steps and pitfalls ? Are there any good tutorials, screencasts, etc., which helped you learning how to do it ?
glmxndr's user avatar
  • 46.2k
157 votes
19 answers
93k views

Nokogiri installation fails -libxml2 is missing

I always worked my way around Nokogiri installation issues by following the documentation in the "Installing Nokogiri" tutorial. But this time, even after installing all the dependencies, Nokogiri ...
Rohit A.'s user avatar
  • 1,775

1
2 3 4 5
341