Fresh install of RVM in Ubuntu isn't letting me install gems (zlib error)
Run rvm notes
and make sure to use apt-get
to install the things RVM tells you to. It (something along the lines of zlib1g-devel
will be one of them).
For Ubuntu, it should be something like this:
/usr/bin/apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev
You might have to recompile your 1.9.2 afterwards (not 100% sure of that).
After installing ruby gems, running the new gem returns Could not find errors
Seems the missing link was
$ rvm use ruby-1.9.3-p125 --default
Seems to have fixed it.
PS: Thanks for looking at this. For your entertainment, if you didn't see it on HN yet (it's python, but still a good chuckle): https://gist.github.com/289467
Ubuntu rails install fails on zlib
If you come across this question trying to install Ruby using Ruby Version Manager (RVM) on Ubuntu 10.04 then there are instructions on installing zlib on the rvm web site http://rvm.beginrescueend.com/packages/zlib/
The steps are:
rvm pkg install zlib
(or
if you get "ERROR: Unrecognized command line argument: 'pkg'" - older versions of rvm used the verb 'package' instead)
rvm package install zlib
then
rvm remove 1.9.1
rvm install 1.9.1
RVM won't use the version of Ruby I tell it to use in new shells
rvm remove ruby-2.0.0-p648
rvm remove ruby-2.3.0
restart the bash
rvm --default use ruby-2.3.3
and it work
troubles with RVM and OpenSSL
Try this:
rvm get head
rvm pkg remove
rvm requirements run # if brew gives you warnings about formulas to install, run "brew install" for each before moving on.
rvm reinstall [the version you need (i.e: 2.0.0)]
Related Topics
How to Use Present? in Ruby Projects
Gemfile.Lock Always Has Changes Not Staged for Commit
Why Is Foreman Gem Ignoring the Port Environment Variable
How to Create Pretty JSON in Chef (Ruby)
Running a Shell Command from Ruby: Capturing the Output While Displaying the Output
How to Return Everything After Last Slash(/) in a Ruby String
How to Get The Pty.Spawn Child Exit Code
How to Create a Folder (If Not Present) with Logger.New
Require File Without Executing Code
Colon in the Front: Yaml Syntax
Which Ruby Rest API Client for Neo4J
How to Send Message to All Client Except Sender in Rails/Actioncable
How to Refer a Local Gem in Ruby
Disable Devise's :Confirmable On-The-Fly to Batch-Generate Users