ubuntu - ROR安装求助

浏览:25日期:2022-10-16

问题描述

安装到rvm是卡壳接下来该如何操作

xxx@ubuntu:~$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3gpg: directory `/home/zhouhang/.gnupg’ createdgpg: new configuration file `/home/zhouhang/.gnupg/gpg.conf’ createdgpg: WARNING: options in `/home/zhouhang/.gnupg/gpg.conf’ are not yet active during this rungpg: keyring `/home/zhouhang/.gnupg/secring.gpg’ createdgpg: keyring `/home/zhouhang/.gnupg/pubring.gpg’ createdgpg: requesting key D39DC0E3 from hkp server keys.gnupg.netgpg: /home/zhouhang/.gnupg/trustdb.gpg: trustdb createdgpg: key D39DC0E3: public key 'Michal Papis (RVM signing) <mpapis@gmail.com>' importedgpg: no ultimately trusted keys foundgpg: Total number processed: 1gpg: imported: 1 (RSA: 1)xxx@ubuntu:~$ curl -sSL https://get.rvm.io | bash -s stablecurl: (7) Failed to connect to get.rvm.io port 443: Connection refusedxxx@ubuntu:~$ curl -sSL https://get.rvm.io | bash -s stablecurl: (35) gnutls_handshake() failed: Error in the pull function.

问题解答

回答1:

rvm已经被墙了,我copy了一份到笔记上,你可以直接使用

$ curl -L /n/1330000004144488/raw | bash -s stable回答2:

别用rvm了,用rbenv吧,上教程:(使用教程的前提,已经安装哦oh-my-zsh)在终端中依顺序执行以下命令,即可完成ruby,rails的安装,以下代码使用了超过5次,在超过3台不同电脑上得到验证。

# Ubuntu系统下安装ruby/rails必要的库和编译环境sudo apt-get updatesudo apt-get install -y build-essential openssl curl libcurl3-dev libreadline6 libreadline6-dev git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf automake libtool imagemagick libmagickwand-dev libpcre3-dev libsqlite3-dev# rbenv环境安装git clone https://github.com/sstephenson/rbenv.git ~/.rbenvecho ’export PATH='$HOME/.rbenv/bin:$PATH'’ >> ~/.zshrcecho ’eval '$(rbenv init - zsh)'’ >> ~/.zshrcsource ~/.zshrctype rbenvgit clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build# ruby环境安装,首先列出可安装的版本,然后选择后进行下载编译rbenv install -lrbenv install 2.2.3# 设置当前使用的ruby版本并将gem的源改为淘宝镜像rbenv global 2.2.3rbenv rehashgem sources --remove https://rubygems.org/gem sources -a http://ruby.taobao.org/# 安装railsgem install bundler rails --no-rdoc --no-ri# 检查安装后的软件版本ruby -vgem -vrake -Vrails -v

相关文章: