开发者

Uninstall Ruby on Rails on Mac OS X 10.6

I´m trying to get RoR开发者_JAVA技巧 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.

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

Thanks!


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. Visit https://github.com/mxcl/homebrew and read up on homebrew. You'll thank me later :)

  2. Install homebrew with this:

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

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

  4. Install git:

    brew install git

  5. 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!!!

  6. Install 1.9.2 and set it to be the default:

    rvm install 1.9.2

    This will take a while

    rvm --default use 1.9.2

  7. Install Rails

    gem install rails

  8. Install mysql

    brew install 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.)

  9. Create your rails app:

    rails new my_app


Hi I had the same problem with the mysql gem and they way I succeeded was downgrading from ruby 1.9.2 to 1.8.7. I don't know which one are you using.

I uninstall ruby using port also.

Hope this could help.

Bye


To completely uninstall rails and all gems use this with sudo permissions:--

gem list | cut -d" " -f1 | xargs gem uninstall -aIx


uninstall it using rubygems

gem uninstall rails
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜