1、在ruby官方上面提示在macbook中安装ruby可以执行这样一句话:% port install rubyy
2、但是要执行这个的前提是你已经安装了macport了,但是可恶的是你要安装macport的话要先安装mac上面的
xcode才能安装macport
3、所以你应该先下载xcode_3.2.4_and_ios_sdk_4.1.dmg然后安装之后,去http://www.macports.org/下载跟你mac系统一样的版本,我的机器mac版本是Snow Leopard 所以我下来了Snow Leopard 相关的版本MacPorts-1.9.2.pkg
4、接下来就可以安装ruby了
5、切换到root权限,然后执行 port install ruby
sh-3.2# port install ruby
---> Computing dependencies for ruby
---> Dependencies to be installed: libiconv gperf ncurses ncursesw openssl zlib readline
---> Fetching gperf
---> Attempting to fetch gperf-3.0.4.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/gperf
---> Verifying checksum(s) for gperf
---> Extracting gperf
---> Configuring gperf
---> Building gperf
---> Staging gperf into destroot
---> Installing gperf @3.0.4_0
---> Activating gperf @3.0.4_0
---> Cleaning gperf
---> Fetching libiconv
---> Attempting to fetch libiconv-1.13.1.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/libiconv
---> Verifying checksum(s) for libiconv
---> Extracting libiconv
---> Applying patches to libiconv
---> Configuring libiconv
---> Building libiconv
---> Staging libiconv into destroot
---> Installing libiconv @1.13.1_0
---> Activating libiconv @1.13.1_0
---> Cleaning libiconv
---> Fetching ncursesw
---> Attempting to fetch ncurses-5.7.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/ncurses
---> Verifying checksum(s) for ncursesw
---> Extracting ncursesw
---> Applying patches to ncursesw
---> Configuring ncursesw
---> Building ncursesw
---> Staging ncursesw into destroot
---> Installing ncursesw @5.7_1
---> Activating ncursesw @5.7_1
---> Cleaning ncursesw
---> Fetching ncurses
---> Verifying checksum(s) for ncurses
---> Extracting ncurses
---> Applying patches to ncurses
---> Configuring ncurses
---> Building ncurses
---> Staging ncurses into destroot
---> Installing ncurses @5.7_1
---> Activating ncurses @5.7_1
---> Cleaning ncurses
---> Fetching zlib
---> Attempting to fetch zlib-1.2.5.tar.bz2 from http://distfiles.macports.org/zlib
---> Verifying checksum(s) for zlib
---> Extracting zlib
---> Applying patches to zlib
---> Configuring zlib
---> Building zlib
---> Staging zlib into destroot
---> Installing zlib @1.2.5_0
---> Activating zlib @1.2.5_0
---> Cleaning zlib
---> Fetching openssl
---> Attempting to fetch openssl-1.0.0b.tar.gz from http://distfiles.macports.org/openssl
---> Verifying checksum(s) for openssl
---> Extracting openssl
---> Applying patches to openssl
---> Configuring openssl
---> Building openssl
---> Staging openssl into destroot
---> Installing openssl @1.0.0b_0
---> Activating openssl @1.0.0b_0
---> Cleaning openssl
---> Fetching readline
---> Attempting to fetch readline61-001 from ftp://ftp.dti.ad.jp/pub/GNU/readline/readline-6.1-patches/
---> Attempting to fetch readline61-002 from ftp://ftp.dti.ad.jp/pub/GNU/readline/readline-6.1-patches/
---> Attempting to fetch readline-6.1.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/readline
---> Verifying checksum(s) for readline
---> Extracting readline
---> Applying patches to readline
---> Configuring readline
---> Building readline
---> Staging readline into destroot
---> Installing readline @6.1.002_0
---> Activating readline @6.1.002_0
---> Cleaning readline
---> Fetching ruby
---> Attempting to fetch ruby-1.8.7-p302.tar.bz2 from ftp://ftp.iij.ad.jp/pub/lang/ruby/1.8
---> Verifying checksum(s) for ruby
---> Extracting ruby
---> Applying patches to ruby
---> Configuring ruby
---> Building ruby
---> Staging ruby into destroot
---> Installing ruby @1.8.7-p302_0+thread_hooks
---> Activating ruby @1.8.7-p302_0+thread_hooks
---> Cleaning ruby
sh-3.2# port installed
The following ports are currently installed:
gperf @3.0.4_0 (active)
libiconv @1.13.1_0 (active)
ncurses @5.7_1 (active)
ncursesw @5.7_1 (active)
openssl @1.0.0b_0 (active)
readline @6.1.002_0 (active)
ruby @1.8.7-p302_0+thread_hooks (active)
zlib @1.2.5_0 (active)
sh-3.2# ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10]
分享到:
相关推荐
记得在安装过程中勾选“Add Ruby executables to your PATH”选项,这样可以在命令行中直接使用Ruby命令。 Mac用户则可以利用Homebrew,这是一个包管理器,可以帮助安装各种软件,包括Ruby。首先需要在终端中安装...
$ rvm install 2.0.0 ``` - **设置为默认版本**: ```shell $ rvm use 2.0.0 --default ``` - **验证安装**: ```shell $ ruby -v $ gem -v ``` ##### 3. 配置Ruby Gems源 - **更改默认源**: 由于默认的...
Ruby工作室 这是一个简短的Ruby指南,由 :heart_suit: 。 安装 如果我们使用Rails,我们将安装一些可能需要的依赖项的Ruby。 ...brew install rbenv ruby-build # Add rbenv to bash so that it lo
例如,对于一个简单的Ruby应用,你可以使用命令 `vmc push myapp -p path/to/app -m 256M` 来完成部署,这里`myapp`是应用名称,`path/to/app`是应用文件夹路径,`-m 256M` 指定了应用占用的内存限制为256MB。 3. **配置...
使用/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"安装 使用brew install mas安装 使用brew bundle dump软件列表转储到Brewfile文件中 将应用...
在Mac OS X上,推荐使用Homebrew安装,运行`brew install imagemagick`。 接下来,你需要在Rails项目中引入MiniMagick gem。在Gemfile中添加`gem 'mini_magick'`,然后运行`bundle install`。MiniMagick是一个Ruby...
例如,要查找 Ruby 的to_json方法,您必须记住以下格式: $ dash://ruby:to_json 但我宁愿这样做: $ dash ruby to_json 要求 安装 $ git clone git@github.com:zacwasielewski/better-dash-cli.git $ cd ./...
- 接着,通过Homebrew安装Ruby:`brew install ruby` 2. 使用RVM安装Ruby: - 下载并安装RVM:`\curl -sSL https://get.rvm.io | bash -s stable` - 用RVM安装Ruby:`rvm install ruby-版本号` 三、安装Itamae ...
在Mac OS X 10.9 (Mavericks)及更高版本上,安装JavaHL以解决Eclipse启动或更新SVN时出现“Failed to load JavaHL Library”错误,需要遵循一系列步骤。JavaHL是一个Java接口,它允许Java应用程序与Subversion(SVN...
### Mac Appium 1.6.4 环境搭建及问题解决详解 #### 一、概述 本文将详细介绍如何在Mac环境下搭建Appium 1.6.4自动化测试环境,并针对iOS应用进行自动化测试。此外,我们还将探讨如何集成Facebook的WebDriverAgent...
只需一行命令“brew install xxx”,它就会自动给你安装上了!神不神奇?甚至不用加sudo权限! Homebrew是个GitHub开源的Ruby脚本,它神奇的地方还有很多,需要我们细细地去了解。如果你是一个热爱Mac的软件极客,...
将MOV文件转换为GIF 将MOV文件转换为GIF动画,以便快速预览和电子邮件友好共享。 入门 这是为Mac OS X用户设计的。 安装自制软件 是Mac OS x的软件包管理器。...运行Ruby脚本 我创建了一个Convert
用户需要单独使用`gem install`命令来安装所需的Ruby gems,这些gems可以是第三方库、框架或者其他开发者工具,如Rails、Sinatra等。 总的来说,RubyInstaller 2.3.1 是在Windows环境中快速部署和运行Ruby应用的...
ruby -e " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install ) " brew update git clone https://github.com/pickiey/dotfiles.git $HOME /.dotfiles chmod u+x $HOME /.dotfiles/...
Ruby 2.5、2.6 Rails 4.2、5.2、6.0 安装 PDF套件 gem install pdfkit wkhtmltopdf 手动安装(推荐): 尝试使用wkhtmltopdf-binary-edge gem(mac + linux i386) gem install wkhtmltopdf-binary 注意:自动...
- `ruby -e "$(curl --insecure -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` - 或者直接使用`/bin/bash -c "$(curl -fsSL ...
s.description = 'Topico shows a greeting to RubyGems' s.authors = ['AuthorName'] s.email = 'username@username.com' s.files = ["lib/topico.rb"] s.homepage = 'http://rubygems.org/gems/topico' end ...
wake ( "00:14:5e:2a:1c:f7" ) # Send magic packet to the machine with the MAC address 00:14:5e:2a:1c:f7 wol . close 或者只是: WakeOnLan . wake! ( "00:14:5e:2a:1c:f7" ) 或者 WakeOnLan . wak