惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
Scott Helme
Scott Helme
爱范儿
爱范儿
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
V
V2EX
腾讯CDC
博客园_首页
博客园 - 司徒正美
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
雷峰网
雷峰网
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
罗磊的独立博客
Recorded Future
Recorded Future
博客园 - 聂微东
O
OpenAI News
S
Secure Thoughts
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
Y
Y Combinator Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Project Zero
Project Zero
宝玉的分享
宝玉的分享
K
Kaspersky official blog
N
Netflix TechBlog - Medium
T
The Exploit Database - CXSecurity.com
Google Online Security Blog
Google Online Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Webroot Blog
Webroot Blog
云风的 BLOG
云风的 BLOG
Simon Willison's Weblog
Simon Willison's Weblog
C
Check Point Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
LINUX DO - 热门话题
美团技术团队
L
Lohrmann on Cybersecurity

博客园 - 张永存(Jerry)

POD 创建 Xcode 项目组 ReactiveCocoa RACObserve subscribeNext 时,只有值不一样时才响应 ReactiveCocoa 监听Enabled和添加Command出错的处理方法 Masonry + UIView Animations 注意事项 addObserver forKeyPath options 注意事项 ios中tabbar得title和navigationbar的title如何修改 tableview 分组显示返回footerviewt和headerView的高度不能为0的问题 UITableViewCell的选中时的颜色设置 ios 枚举 位移操作 设置UIButton 字体 颜色 ios NSString format 保留小数点 float double 屏幕自动旋转和调节大小 IOS影响Animiation动画的事件 类似9patch效果的iOS图片拉伸 CocoaPods安装 XMPP 连续注册出现用户限制:500错误 处理方式 ejabberd 搭配的XMPP服务器注册失败 403 处理 在framework中打包xib 【转】 XMPP ejabberd服务 Mac 安装
Mac OS X上安装 Ruby运行环境
张永存(Jerry) · 2015-10-02 · via 博客园 - 张永存(Jerry)

因为要安装CocoaPods,百度上一搜说要先配置好RUBY环境,

这里我对这次安装RUBY的环境进行一总结。

安装Ruby环境首先需要安装Xcode然后需要安装Homebrew,

接下来需要安装RVM最后安装Ruby环境。

Homebrew是一个包管理器,用于在mac上安装一些os x上没有的UNiX工具。

Homebrew将这些工具统统安装到了 /usr/local/Cellar 目录中,并在 /usr/local/bin 中创建符号链接。

1.中文地址:http://brew.sh/index_zh-cn.html

打开终端(Terminal)把以下粘贴到终端内,期间会要求输入密码

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/.
==> The following directories will have their group set to admin:
/usr/local/.


Press ENTER to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/.
Password:
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/.
==> Downloading and Installing Homebrew...
remote: Counting objects: 122077, done.
remote: Compressing objects: 100% (59644/59644), done.
remote: Total 122077 (delta 85582), reused 95298 (delta 61463)
Receiving objects: 100% (122077/122077), 19.32 MiB | 134 KiB/s, done.
Resolving deltas: 100% (85582/85582), done.
From https://github.com/mxcl/homebrew
 * [new branch]      master     -> origin/master
HEAD is now at 4b51e11 Improve signal-to-noise ratio of `brew list --unbrewed`
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help

2.安装设置RVM

命令:

curl -L https://get.rvm.io | bash -s stable
bogon:~ Jerry$ curl -L https://get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0     34      0  0:00:05  0:00:05 --:--:--    37
100 22721  100 22721    0     0   3188      0  0:00:07  0:00:07 --:--:-- 14191
Downloading https://github.com/rvm/rvm/archive/1.26.11.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc
Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc',
but no GPG software exists to validate it, skipping.

Installing RVM to /Users/Jerry/.rvm/
    Adding rvm PATH line to /Users/Jerry/.profile /Users/Jerry/.mkshrc /Users/Jerry/.bashrc /Users/Jerry/.zshrc.
    Adding rvm loading line to /Users/Jerry/.profile /Users/Jerry/.bash_profile /Users/Jerry/.zlogin.
Installation of RVM in /Users/Jerry/.rvm/ is almost complete:

  * To start using RVM you need to run `source /Users/Jerry/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

# JERRY,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
bogon:~ Jerry$ 

3. 设置RVM

bogon:~ Jerry$ source ~/.rvm/scripts/rvm   ##通过以下命令启用RVM
bogon:~ Jerry$ rvm -v   ##检查一下是否安装正确命令
rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]  ##正确的话会出现类似下面的文字
bogon:~ Jerry$ 

4.安装RUBY

漫长的等待下载过程(这里就不贴过程了),安装完成后需要执行下面的命令指定哪个RUBY为系统默认的