Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 11808  / 2 Years ago, thu, august 18, 2022, 10:56:19

I'm trying to install ruby on rails from scratch on Ubuntu 12.10. Getting help from this post:



echo "[[ -s '${HOME}/.rvm/scripts/rvm' ]] && source '${HOME}/.rvm/scripts/rvm'" >> ~/.bashrc
echo "[[ -s '${HOME}/.rvm/scripts/rvm' ]] && source '${HOME}/.rvm/scripts/rvm'" >> ~/.zshrc

curl -L https://get.rvm.io | bash -s stable

# Then run this in order to make rvm work:
source /home/adige/.rvm/scripts/rvm

# And installed zlib, before ruby:
rvm pkg install zlib

# Last step, installed ruby:
rvm install 1.9.3 --with-zlib-dir=/home/adige/.rvm/usr


But the problem is when i try to install gems i get this error:



adige@adige-LG:~$ gem install rails
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand


I already have these:



curl zlib1g-dev zlib1g libssl-dev build-essential openssl libreadline6 libreadline6-dev curl git-core libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config


So what may be the problem?


More From » 12.10

 Answers
5

In case of anyone's interested, i removed RVMand compiled Ruby from source code, as the official page recommends, then installed rails gem by:



sudo gem install rails


Using sudo is essential.


[#32810] Saturday, August 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rofity

Total Points: 182
Total Questions: 98
Total Answers: 115

Location: Albania
Member since Sat, Jan 7, 2023
1 Year ago
;