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

Erin Lowell
Erin Lowell
4,201 Points

Having much trouble getting rails installed with the right version of ruby.

Oh please, can someone please help.

I had rails installed on localhost:3000. So then I went to the next lesson in the "build a simple ruby on rails application" which is to generate a rails application. When I typed in

rvm use 1.9.3

it said command not found.

I did some searching (probably a big mistake) and tried reinstalling rvm. That didn't work.

Eventually I got a recommendation in terminal with a different line to install that version. I typed it in...and it's still working on it...a good 15 minutes now. And when I go to localhost:3000, the rails server is gone.

There was a big difference in the video -Jason's screen showed a project folder, mine did not. At one point terminal recommend ed adding source ~/.profile to my .bash_profile folder, so I did that.

Is there any way to undo this? I've spent hours trying to get this right. I fear I'll spend more time installing rails than learning how to use it. :)

Can someone please walk me through installing rails and ruby 1.9.3? There has to be a way to do this.

Erin Lowell
Erin Lowell
4,201 Points

Here's what the terminal command is showing me now:

``Last login: Wed Dec 10 19:16:20 on ttys000 Erins-MacBook-Pro:testapp erinlowell$ rvm use 1.9.3 ruby-1.9.3-p551 is not installed. To install do: 'rvm install ruby-1.9.3-p551' Erins-MacBook-Pro:testapp erinlowell$ rvm install ruby-1.9.3-p551 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p551. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for osx. Installing requirements for osx. Updating system..... Installing required packages: libyaml, readline, libksba, openssl....... Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date. Requirements installation successful. Installing Ruby from source to: /Users/erinlowell/.rvm/rubies/ruby-1.9.3-p551, this may take a while depending on your cpu(s)... ruby-1.9.3-p551 - #downloading ruby-1.9.3-p551, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9813k 100 9813k 0 0 3609k 0 0:00:02 0:00:02 --:--:-- 3609k ruby-1.9.3-p551 - #extracting ruby-1.9.3-p551 to /Users/erinlowell/.rvm/src/ruby-1.9.3-p551.... ruby-1.9.3-p551 - #applying patch /Users/erinlowell/.rvm/patches/ruby/GH-488.patch. ruby-1.9.3-p551 - #configuring. Error running './configure --prefix=/Users/erinlowell/.rvm/rubies/ruby-1.9.3-p551 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared', showing last 15 lines of /Users/erinlowell/.rvm/log/1418257025_ruby-1.9.3-p551/configure.log [2014-12-10 19:17:31] ./configure current path: /Users/erinlowell/.rvm/src/ruby-1.9.3-p551 PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/erinlowell/.rbenv/shims:/Users/erinlowell/.rbenv/bin:/Users/erinlowell/.rbenv/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/erinlowell/adt-bundle-mac-x86_64-20131030/sdk/platform-tools:/Users/erinlowell/.rvm/bin:/Users/erinlowell/.rvm/bin command(7): ./configure --prefix=/Users/erinlowell/.rvm/rubies/ruby-1.9.3-p551 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared configure: WARNING: unrecognized options: --without-tcl, --without-tk checking build system type... i386-apple-darwin13.4.0 checking host system type... i386-apple-darwin13.4.0 checking target system type... i386-apple-darwin13.4.0 checking whether the C compiler works... no configure: error: in/Users/erinlowell/.rvm/src/ruby-1.9.3-p551': configure: error: C compiler cannot create executables See `config.log' for more details There has been an error while running configure. Halting the installation. Erins-MacBook-Pro:testapp erinlowell$

4 Answers

Erin Lowell
Erin Lowell
4,201 Points

Ok, I reinstalled everything and made some progress.

Rails is installed and I'm now on "Generate a Rails Application". I think my issue here is that I don't undestand the path. When I type rvm use 1.9.3, it says it's not installed. When I type ruby -v it tells me version 1.9.3 is installed. So I'm getting a mixed message from the terminal command.

I feel like I'm close. Can anyone get me over the next hurdle please? Jason Seifer - could you point me to what I need to type in the terminal to get to the right place?

Here's a video of where I'm at:

http://screencast.com/t/k4fBR3ctLz

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

You don't have to use Ruby version 1.9.3. Any version above 1.8 will be fine. However, "Build a simple ruby on rails application" course is very old and this is only the first, small problem you will encounter on the way when trying to use the newest versions of gems (Rails is a gem and the differences between the version used in the videos and he newest version are significant). By the way, if you want to have easier time working with Rails, you can simply use a complete Rails development environment in the browser. Just register for Clound9 account. Michael Hartl describes all the steps in his free online book here: https://www.railstutorial.org/book/beginning#sec-up_and_running - this way you will get everything up and running faster and will be able to focus on actually learning Rails.

Erin Lowell
Erin Lowell
4,201 Points

Thanks for the response, I appreciate you taking the time. You're a moderator, so I must ask: Is team treehouse's position that people should not take that course? If the course is too outdated to be of value, why is it still posted?

I've got the right version of ruby installed for the course - I understand it isn't the latest version.

I think I would still like to learn how to navigate to the correct folder and install a rails app locally. I'm planning on porting a site I own to rails and want to be able to work locally on my own device. Ruby is installed. Rails is installed. I'm just not able to install a rails application. That's got to be possible, right? :)

I'm also working through the rails development track, currently on the javascript course.

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Moderator is just a student that has more options on the forum, like editing posts or choosing best answers when the person asking did not and the proper answer appeared. I have no idea what the official position is. I'm just telling from my own experience. If you already have Ruby and Rails (i.e. you can use commands like ruby -v and rails -v and they give you some info instead of "command not found"), then you can continue the course, ignore the rvm thing. However, I would suggest learning other stuff from the Rails Track first (like Console, Git etc.) if you don't know them already and taking a look at the book I gave you in a link earlier.

Erin Lowell
Erin Lowell
4,201 Points

Thanks Maciej Czuchnowski . I had the exact same thought about learning Console and Git. I'd still like a teacher to respond here to the original question, but I'm going to keep going on the rails development track, finish Javascript and Console and Git.

Thanks again!

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

If you want a teacher to see your forum post, you have to tag them just like you tagged me there.