The Gems Mac OS

Posted on  by

Steven takes the Gems out for a camping trip and tells them spooky stories around the camp fire. The Gems don't give him much of a reaction, but they do tell him a spooky story of their own about a monster who turns bad Gems into glass and shatters them. Pearl assures a terrified Steven that it's just a story, but suddenly people around Beach. We recommend not installing Ruby gems globally to avoid file permissions problems and using sudo. On Mojave (10.14) Because of SIP Protections in Mojave, run: sudo gem install bundler sudo gem install-n /usr/local/bin/ jekyll Before Mojave (gem install bundler jekyll.

This Page provides basic information about installing Ruby and RubyGems on various platforms ( the recommended way to install it via each platform is listed below instead of every possible way to install it. Check for Alternative methods at the links provided or others acquired by any other means. ).

Open up the 'Software Center' app from your launcher and type in `RubyGems` without quotes into the application search box at the top right, and press [enter]. RubyGems then can be installed by just clicking on the button labeled 'Install', thats it. Be sure to Follow any extra instructions from the Software Center should there be any during or after installation. Alternatively you can install from a terminal as well, use the 'apt-get 'command-line tool to install Ruby and RubyGems, as shown below.

  • Install the full Ruby package and RubyGems: $ sudo apt-get install ruby-full rubygems

Debian Linux * Ubuntu is built onto of a Debian foundation, so the same steps and options as Ubuntu above for the Alternative install method, or by GUI using a Debian graphical package manager such as 'Synaptic' instead of Software Center, or by what ever other means you tend to normally add and remove installed from your Debian system, thats well past the scope of this wiki page, for further help with installing software on Debian you can begin reading here and/or join Debian's support channel for real time text group chat with individuals willing to help you if they are able. [on OFTC Internet Relay Chat Link Address]

Mac's with version 10.5 Leopard or higher already have Ruby and RubyGems installed, Ruby and RubyGems update instructions are found here at the Homebrew for OS X page, as well as instructions for adding Homebrew to your OS X machine if you do not already have it installed.

If you are using an earlier version of Mac OS like 10.3 or 10.4, try following any directions at RubyGems to see if your version is still supported officially or not, plus there many community workarounds and tips for those wishing to still make use of OS X or Pure Darwin sometimes registers here too on older machines or newer machines both.

Test to ensure that the gem command is in your path: $ which gem

If the command is not found, then update your PATH variable accordingly. For example, you can update your .bashrc file with the following line: export PATH=$PATH:/var/lib/gems/1.8/bin

Download and install Ruby Installer for Windows. The installer already includes RubyGems.

Be sure you use the Ruby-enabled command prompt window when you later install and use vmc. You access this command prompt from the Windows Start menu ( All Programs > Ruby <version> > Start Command Prompt with Ruby).

Finally, update RubyGems from the Ruby Command Prompt:prompt> gem update --system

From a terminal, use the yum command-line tool to install Ruby and RubyGems.Install Ruby like shown below:

$ sudo yum install ruby

If you are using RedHat Enterprise Linux 6, enable the Optional channel for your host by logging into Red Hat Network (RHN).

Install RubyGems:

$ sudo yum install rubygems

From a terminal, use the yast command-line tool to install Ruby and RubyGems.Install Ruby and RubyGems like shown below:

$ yast -i ruby$ yast -i rubygems

Retrieved from 'https://wiki.openstack.org/w/index.php?title=RubyGems&oldid=127118'

Question or issue on macOS:

I need to install the JSON gem to start my app but I get the error below whenever I try to install the json gem. Can anyone help me out. I’m using rails 2.2.2 and gems 1.3.1.

How to solve this problem?

Solution no. 1:

With Mavericks, you can solve this problem by installing the Xcode Command Line Tools from the command line like this:

xcode-select --install

Update:
Don’t forget to accept the license agreement after you install or update:

sudo xcodebuild -license

Solution no. 2:

If you have this problem:

and you are using a Mac with OS X (tested with 10.8.1 Mountain Lion), you need to download Xcode from the Mac App Store (or from developer.apple.com if you have a dev account – it’s free BTW and you can download a DMG installer)

The latest Xcode versions (I’m using Xcode 4.4.1) does NOT include command line tools. Now you need to install this additional package inside Xcode. Once done, your problem is fixed.

To do that, open Xcode, go to Preferences > Downloads > Components. Install “Command Line Tools”. You’re done. Now you can install the json Ruby gem.

Solution no. 3:

You are missing the ruby development headers. To install these on an OS like ubuntu you should use:

Solution no. 4:

The ruby headers don’t come installed with the base ruby install with Mac OS X. These can been found on Mac OS X Install Disc 2 by installing the XCode Tools.

Once installed, all was well!

UPDATE As of at least OS X 10.7.3 this is no longer a problem, it “just works”

Solution no. 5:

Installing Xcode command line tools… should fix this issue.

Solution no. 6:

It turns out certain gems require some ruby header files to install properly. These header files do not ship with Lion (OSX 10.7).

It also turns out Xcode 4 (latest release) also does not install these header files. I tried this.

Solution – Assuming you are on Mac OS X (you appear to be based on the terminal output). To get it working I installed gcc with some developer tools from the following page

  • Visit https://github.com/kennethreitz/osx-gcc-installer
  • Scroll down to the README and download the appropriate package (for OSX 10.7 or 10.6)
  • Open the .pkg file and run the installer.

You should be able to install the gems now, either with gem install or bundle install.

Overhead If you are worried about the other junk this comes with, here is a summary.

  • gcc – useful
  • make – useful
  • clang – useful for ObjectiveC
  • Developer CLI Tools (purge, etc) – useful?
  • DevSDK (headers, etc) – what you need

Solution no. 7:

A simple google search reveals this:

If you get the can’t find header files for ruby error message when trying to build an extension or a gem, it means that Ruby cannot locate its header files.

Header files are not delivered by default with Mac OS X, you need to install the Xcode Tools package after the installation. You can find it in the Optional Installs / Xcode Tools directory on the Leopard DVD.

Solution no. 8:

If you use homebrew, run brew doctor. You might find out that the required gcc libraries for compilation are outdated and/or missing.

For Lion and Mountain Lion users, Apple now provides an official Command Line Tools for Xcode package that you can install without needing to install Xcode itself! You can download it from Apple’s developer site https://developer.apple.com/downloads/index.action. If you still need gcc-4.2, and you use Homebrew, you can install it using the apple-gcc42 package from homebrew/dupes.

Solution no. 9:

I had the same problem.

Here is my adventures (hope it will be useful):

To fix it I’ve done many manipulations 🙂

I’m using Fedora Core.
I’ve fixed it this way:

I’ve installed rails-devel:


sudo yum install rails-devel

tried again:


sudo gem install rails

The Gems Mac Os Download

but I’ve got another problem:


Building native extensions. This could take a while… ERROR: Error
installing rails: ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb creating Makefile

make gcc -I. -I/usr/lib/ruby/1.8/i386-linux
-I/usr/lib/ruby/1.8/i386-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fno-strict-aliasing -fPIC -O3 -Wall -c parser.c
make: gcc: Command not found

So I’ve installed GCC:


sudo yum install gcc

tried again:


sudo gem install rails

Now I’ve got another problem ))) :


Installing ri documentation for json-1.6.3… ERROR: While generating
documentation for json-1.6.3 … MESSAGE: no such file to load —
irb/slex … RDOC args: –ri –op
/usr/lib/ruby/gems/1.8/doc/json-1.6.3/ri –title JSON implemention for
Ruby –main README.rdoc ext/json/ext ext lib README.rdoc –title
json-1.6.3 Documentation –quiet

So installed ruby-irb:


sudo yum install ruby-irb

tried again:


sudo gem install rails
Successfully installed rails-3.1.3

That’s all )))

Mac

Solution no. 10:

Here is my solution:

The Gems Mac Os 11

My setup:

The Gems Mac Os X

Hope this helps!