I am trying to install the ruby version 2.3.5 in my mac OS environment which is Mojave. I am getting the following issues. Appreciate If anyone can help me to sort out the issue ?
ERROR: Ruby install aborted due to missing extensions
Configure options used:
--prefix=/Users/efutures/.rbenv/versions/2.3.5
--with-openssl-dir=/usr/local/opt/openssl#1.1
--with-readline-dir=/usr/local/opt/readline
CC=clang
CFLAGS= -O3 -Wno-error=shorten-64-to-32
LDFLAGS=-L/Users/efutures/.rbenv/versions/2.3.5/lib
CPPFLAGS=-I/Users/efutures/.rbenv/versions/2.3.5/include
I tried the following command.
rbenv install 2.3.5
Found an issue in rbenv repo which suggests that you need an extension to get rbenv to properly work.
Follow the instruction here to install and get rbenv to work properly.
rbenv is a ruby manager. It builds different ruby from source. To make it work, you need to install rbenv and rbenv-build.
brew install rbenv rbenv-build
Secondly, you need to install dependencies readline and openssl#1.1.
brew install realine openssl#1.1
The error missing extensions is related to ruby-build, you may forget to install it or the dependencies.
Related
On Mac Catalina OS, while installing Ruby with rbenv, I am getting this error.
Last 10 log lines:
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
--prefix=/Users/dev/.rbenv/versions/2.5.8
--with-openssl-dir=/usr/local/opt/openssl#1.1
--enable-shared
--with-readline-dir=/usr/local/opt/readline
CC=clang
LDFLAGS=-L/Users/dev/.rbenv/versions/2.5.8/lib
CPPFLAGS=-I/Users/dev/.rbenv/versions/2.5.8/include
EDIT - I have attached the solution which I found and worked for me. I hope this helps others too.
The issue is with OpenSSL. Mac CommandLine Tools is coming with OpenSSL 1.1 whereas you need OpenSSL 1.0. This is the solution for it
$ brew install rbenv/tap/openssl#1.0
$ RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.0)" rbenv install 2.5.8
This will install Ruby 2.5.8. Do not forget to set
rbenv global 2.5.8
to make it work
I'm very new to RoR specially on Mac. I have installed it many times on Ubuntu with RVM and I'm very comfortable with that. Here is what happened on Mac:
I went through instructions as explained here http://goo.gl/zsHcCC then when I got to the point to install Rails with " gem install rails " I got this error:
Error installing rails:
ERROR: Failed to build gem native extension.
Now I want to roll-back everything and uninstall rbenv and it's ruby versions and reinstall the Ruby On Rails environment using RVM.
I tried to find how to uninstall Homebrew, RBENV and Ruby, but no success.
Thank you.
Sia
Homebrew or Rbenv are very good tools to have as a dev, I would think twice before removing either.
In this case I doubt they are at fault.
Can you confirm you have installed the GCC command line utils for OSX by running $ xcode-select --install in your terminal.
Here is a useful post explaining that process but I find that command generally works fine for me.
If this succeeds what does your $ gem install rails output next?
If you are very new you and you don't need specially the last version of Ruby. You can use Rails Installer http://railsinstaller.org/fr-FR.
To uninstall brew https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md
So I'm following this guide at http://railsapps.github.io/installrubyonrails-ubuntu.html
and I install RVM without a hitch. However, when I check for the version of ruby that I installed via:
ruby -v
I got the following:
The program 'ruby' can be found in the following packages:
* ruby1.8
* ruby1.9.1
Try: sudo apt-get install <selected package>
I tried to install ruby manually through RVM:
rvm install ruby
However, it merely told me that ruby had already been installed.
Has anyone encountered this same issue?
TIA
you can try with these urls these may help you for installing rvm and ruby installation and rails installation
https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm
This may help you
After installing rvm, if you installed it as root, try
source /etc/profile.d/rvm.sh
If you installed as user, try
source ~/.rvm/scripts/rvm
I've definitely been there. I created a script to help me install ruby on remote machines. This was made for new EC2 instances, but maybe it will work.
https://github.com/jubrad/install_ruby
If you do want to use it you'll likely have to remove rvm and your rubies first.
-https://rvm.io/rubies/removing
-sudo apt-get remove rvm
best of luck.
I would like to install Ruby 2.0 with RVM on my Ubuntu system and get an error message:
rvm 1.23.5 (master)
ubuntu 12.04 (LTS)
**---- Error message: -------**
rvm install 2.0.0
Searching for binary rubies, this might take some time.
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system.....................................................................................................................................
Error running 'requirements_debian_update_system ruby-2.0.0-p247',
please read /home/emzett/.rvm/log/1381812161_ruby-2.0.0-p247/update_system.log
Requirements installation failed with status: 100.
Update the system using:
sudo apt-get update
Try:
rvm remove 2.0.0 # uninstall rvm
rvm get head --autolibs=3 # get the latest RVM and build required libs
rvm requirements # check if there are any dependencies that need to be installed.
rvm install ruby-2.0.0
I solved the problem by editing
etc/apt/source.list.d/medibuntu.list
I just commented the line referring to medibuntu out.
https://gist.github.com/pcjpcj2/5443017
I recommend this gist.
if you need Ruby on Rails 4.0 ~ , best answer is here
I had the same issue. I ran the following command to fix it:
sudo apt-get -f install
Then I remembered that I failed installing a package earlier that day. What this command did was resolve the dependencies on that package and allowed RVM to do its thing.
This happens when there are broken sources in /etc/apt/sources.list.d or /etc/apt/sources.list.d
You can run Ubuntu Software update to see if there are any any failures due to broken sources, if so, follow the below steps
fix them or comment and execute the following steps
rvm requirements -- this will install all of
the required software modules
rvm list -- provides you the available versions of ruby
rvm install ruby-x.x.x -- This will install x.x.x version of ruby, please change the ruby-x.x.x with the version you are interested in ex (ruby-2.1.0 for 2.1.0 version of ruby)
I am getting the following error:
$script/console
Loading development environment (Rails 2.2.2)
/opt/ruby-enterprise-1.8.6-20080709/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
Where can i get the file and what directory should it go in?
Thanks!
The readline module is normally part of the Ruby package itself.
Did you manually build your Ruby install? If so, you want to make sure libreadline and its headers are installed, and build again.
On Debian/Ubuntu:
apt-get install libreadline-dev
Or on RHEL/CentOS, try
yum install readline-devel
Update:
You are using a very old release of Ubuntu. If you want to keep using it, open /etc/apt/sources.list in a text editor, and change all occurrences of archive.ubuntu.com to old-releases.ubuntu.com. Then, run apt-get update and try the above again.
I urge you to consider updating your installation, though. Ubuntu 7.10 hasn't seen security updates in quite a while, and using it in production is not recommended. Even if it's not a production machine, there's a good chance you'll run into further problems because of old versions of certain libraries/dependencies.
You need to install the ncurses and readline libraries.
On Ubunutu you could do
sudo apt-get install libreadline5-dev libncurses5-dev
and then you will have to recompile readline which comes with your ruby source
cd <ruby-src-dir>/ext/readline
ruby extconf.rb
make
sudo make install
If you are using RVM you could simply do
rvm package install readline
EDIT:
On newer RVM versions, this last command is
rvm pkg install readline
Add the following line to your Gemfile and run bundle update
gem 'rb-readline'
credits to similar question/answer at install ruby 1.9.3 using rvm on ubuntu
This easiest way to get relief from this problem,
just add to your Gemfile:
gem 'rb-readline'
And then run bundle install
Run the command
rvm requirements
It shows the requirements and dependencies. Install those and reinstall the ruby on rvm
rvm remove 1.9.2
rvm install 1.9.2
It works!
EDIT
If you can't find the requirements option update your rvm.
rvm update --head # older rvm
or use rvm upgrade
Maybe this is a bullshit answer, but I ran into this problem today after upgrading postgres from 9.5.3 to 9.6, along with which homebrew upgraded readline from 6.something to 7. I ended up rolling back my postgres to 9.5.3 and that resolved the issue.