Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Darryn Smith
Darryn Smith
32,043 Points

Installing a Ruby on Rails Development Evironment in OS X... problem!

Hi.

I'm following along with the console-based installation in the video mentioned above.

When I get to the $ rbenv -v check, I get this:

SmutchMacXX:~ darryn$ rbenv -v
/usr/local/Cellar/rbenv/0.4.0/libexec/rbenv---version: line 17: cd: /Users/darryn/.rbenv: No such file or directory
SmutchMacXX:~ darryn$ 

I've been poking/Googling around a bit to find solutions but so far haven't found anything very inspiring. I've also looked at trying to uninstall rbenv to start over, but thought I'd check here before I take such drastic measures.

If, perchance, the best advice IS to uninstall/reinstall rbenv, then a brief link or methodology would be appreciated.

Thanks, Treehousers!

P.S.: Running OS X 10.10.3, Xcode 6.3.2 (updated last night), and successfully installed the command line tools as described earlier in the video.

2 Answers

Darryn Smith
Darryn Smith
32,043 Points

I discovered that the problem is in this shell command:

echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' > ~/.profile

The error is related to the directory/filename at the end. Changed it to:

echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' > ~/.bash_profile

Now everything works as it should.

Not sure why the tutorial, apparently staged on an OS X Yosemite machine, wouldn't be using a bash shell, but there's a jillion things I'm unsure of.

Brandon Barrette
Brandon Barrette
20,485 Points

I recommend these directions:

http://installrails.com/

Much easier to follow.