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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Unsubscribed User](https://secure.gravatar.com/avatar/7336cf032b005806201a16c4d0b4bfcd?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Unsubscribed User
5,035 PointsProblem with rspec
/Users/tanio/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in require': cannot load such file -- rails_helper (LoadError)
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in
block in require'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in load_dependency'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:247:in
require'
from /Volumes/DW/Treehouse/Project1/odot/spec/models/todo_item_spec.rb:1:in <top (required)>'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in
load'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in block in load'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:232:in
load_dependency'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.4/lib/active_support/dependencies.rb:241:in load'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.0.3/lib/rspec/core/configuration.rb:1057:in
block in load_spec_files'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.0.3/lib/rspec/core/configuration.rb:1057:in each'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.0.3/lib/rspec/core/configuration.rb:1057:in
load_spec_files'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.0.3/lib/rspec/core/runner.rb:97:in setup'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.0.3/lib/rspec/core/runner.rb:85:in
run'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.0.3/lib/rspec/core/runner.rb:70:in run'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.0.3/lib/rspec/core/runner.rb:38:in
invoke'
from /Users/tanio/.rvm/gems/ruby-2.1.2/gems/rspec-core-3.0.3/exe/rspec:4:in <top (required)>'
from /Users/tanio/.rvm/gems/ruby-2.1.2/bin/rspec:23:in
load'
from /Users/tanio/.rvm/gems/ruby-2.1.2/bin/rspec:23:in <main>'
from /Users/tanio/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in
eval'
from /Users/tanio/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Any concern?
3 Answers
![Maciej Czuchnowski](https://uploads.teamtreehouse.com/production/profile-photos/103489/micro_IMG_3403.jpg)
Maciej Czuchnowski
36,441 PointsI see you are using rspec v3. While this might not help you with your current problem, I suggest using the exact versions of gems that Jason is using - rspec version 2 (this might be 2.0 or 2.14) and downgrading Rails to 4.0. I recently had problems with rspec v3 because some methods were removed since version 2 and I wasn't able to run specs based on courses like this one.
![Unsubscribed User](https://secure.gravatar.com/avatar/7336cf032b005806201a16c4d0b4bfcd?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Unsubscribed User
5,035 PointsI have got a really weird issue. Some files have been corrupted and they contains strange symbols rather than code. Sorry guys I think this post is not going to be very useful for future viewers. Anyway, I solved the dependency problem just changing require 'rails_helper' with require 'spec_helper' in todo_item_spec.rb
![David Gross](https://uploads.teamtreehouse.com/production/profile-photos/111686/micro_whale_shark.jpg)
David Gross
19,443 Pointsrequire': cannot load such file -- rails_helper
You need to delete the rails_helper from your spec file. Because you are using Rspec you should be using spec_helper.rb each one of your test should have require 'spec_helper' not require 'rails_helper'.
change require 'rails_helper' to require 'spec_helper'
![Unsubscribed User](https://secure.gravatar.com/avatar/7336cf032b005806201a16c4d0b4bfcd?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Unsubscribed User
5,035 PointsSee my comment above
![Maciej Czuchnowski](https://uploads.teamtreehouse.com/production/profile-photos/103489/micro_IMG_3403.jpg)
Maciej Czuchnowski
36,441 PointsThat depends if he's using rspec 2 or 3.
![Unsubscribed User](https://secure.gravatar.com/avatar/e45dd81d0238dfb6d9a9adcf3dcf12f7?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Unsubscribed User
21,424 PointsThe previous answers are correct and it looks like they helped the OP in this case. I will add that this (or a very similar) error will appear if you attempt to run rspec before running rails generate rspec:install
.
In my case this happened when I switched gemsets :).
Alexander Batalov
21,887 PointsAlexander Batalov
21,887 PointsGaetano Artino Please could you paste here your exact spec that fails ?