This answer comes by way of piecing together bits from other answers – so to the previous contributors…thank you because I would not have figured this out.This example is based on the RHEL 7 AMI (Amazon Managed Image) 3.10.0-229.el7.x86_64.So by default as mentioned above the optional repository is not enabled. Don’t add another repo.d file as it already exists just that it is disabled.To enable first you need the name. I used grep to do this:grep -B1 -i optional /etc/yum.repos.d/*above each name will be the repo id enclosed in [ ] look for the optional not optional-sourceEnable the optional repo:yum-config-manager –enable Refresh the yum cache (not sure if this is necessary but it doesn’t hurt):sudo yum makecacheFinally, you can install ruby-devel:yum install ruby-develDepending on your user’s permissions you may need to use sudo.
Tag: Ruby
-
Fix RubyGems Postinstall Error
gem pristine --all --only-executables
-
compiler errors – Cannot compile ruby 1.9.3 – Stack Overflow
With Xcode 4.6 I was also getting this problem. I installed the command line tools which made gcc available in /usr/bin/gcc.
I managed to get it to work using:
rvm install 1.9.3 --with-gcc=gcc
NB. I dont have homebrew installed.
via compiler errors – Cannot compile ruby 1.9.3 – Stack Overflow.
-
当在 OS X 上编译部署 Ruby 时出现 “You have to install development tools first.” 错误时的解决方案
一般出现这个问题时在 Lion 、 Mt. Lion 往上的系统中,因为自从某个版本之后 Xcode 将 gcc 由
gcc-4.2
改为llvm-gcc-4.2
所致。所以解决方法也很简单:cd /usr/bin/ sudo ln -s llvm-gcc-4.2 gcc-4.2