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 had been previously using the system-wide gem, he was experiencing many headaches when working with multiple projects. Essentially, he was the poster-child … Read more

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. The first error I get is: An error occurred while installing pg (0.17.0), and Bundler cannot continue. Make … Read more

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 because its extensions are not built. Try: gem pristine bcrypt –version 3.1.11 Ignoring bcrypt-3.1.10 because its extensions are not built. Try: gem pristine … Read more

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: . specs: gem_one (0.0.1) GEM remote: http://example.org/ specs: gem_two (0.0.2) gem_three (0.0.3) gem_four (0.0.4) PLATFORMS platform DEPENDENCIES gem_two gem_one! What do ‘PATH‘, ‘GEM‘, ‘PLATFORMS‘ and … Read more

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 running this I get: jontybrook$ rails server /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.16.dylib (LoadError) Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle Reason: … Read more

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 specs. Please report a bug if this causes problems. What does this mean, and how do I fix it? Contents of Guardfile: guard ‘livereload’ do watch(%r{.+\.(css|js|html)$}) end guard ‘sass’, :input => … Read more

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:master) » gem install libv8 Fetching: libv8-3.16.14.3.gem (100%) Building native extensions. This could take a while… ERROR: Error installing therubyracer: ERROR: Failed to build gem … Read more

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::Dependencies::Mutex (NameError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’ from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support.rb:57 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’ from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’ from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails_generator.rb:31 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’ from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require’ from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/bin/rails:15 from /usr/bin/rails:19:in `load’ from /usr/bin/rails:19 What has gone wrong? How do … Read more

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 ImageMagick, which I successfully did. Other suggested installing the “libmagick9-dev library”, however, I can not figure out how to do this. I’m a new … Read more