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.
So, i want to delete everything and start again from cero. How can i delete RoR from my Mac ?
Thanks!
Uninstall Ruby on Mac with rbenv For rbenv, use rbenv versions to see which versions you have installed. Use the uninstall command to remove a version. This will remove any gems associated with the version as well. If you want to reinstall Ruby, see Install Ruby on Mac for recommendations of newer version managers.
Any gems that you install while using an RVM's ruby version, is self contained in that version. However there may come a time when you no longer want to use a particular ruby version and want to delete it along with all it's gems. Then this can be done using the “remove” command.
The Ruby interpreter is often found natively on the macOS in the file paths /usr/bin/ruby or /usr/local/bin/ruby , depending on where it was installed. Ruby gems are installed and managed natively on macOS by the operating system, and using sudo gem install or making changes in those Ruby gems is discouraged.
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.
Visit https://github.com/mxcl/homebrew and read up on homebrew. You'll thank me later :)
Install homebrew with this:
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
Install XCode if you haven't already. Easiest way is to use the disk that came with your Mac.
Install git:
brew install git
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!!!
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
Install Rails
gem install rails
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.)
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With