Daniel Wise9,119 Points
Can't Install Ruby to my Mac
I keep getting this message when ever I run this code: Last login: Wed Jul 22 21:26:04 on ttys000 Daniels-MacBook-Air:~ daniel$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv fatal: destination path '/Users/daniel/.rbenv' already exists and is not an empty directory. Daniels-MacBook-Air:~ daniel$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile Daniels-MacBook-Air:~ daniel$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile Daniels-MacBook-Air:~ daniel$ $ruby -v -bash: -v: command not found Daniels-MacBook-Air:~ daniel$
I copied the code so you can take a look
Josh Cummings16,310 Points
This is how I got mine installed:
1 - Run all the updates! Seriously. If your system is completely up to date, you're almost there because Mac OS X includes Ruby. However, you should NOT use this version (more on that here).
2 - Install the latest version of Xcode from the Mac App Store. Xcode is Apple’s IDE for developing on the Mac. You need Xcode because your Mac doesn’t come pre-installed with developer tools and commands like “make”.
3 - Install the latest version of Homebrew. Homebrew is an awesome command line tool that lets you easily install lots of really cool stuff on your Mac via Terminal. You can use this command in Terminal to install it.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
4 - Install RVM (Ruby Version Manager). This helps you easily install and manage Ruby. You can use this command in Terminal to install it.
\curl -sSL https://get.rvm.io | bash -s stable --autolibs=enabled
5 - See what the latest version of Ruby is by visiting the Ruby website. Currently, the latest version is 2.2.2.
6 - Use RVM to install Ruby 2.2.2 by typing the following command into Terminal.
rvm install 2.2.2
7 - Grab a beer while you watch RVM and Homebrew get to work! Homebrew even puts a little beer Emoji in the command line to remind you to do this.
8 - Once Ruby 2.2.2 is installed, it will prompt you to download the Ruby documentation by typing in the following command.
rvm docs generate-ri
9 - Check to see that Ruby 2.2.2 is installed by typing the following command into Terminal.
10 - Get ready to party with Ruby!