在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
一.安装Rvm1.下载安装Rvm $ curl -L https://get.rvm.io | bash -s stable 此时可能出现错误:“gpg: 无法检查签名:找不到公钥” 解决方法: $ gpg --keyserver subkeys.pgp.net --recv 4F6C1E86 //下划线上应改为你所缺少的公钥
$ gpg --export --armor 4F6C1E86 | sudo apt-key add - //下划线上应改为你所缺少的公钥
2.载入Rvm环境 $ source ~/.rvm/scripts/rvm 3.检查是否安装正确 $ rvm -v rvm 1.22.17 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] 二.用 RVM 安装 Ruby 环境1.下载安装Ruby,Ruby Gems; $ rvm install 2.0.0 2.将安装好的Ruby设置为系统默认版本 $ rvm 2.0.0 --default 此时可能出现错误:RVM is not a function, selecting rubies with 'rvm use ...' will not work. You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use `/bin/bash --login` as the command. Please visit https://rvm.io/integration/gnome-terminal/ for an example. 解决方法: $ bash --login 3.测试是否正确 $ ruby -v ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0] $ gem -v 2.1.6 三.安装Bundler$ gem install bundler 此时可能出现错误: ERROR: Could not find a valid gem 'bundler' (>= 0), here is why: Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Connection timed out - connect(2) (https://rubygems.org/latest_specs.4.8.gz) 解决方法: $ gem sources --remove https://rubygems.org/ https://rubygems.org/ removed from sources $ gem sources -a https://ruby.taobao.org/ https://ruby.taobao.org/ added to sources $ gem sources -l *** CURRENT SOURCES *** https://ruby.taobao.org/ 四. 安装Rails环境1.安装Rails $ gem install rails 2.检查是否正确 $ rails -v
Rails 3.2.13
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论