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 trialEric Moody
12,373 PointsAs predicted: Rspec Test Fail - Everything worked until this video. running rails 4.1.8 Appears to be a loaderror
Currently running:
Rails 4.1.8 Rubygems 2.0.15 Ruby 2.0.0
Current Gems: odot>bundle DL is deprecated, please use Fiddle Using rake 10.4.2 Using i18n 0.7.0 Using json 1.8.2 Using minitest 5.7.0 Using thread_safe 0.3.5 Using tzinfo 1.2.2 Using activesupport 4.1.8 Using builder 3.2.2 Using erubis 2.7.0 Using actionview 4.1.8 Using rack 1.5.3 Using rack-test 0.6.3 Using actionpack 4.1.8 Using mime-types 2.6.1 Using mail 2.6.3 Using actionmailer 4.1.8 Using activemodel 4.1.8 Using arel 5.0.1.20140414130214 Using activerecord 4.1.8 Using mini_portile 0.6.2 Using nokogiri 1.6.6.2 Using xpath 2.0.0 Using capybara 2.1.0 *Remember in the Gemfile we we wrote:
group :development, :test do gem 'capybara', '~>2.1.0' end
* Using coffee-script-source 1.9.1.1 Using execjs 2.5.2 Using coffee-script 2.4.1 Using thor 0.19.1 Using railties 4.1.8 Using coffee-rails 4.0.1 Using diff-lcs 1.2.5 Using hike 1.2.3 Using multi_json 1.11.0 Using jbuilder 2.2.16 Using jquery-rails 3.1.2 Using bundler 1.10.0 Using tilt 1.4.1 Using sprockets 2.12.3 Using sprockets-rails 2.3.1 Using rails 4.1.8 Using rdoc 4.2.0 Using rspec-expectations 2.99.2 Using rspec-collection_matchers 1.1.2 Using rspec-core 2.99.2 Using rspec-mocks 2.99.3 Using rspec-rails 2.99.0 *
Remember in the Gemfile we wrote:
group :development, :test do
gem 'rspec-rails', '~> 2.0'
end
*
Using sass 3.2.19
Using sass-rails 4.0.5
Using sdoc 0.4.1
Using sqlite3 1.3.10
Using turbolinks 2.5.3
Using tzinfo-data 1.2015.4
Using uglifier 2.7.1
Bundle complete! 12 Gemfile dependencies, 52 gems now installed.
Use bundle show [gemname]
to see where a bundled gem is installed.
COMMAND
odot>rspec spec/features/todo_lists/create_spec.rb
ERROR LIST
2.0.0/gems/rspec-core-2.99.2/lib/rspec /core/configuration.rb:1065:in `load': cannot load such file --
odot/spec/features/todo_lists/create_spec.rb (LoadError)
from 2.0.0/gems/rspec-core-2.9
9.2/lib/rspec/core/configuration.rb:1065:in block in load_spec_files'
from
2.0.0/gems/rspec-core-2.9
9.2/lib/rspec/core/configuration.rb:1065:in
each'
from
2.0.0/gems/rspec-core-2.9
9.2/lib/rspec/core/configuration.rb:1065:in load_spec_files'
from
2.0.0/gems/rspec-core-2.9
9.2/lib/rspec/core/command_line.rb:18:in
run'
from
2.0.0/gems/rspec-core-2.9
9.2/lib/rspec/core/runner.rb:103:in run'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.9
9.2/lib/rspec/core/runner.rb:17:in
block in autorun'
* COMMENTS: Not sure why it is not loading. This is my first experience with rspec and running tests. I hope that I have provided enough information to troubleshoot. Everything else seems ok.
When I installed capybara there was a warning about capybara being deprecated and that it wasn't a problem now but could be in the future. rpec didn't print any message like that.
Thank you for any help in resolving this as I would like very much to complete this application today if possible. *
Eric Moody
12,373 PointsEric Moody
12,373 Pointshttp://stackoverflow.com/questions/19059669/rspec-loaderror
Same error with this guy, but his problem was loading from the root it looks like...
Eric Moody
12,373 Pointshttps://teamtreehouse.com/forum/load-error-after-rspec-createspecrb
I've tried the suggestions in this thread. No luck.
I've tried updating the gem, downgrading the gem to 2.0.0
Eric Moody
12,373 PointsSo this is strange.
i found that my create_spec.rb file was missing the .rb, but it's still broken.
Following the treehouse thread from before the current state of the todolist app is in branch rspec_bug
NEW ERROR list: Progress? We'll see.
C:\Sites\Project\odot>bundle exec rspec spec/features/todo_lists/create_spec.rb
DL is deprecated, please use Fiddle
You must 'gem install win32console' to use colour on Windows
Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
From:
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in
block in require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:232:in load_dependency'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in
require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/2.0.0/test/unit/assertions.rb:1:in <top
(required)>'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in
require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in block in require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:232:in
load_dependency'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-rails-2.0.0/lib/rsp
ec/rails/adapters.rb:2:in
<top (required)>'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in
block in require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:232:in load_dependency'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in
require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-rails-2.0.0/lib/rsp
ec/rails.rb:19:in <top (required)>'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in
require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in block in require'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:232:in
load_dependency'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.1.8/lib/a
ctive_support/dependencies.rb:247:in require'
C:/Sites/Project/odot/spec/spec_helper.rb:4:in
<top (required)>'
C:/Sites/Project/odot/spec/features/todo_lists/create_spec.rb:1:in require'
C:/Sites/Project/odot/spec/features/todo_lists/create_spec.rb:1:in
<top (requ
ired)>'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0.0/lib/rspe
c/core/configuration.rb:306:in load'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0.0/lib/rspe
c/core/configuration.rb:306:in
block in load_spec_files'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0.0/lib/rspe
c/core/configuration.rb:306:in map'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0.0/lib/rspe
c/core/configuration.rb:306:in
load_spec_files'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0.0/lib/rspe
c/core/command_line.rb:18:in run'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0.0/lib/rspe
c/core/runner.rb:55:in
run_in_process'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0.0/lib/rspe
c/core/runner.rb:46:in run'
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0.0/lib/rspe
c/core/runner.rb:10:in
block in autorun'
include Capybara
is deprecated. Please use include Capybara::DSL
instead.
include Capybara
is deprecated. Please use include Capybara::DSL
instead.
include Capybara
is deprecated. Please use include Capybara::DSL
instead.
C:/Sites/Project/odot/spec/spec_helper.rb:39:in block in <top (required)>': und
efined method
infer_base_class_for_anonymous_controllers=' for #<RSpec::Core::C
onfiguration:0x3974910> (NoMethodError)
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0
.0/lib/rspec/core.rb:67:in configure'
from C:/Sites/Project/odot/spec/spec_helper.rb:19:in
<top (required)>'
from C:/Sites/Project/odot/spec/features/todo_lists/create_spec.rb:1:in
require'
from C:/Sites/Project/odot/spec/features/todo_lists/create_spec.rb:1:in
<top (required)>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0
.0/lib/rspec/core/configuration.rb:306:in load'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0
.0/lib/rspec/core/configuration.rb:306:in
block in load_spec_files'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0
.0/lib/rspec/core/configuration.rb:306:in map'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0
.0/lib/rspec/core/configuration.rb:306:in
load_spec_files'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0
.0/lib/rspec/core/command_line.rb:18:in run'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0
.0/lib/rspec/core/runner.rb:55:in
run_in_process'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0
.0/lib/rspec/core/runner.rb:46:in run'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.0
.0/lib/rspec/core/runner.rb:10:in
block in autorun'
2 Answers
Brandon Barrette
20,485 PointsSo, this all works on my Mac. It must be an error with the windows installation. I would follow the error suggesting, like installing the missing gems:
- gem install win32console'
- add 'gem "minitest"'
If any other errors come up, you can add them to this thread.
Eric Moody
12,373 PointsI installed linux and worked everything on that OS, works there.
Brandon Barrette
20,485 PointsBrandon Barrette
20,485 PointsIs this on Github? If so can you paste the link? Easier for me to diagnose.