Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Ruby Foundations Ruby Basics Installing Ruby

Why are we now using rvm when we set up rbenv in the last section (rails development track)?

From looking around the forums here and elsewhere, it seems that they do more or less the same thing. Having just completed the last section on this, the rails development, track, I don't understand why we're now installing rvm.

In this video, I followed along without doing much until around 6:00. Then I put this code in to edit my bash profile:

touch ~/.bash_profile
mate ~/.bash_profile

Then it returns:

-bash: mate: command not found

What do I need to do to get this running properly?

2 Answers

mate is the command line alias for TextMate. If you have TextMate installed and want to use the command line you can create a directory under your user directory called "bin" and create the alias to mate there with the following:

mkdir ~/bin
ln -s /Applications/TextMate.app/Contents/Resources/mate ~/bin/mate

Of course you'll need to add this directory to your PATH in bash or whichever shell you use by adding something like this to your .bash_profile (i know, a bit of a chicken and egg problem since what you're trying to do is edit your profile in the first place):

export PATH="${HOME}/bin:$PATH"

Alternatively if you don't have TextMate you can use one of the builtin editors such as pico or vi. Or more similar to TextMate (both in functionality and the fact that it's not free) Sublime Text.

In short, ignore the mate command in this video and use the editor of your choice. :)

Thanks for the help. Much appreciated.