I am following this tutorial and have just started. I have installed Ruby on Rails with gem install rails
and have created a blog with rails new blog
I just ran into this myself. I've been working with Rails for almost a year so I was like "Uhhhhh so do I not know what I'm doing? Orrrr?" xD.
I'm on an Ubuntu-based Linux distro.
I added this line to my Gemfile:
gem 'thor', '0.19.1'
I then ran the command "bundle update thor" to make it grab the exact version I needed. Now my generators work again.
A temporary fix is to set the version of Thor in your gemfile to the last release.
gem 'thor', '0.19.1'
It seems the latest gem release broke it. Once that gets fixed, then this error should go away.
For anyone having trouble creating a new Ruby on Rails application or anything else like middleman, you can uninstall Thor and install the older version specifically:
gem uninstall thor
gem install thor -v 0.19.1
I have had a similar issue tonight with Thor 0.19.2.
Here is what worked for me. Please ensure that you backup all data. I am very new to Rails, so I don't know what the consequences of this will be.
First, you need to remove Thor 0.19.2.
gem uninstall thor
Type 'Y' when it asks you confirm removal. Then, install the previous version of Thor.
gem install thor -v 0.19.1
You might get an error about being locked to 0.19.2 - go into your project's gemfile.lock, and find the line containing Thor. Change 0.19.2 to 0.19.1.
You might need to restart any terminal windows you have open. Good luck!
You can also try:
bundle update thor
It worked for me.