在 Mac OS X 10.6 上卸载 Ruby on Rails [英] Uninstall Ruby on Rails on Mac OS X 10.6

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

问题描述

我正在尝试使用 mysql 数据库启动并运行 RoR,但这对我来说似乎是不可能的(在包含 mysql gem 时出现错误).所以我试图通过控制台做很多事情但没有结果,我不记得我做了什么.

I´m trying to get RoR up and running with mysql data base, but it seems to be impossible to me (i get an error when including the mysql gem). So i tried to do a lot of things over the console with no results and i don´t remeber what i have done.

所以,我想删除所有内容并从 cero 重新开始.如何从我的 Mac 中删除 RoR?

So, i want to delete everything and start again from cero. How can i delete RoR from my Mac ?

谢谢!

推荐答案

获得基本 RoR 设置的最简单方法是使用 Homebrew 安装 mysql 和 RVM 来管理 Rails.如果您按照以下说明进行操作,包括安装 RVM,您将无需担心已经安装失败的 ruby​​ 或 rails,因为它们基本上会将所有内容安装在自己的位置,然后将您的环境重新指向新的 ruby​​ 和 rails 安装.

The easiest way to get a basic RoR setup is to use Homebrew to install mysql and RVM to manage rails. If you follow the instructions below, including installation of RVM, you wont need to worry about already failed installations of ruby or rails because they'll basically install everything in it's own location and then repoint your environment to the new ruby and rails installation.

  1. 访问 https://github.com/mxcl/homebrew 并阅读自制软件.以后你会感谢我的:)

  1. Visit https://github.com/mxcl/homebrew and read up on homebrew. You'll thank me later :)

用这个安装自制软件:

ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"

ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"

如果您还没有安装 XCode.最简单的方法是使用 Mac 随附的磁盘.

Install XCode if you haven't already. Easiest way is to use the disk that came with your Mac.

安装git:

brew install git

brew install git

安装 RVM:(可选,但如果您想在 ruby​​ 1.9.2 中使用 Ruby on Rails,那就太好了).再次阅读 RVM:http://rvm.beginrescueend.com/ 按照此处的说明操作:http://rvm.beginrescueend.com/rvm/install/ 并且不要忘记进行后安装!!!

Install RVM: (Optional, but great if you want to use Ruby on Rails with ruby 1.9.2). Again, read up on RVM: http://rvm.beginrescueend.com/ Follow the instructions here: http://rvm.beginrescueend.com/rvm/install/ AND DONT FORGET TO DO THE POST INSTALL!!!

安装 1.9.2 并将其设置为默认值:

Install 1.9.2 and set it to be the default:

rvm 安装 1.9.2

rvm install 1.9.2

这需要一段时间

rvm --默认使用 1.9.2

rvm --default use 1.9.2

安装 Rails

gem 安装导轨

安装mysql

brew 安装 mysql

brew install mysql

(完成后,您将需要初始化您的数据库.安装完成时将向您提供说明.如果您跳过此步骤,您的数据库将无法工作.如果您关闭终端并想查看再次说明您可以输入brew info mysql",它会显示给您.)

(When this is finished, you will need to initialize your database. The instructions will be given to you when the install finishes. If you skip this, your database won't work. If you closed your terminal and want to see the instructions again you can type "brew info mysql" and it will show them to you.)

创建您的 Rails 应用:

Create your rails app:

rails new my_app

rails new my_app

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

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