Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Set up Git and Add Gems

Brandon Baum
Brandon Baum
6,732 Points

rspec 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 methodconfigure' 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:inblock 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:inrequire' 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:ineach' 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:ininstance_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:inblock 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:inblock (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:ineach_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:ineach' 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:incall' 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:inblock 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:incall' 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:intsort_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:inrun_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:inpreload' 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:inblock 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:inrun' 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:inrequire' 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
Charlie Jaime
17,351 Points

From 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
Brandon Baum
6,732 Points

I 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.