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

Need to update Ruby and install rails (not working)

So I was messing around with Ruby a few months ago but now want to do it via Treehouse.

When I do ruby -v I get ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0].

How do I update it to 1.9.3? Also, when I install the suggested RailsInstaller on Mac, it completes successfully BUT if I try rails -v, my computer says:

Rails is not currently installed on this system. To get the latest version, simply type:

$ sudo gem install rails

You can then rerun your "rails" command.

If I do as it says and run the command, I then enter my password and nothing happens. Just keeps showing blank lines with no [username]$ anymore.

Help! Just want to wipe whatever I have and start anew.

5 Answers

Update: solved. Went in and viewed hidden files on mac. Then deleted all ruby and rails folders. Re-ran the installer. Works!

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

You can also always use http://www.railsinstaller.org/ and follow along with the videos.

Using Mac OS X 10.6.8. What's the best way to clean off all non-system ruby, gems, etc so I can start over? I'm getting all sorts of errors etc. Even after running the rails installer. Thinking if I could clean everything off and start over, maybe it might go smoother. I guess I'm just wondering which hidden ruby files to delete (looking at the note above).

UPDATE: rails installed... Iost track of everything I did but whatever it was it worked. got the ruby on rails "Welcome aboard" screen.

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Great! Let us know if you have any more problems.

I am having a similar problem. I already had an old version of Rails and Ruby on my Mac, but then followed along with the Treehouse video and installed the newer versions from railsinstaller.org. After installing it, I checked to make sure it worked by checking my Ruby version in Terminal, but it is still displaying the 1.8.7 version. And when I did rails --help, I received the following message:

/opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:383:in `bin_path': can't find executable rails for rails-3.2.12 (Gem::Exception) from /opt/local/bin/rails:19

I'm not sure how to display all my hidden folders or what that means, and I don't want to accidentally delete something I need.