Joern Akkermann
Joern Akkermann

Reputation: 3622

Compiling Ruby 1.9.2 under Linux (Ubuntu) and Rubygems

I already installed Ruby 1.9.2 with Rubygems successfully on my main machine.

Now on my server I'm again in this job.

Last time I had a problem, which came up right now as well:

gem install rails
ERROR:  Loading command: install (LoadError)
    no such file to load -- zlib
ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::Commands::InstallCommand

I knew how to fix this, but forgot it.

I found an article here on stackoverflow (which I cannot find again) that tells me to compile some native ruby extension first. In the source code you have to go into a dir, where you find dirs for zlib, linecache and so on. Those you have to compile and you're done: everything then works.

Can somebody tell me again how to do this?

Sorry, Google and the Stackoverflow search didn't help this time.

Thanks.

Yours,

Joern

Upvotes: 0

Views: 413

Answers (2)

Joern Akkermann
Joern Akkermann

Reputation: 3622

I found the thread again!

Has anyone tried installing ruby & rubygems from source on ubuntu

In the 3rd answer of Evgeny you find exactly what I was searching for!

Upvotes: 1

Nick Nizovtsev
Nick Nizovtsev

Reputation: 373

  1. use RVM to install a ruby - its really incredible stuff
  2. you didnt used flags on the ruby compilation (--with-zlib-dir=/...zlib_path...)

Upvotes: 1

Related Questions