I had the same problem, it turned out that I had to delete what was on my system and in my rails application.
I also could not create a new application, so on the command line I had to:
gem uninstall thor gem install thor -v 0.19.1
Then the rail commands work again on the command line
Then I generated a new rails application, but this did not succeed, as it received a broken version. So in my gem file I need the correct version:
gem 'thor', '0.19.1'
and then run
bundle install
Oh no!
"You have requested: thor = 0.19.1 The bundle currently has thor locked at 0.19.2. Try running `bundle update thor`"
so
bundle update
and voila !! :)
Using thor 0.19.1 (was 0.19.2)
And now the failing command is executed:
rails generate rspec:install Running via Spring preloader in process 26996 create .rspec create spec create spec/spec_helper.rb create spec/rails_helper.rb
source share