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

John Simoneau
PLUS
John Simoneau
Courses Plus Student 8,105 Points

Is it ok to have newest version of Ruby with old version of Rails? Rails console won't load...

Is it ok to have newer version of Ruby (ruby 2.2.2p95) with old version of Rails (Rails 3.2.18)? I can't seem to get the command rails console to work? It tries to load but apparently fails. It says this at the top of the attempted load

Js-MacBook-Pro:treebook jsimoneau$ rails console /Users/jsimoneau/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.18/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now /Users/jsimoneau/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- test/unit/testcase (LoadError)

Everything else has been working ok for the semi-outdated Rails course I'm taking but this has me stuck. I'm trying to keep using this older version of rails as-per the course advice. Thanks for any help with this :)

Honestly if you are taking the Ruby on Rails track right now I would suggest using only the versions of rails, ruby, and all the gems in the video.

Later in the video I personally had quite a few issues running versions that differed from the video.

Though in production I would use the most recent stable release of each. (Not a snapshot, something like x.x not x.x.x unless you know the patch is vital, and in most cases you would know.)

John Simoneau
John Simoneau
Courses Plus Student 8,105 Points

Thank you Andrew Gay for the response...

I'm not doing the track at the moment, I was first doing the old course called - Build a Simple Ruby on Rails Application. They mentioned in the original teachers notes I believe to make sure that we used Rails 3.2.18 but they didn't mention any specific version or Ruby. Even if they did though, I didn't come across any of the places providing instructions for those of us using Yosemite... to install that version. There was different version of Ruby to choose from in their dropdown but I don't believe they offered the same one as the instructor which is why I decided to just go with the newest. Probably was a bad idea...LOL.

Is there any simple tricks to getting my version of Ruby to match theirs at this point (or at all really) now that I'm part way through the course?

Thanks!

I have never really touch an Apple OS in my life (Some BSD, linux, and windows) so I wouldn't be much help with installing stuff (Though iv been told its pretty similar)

You should be able to use the newest versions of both ruby and rails and not run into any issues. I ran into some with rspec but I do not think in the course you are taking they use that at all.

I looked up your issue some and saw people suggesting adding either

gem 'test-unit'

or

gem 'minitest'

to you Gemfile

Try that I suppose, sorry If that doesn't help!

Andrew Gay your last suggestion of adding the test-unit gem worked for me getting the console to finally launch. Thank you for that suggestion!

John Simoneau I encountered a similar problem with trying to figure out how to install retro versions of ruby and rails to specifically follow the Build a Simple Ruby on Rails Application course. I found the following link very helpful in installing the specific ruby and rails versions needed in the course on OSX Yosemite. I hope it helps you as it has helped me:

http://railsapps.github.io/installrubyonrails-mac.html

John Simoneau
John Simoneau
Courses Plus Student 8,105 Points

Andrew Gay yes, putting ''' gem 'test-unit' ''' in the gem file did the trick so that the console at least loaded. Unfortunately I decided to abandon work on this course as I felt it was so outdated it was causing more harm then good. I was googling quite a bit for fixes and finding them but it was just taking all of my focus off the actual course content and learning experience.

I hope they update this course (How to create a simple rails application) for others. I can't say that I didn't know what I was getting myself into as I did read some warning comments prior to starting... and I likely could have finished... but at the cost of what I felt best for my own learning.

Michael Immordino thank you for that link. Andrew's fix got me going and as I said I abandoned this Simple Application course in favor of the Track. But I read through a lot of that and I think it's really going to come in useful for me so thank you!

John Simoneau
John Simoneau
Courses Plus Student 8,105 Points

Andrew Gay , if points matter to you then I would have given you a "best answer" but it's not letting me apparently because you only commented rather then submitting an answer :(

This course is really frustrating, but it does look like Jason is starting to remake it. Hope to see it redone soon!

I think the last 3 courses where the worst (Regarding code done off cam and outdated material)

John Simoneau
John Simoneau
Courses Plus Student 8,105 Points

Andrew Gay it would be nice if he redoes this one. I'm just getting started with the Rails to-do app. My only complaint is that I'm already bored of to-do apps after doing the jQuery to-do course. Not meaning that one was bad but it's nice to have something fresh to do rather then repeating the same type thing. I haven't got into it yet so it could be totally different but a social network app type seemed so much more intriguing at first glance. Hopefully this ends up more different though, it's been fun and a lot easier to follow so far.

1 Answer

I have never really touch an Apple OS in my life (Some BSD, linux, and windows) so I wouldn't be much help with installing stuff (Though iv been told its pretty similar)

You should be able to use the newest versions of both ruby and rails and not run into any issues. I ran into some with rspec but I do not think in the course you are taking they use that at all.

I looked up your issue some and saw people suggesting adding either

gem 'test-unit'

or

gem 'minitest'

to you Gemfile

Try that I suppose, sorry If that doesn't help!

P.S. I usually leave a comment instead of an answer when I am unsure that this will solve the problem or if I have not tested it myself! Glad this helped!