everydayrails / everydayrails-rspec-2017

Sample source for the 2017 edition of Everyday Rails Testing with RSpec.
http://rspectutorial.com
312 stars 247 forks source link

Chapter 1: Error when Running bin/rails generate rspec:install #125

Open Roveri91 opened 10 months ago

Roveri91 commented 10 months ago

Hi, i am new to rails and i would like to learn more about Rspec that's why i purchased this book. Ufortunatelly i didn't get to far as i got stuck in the first chapter; i am trying to follow along with the source code but when i run "bin/rails generate rspec:install" i get a bunch of error like "/home/username/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/actionpack-5.1.7/lib/action_dispatch/middleware/static.rb:109:in `initialize': wrong number of arguments (given 3, expected 2) (ArgumentError)"

Any thoughs about what could cause the problem.

Many thanks

ken-wong commented 7 months ago

I saw the ruby version you installed is 3.1.2 The book have set the ruby version to 2.4. You may downgrade the ruby version.