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

Ruby ! Why wont you let me love you !?!

I am just starting to use Ruby for the first time today.

I went through the item in the track to install ruby called "Installing a Ruby Development Environment"

When I come to the first video where we fire up ruby; "Generate a rails application" the environment shown in Jason's terminal doesn't look and act like mine.

Is this due to the fact Jason is referring to Ruby 1.9.3 and i have just installed 2.1.1

Jasons terminal prompt reads; 1.9.3 [~/projects]$

My terminal prompt reads; davids-mbp:~ chickenguts$

how do i get it to read as above ?

Jason ask's as the first task to type "rvm use 1.9.3" and gets response using usr/local/rvm/gems/ruby-1.9.3p194

I type; "rvm use 2.1.1" and get the response ruby-2.1.1 is not installed. when i check using ruby -v I get; ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]

very frustrating..... I am so keen to get started using Ruby and there seems to be allot of hurdles.

really hope you can help. going to post this in the ruby forum also to see if i get some help.

12 Answers

This indicates that you are missing minitest - to_specs': Could not find 'minitest'

Check if you have the minitest gem installed : gem query --local | grep -i minitest I am not sure i do not remember Jason's video and that specific project but did not he mention earlier to include the "minitest" in gemfile and run bundle install ? That would install all missing gems specified in your gemfile.

Otherwise you can just do this : gem install minitest

From what I understand, you are supposed to rvm use 1.9.3 like Jason does. This tells your system to use Ruby 1.9.3 instead of whatever version is the default one on your system and ensures you have the same behaviour as Jason.

I'm not sure how much 2.1.1 differs from 1.9.3, you might not even notice the difference but to make things easier you should rvm use 1.9.3

Now what you see before the $ sign is called your PS1 and it can be anything you want. Jason has his Ruby version in his but it could also be anything else he wants. This has no effect on any command you will type.

You might want to check the screencasts about Unix and the console on treehouse. It explains the PS1 concept along with a few other useful things to know.

Hope this helps!

Yes, it will install v1.9.3 along with your 2.1.1, you can then switch between versions using rvm use version_you_want

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hi David Langley it appears to be a difference with versions of Ruby and Rails. Our treebook project was done using Ruby 1.9.3 and Rails 3.2. In order to use Rails 4.0, I'd recommend the Build a Todo List application project instead.

If you do want to following along with the treebook application, you'll need to install rails 3.2. It should work fine with Ruby 2.1. In order to install Rails 3.2, do the following:

gem install rails --version=3.2.17
rails _3.2.17_ new treebook

That should generate the treebook application using Rails 3.2 and you will be able to follow along. We'll be updating the instructions for that.

Thats very helpful (and FAST!!) thanks Pierre

I just tried; "rvm use 1.9.3" as you suggests and got;

"ruby-1.9.3-p484 is not installed. To install do: 'rvm install ruby-1.9.3-p484'"

would you suggest I go ahead an do the install ?

Ok will try that, Thanks again!

Thanks Pierre

that installed v1.9.3 without a hitch and allows me to switch using rvm use 1.9.3

i have discovered however I am missing the Rails, therefore went to railsinstaller.org however have a note on there

"Please do not run the installer on OSX Mavericks until further notice"

do you run rails with Mavericks ?

really appreciate your help.

David. Install rails with rvm it runs just fine :

rails --version Rails 4.0.2

Darwin justamac 13.0.2 Darwin Kernel Version 13.0.2: Sun Sep 29 19:38:57 PDT 2013; root:xnu-2422.75.4~1/RELEASE_X86_64 x86_64

sorry Mike what do I type into the terminal prompt ?

$ rvm install rails 4.0.2 ?

something like that ?

Sorry uh....OS X has a system ruby buy you are encouraged to install for each user ruby separately via RVM. Then you install rails with : gem install rails -v 4.0.2 should do the trick.

Let me know if it works for you.

Hi Mike,

I did manage to get rails installed so now have ruby 2.1.1 and rails 4.0.2. It still doesn't run properly..... sigh.

i can get it to use rails V 1.9.3 just like in the video however when I try and make a new rails project I get some code that doesn't look correct.

davids-mbp:treehouse chickenguts$ rails new treebook /Users/chickenguts/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in to_specs': Could not find 'minitest' (~> 4.2) - did find: [minitest-2.5.1] (Gem::LoadError) from /Users/chickenguts/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1268:inblock in activate_dependencies' from /Users/chickenguts/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1257:in each' from /Users/chickenguts/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1257:inactivate_dependencies' from /Users/chickenguts/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1239:in activate' from /Users/chickenguts/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1271:inblock in activate_dependencies' from /Users/chickenguts/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1257:in each' from /Users/chickenguts/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1257:inactivate_dependencies' from /Users/chickenguts/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1239:in activate' from /Users/chickenguts/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:48:ingem' from /Users/chickenguts/.rvm/gems/ruby-1.9.3-p484/bin/rails:22:in <main>' from /Users/chickenguts/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:ineval' from /Users/chickenguts/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'

certainly doesn't look like whats happening on Jason's screen.

sure hope ruby on rails is worth all this !

thanks again for taking the time to try and help.

I am afraid I am a bit of a lost cause, i have reinstalled the bundler and rehashed. Still getting the same error....