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 trialBrandon Baum
6,862 Pointsrspec installation errors
I have followed the video and cannot seem to figure out how to install rspec. I went through all of the previous questions asked on the topic and none of the solutions worked. I have listed my gemfile below and the error when I run rails generate rspec:install.
source 'https://rubygems.org'
gem 'rails', '4.0.6'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'spring', group: :development
group :doc do gem 'sdoc', require: false end
group :development, :test do gem 'rspec-rails', '~> 2.0' end
group :test do gem 'capybara', '~> 2.1.0' end
MacBook-Air:todo brandon$ rails generate rspec:install
/Users/brandon/Desktop/repos/todo/config/environments/development.rb:1:in <top (required)>': undefined method
configure' for #<Todo::Application:0x007fd1044b41f0> (NoMethodError)
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/activesupport-4.0.6/lib/active_support/dependencies.rb:229:in require'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/activesupport-4.0.6/lib/active_support/dependencies.rb:229:in
block in require'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/activesupport-4.0.6/lib/active_support/dependencies.rb:214:in load_dependency'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/activesupport-4.0.6/lib/active_support/dependencies.rb:229:in
require'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/railties-4.0.6/lib/rails/engine.rb:591:in block (2 levels) in <class:Engine>'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/railties-4.0.6/lib/rails/engine.rb:590:in
each'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/railties-4.0.6/lib/rails/engine.rb:590:in block in <class:Engine>'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/railties-4.0.6/lib/rails/initializable.rb:30:in
instance_exec'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/railties-4.0.6/lib/rails/initializable.rb:30:in run'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/railties-4.0.6/lib/rails/initializable.rb:55:in
block in run_initializers'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:226:in block in tsort_each'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:348:in
block (2 levels) in each_strongly_connected_component'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:418:in block (2 levels) in each_strongly_connected_component_from'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:427:in
each_strongly_connected_component_from'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:417:in block in each_strongly_connected_component_from'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/railties-4.0.6/lib/rails/initializable.rb:44:in
each'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/railties-4.0.6/lib/rails/initializable.rb:44:in tsort_each_child'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:411:in
call'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:411:in each_strongly_connected_component_from'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:347:in
block in each_strongly_connected_component'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in each'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in
call'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in each_strongly_connected_component'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:224:in
tsort_each'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:205:in tsort_each'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/railties-4.0.6/lib/rails/initializable.rb:54:in
run_initializers'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/railties-4.0.6/lib/rails/application.rb:215:in initialize!'
from /Users/brandon/Desktop/repos/todo/config/environment.rb:5:in
<top (required)>'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/spring-1.3.1/lib/spring/application.rb:92:in require'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/spring-1.3.1/lib/spring/application.rb:92:in
preload'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/spring-1.3.1/lib/spring/application.rb:143:in serve'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/spring-1.3.1/lib/spring/application.rb:131:in
block in run'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/spring-1.3.1/lib/spring/application.rb:125:in loop'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/spring-1.3.1/lib/spring/application.rb:125:in
run'
from /Users/brandon/.rvm/gems/ruby-2.1.3/gems/spring-1.3.1/lib/spring/application/boot.rb:18:in <top (required)>'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from /Users/brandon/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require'
from -e:1:in
<main>'
1 Answer
Charlie Jaime
17,351 PointsFrom what I see double check the syntax of how you rspec gem is installed
group :development, :test do gem 'rspec-rails', '~> 3.0' end
Also check this site out might help out https://github.com/rspec/rspec-rails. if you like my answer vote me up or mark me for the best answer thank you and GREAT coding!
Brandon Baum
6,862 PointsBrandon Baum
6,862 PointsI double checked the syntax and I have researched the documentation on GitHub and things still don't work. I might just create a new app and start over.