aar*_*ona 16 ruby ubuntu gem rvm
好的,我刚刚在Windows 7上使用VirtualBox创建了一个全新的Ubuntu 11.04安装(不确定这是否重要但只是一个fyi)
列出我的红宝石我得到:
aaron@aaron-VirtualBox:~$ rvm list
rvm rubies
=> ruby-1.9.2-p290 [ x86_64 ]
Run Code Online (Sandbox Code Playgroud)
但后来尝试安装rails gem我得到了这个:
aaron@aaron-VirtualBox:~$ gem install rails
ERROR: Loading command: install (LoadError)
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
aaron@aaron-VirtualBox:~$
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
编辑:
在做了Dylan说我的输出之后(为了证明这些库现在已经安装):
aaron@aaron-VirtualBox:~$ sudo 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
[sudo] password for aaron:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
Note, selecting 'libncurses5-dev' instead of 'ncurses-dev'
autoconf is already the newest version.
bison is already the newest version.
build-essential is already the newest version.
git-core is already the newest version.
libc6-dev is already the newest version.
libncurses5-dev is already the newest version.
libreadline6 is already the newest version.
libreadline6-dev is already the newest version.
libsqlite3-0 is already the newest version.
libsqlite3-dev is already the newest version.
libssl-dev is already the newest version.
libxslt1-dev is already the newest version.
libyaml-dev is already the newest version.
openssl is already the newest version.
sqlite3 is already the newest version.
zlib1g is already the newest version.
zlib1g-dev is already the newest version.
curl is already the newest version.
libxml2-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
aaron@aaron-VirtualBox:~$ gem install rails
ERROR: Loading command: install (LoadError)
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
aaron@aaron-VirtualBox:~$
Run Code Online (Sandbox Code Playgroud)
Dyl*_*kow 25
运行rvm notes并确保用于apt-get安装RVM告诉您的内容.它(zlib1g-devel其中一个将是其中之一).
对于Ubuntu,它应该是这样的:
/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
您可能必须在之后重新编译1.9.2(不是100%确定).
Shy*_*dka 19
我发现在安装上面的软件包之后我们需要安装软件包zlib(rvm说).所以我们需要这样做:
rvm pkg install zlib
之后,重新安装ruby.
rvm reinstall 1.9.3
运行
gem install rails
它将成功安装rails.
| 归档时间: |
|
| 查看次数: |
8545 次 |
| 最近记录: |