安装 Ruby on Rails - Mac OS Lion [英] Installing Ruby on Rails - Mac OS Lion

查看:51
本文介绍了安装 Ruby on Rails - Mac OS Lion的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了 Lion 并希望安装 Ruby on Rails 我一直在浏览网页以寻找一种方法,但似乎找不到简单的方法,谁能指出我正确的方向.

I have downloaded Lion and looking to install Ruby on Rails I have been scanning the web for a way to do this but can't seem to find a easy way, could anyone point me in the correct direction.

非常感谢帮助

谢谢

推荐答案

下面我尝试恢复我的 rails 安装.它应该可以正常工作.

Below I try to resume my rails installation. It should work well.

1) 从 Apple Application Store 下载 Xcode:

使用此链接:xcode

2) 安装 xcode :

使用finder=>applications找到Xcode安装图标并双击开始安装

Use finder=>applications to locate "Xcode installation icon and double-click on it to begin the installation

**2b.) 对于 xcode 4.3.安装 xcode 后,启动它,导航到 Xcode-> 首选项,下载选项卡.安装命令行工具.这将下载并安装 C、编译器、加载器和其他编译 & 所需的命令行实用程序.构建 Ruby 包.

**2b.) For xcode 4.3. After installing xcode, launch it, navigate to Xcode->Preferences, Downloads tab. Install Command Line Tools. This will download and install C, compiler, loader and other command line utilities needed to compile & build the Ruby packages.

3) 使用终端安装 git:

gem install git

并将这一行放在您的 .bash_profile 中(如果不存在则创建一个):

and put this line in your .bash_profile (create one if none exists) :

export PATH=$PATH:/usr/local/git/bin/

4) 使用终端安装 rvm:

bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

并运行此命令来更新您的 .bash_profile :

and run this command to update your .bash_profile :

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

5) 使用终端安装 ruby​​ 1.9.2 和 rails:

rvm autolibs enable 
rvm install 1.9.2
rvm --default 1.9.2
gem update
gem install rails

这篇关于安装 Ruby on Rails - Mac OS Lion的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆