Error “'Validate_default_type!': An option's default must match its type (ArgumentError)” when running Ruby on Rails generate on Windows

后端 未结 4 613
心在旅途
心在旅途 2020-12-11 01:18

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

4条回答
  •  旧巷少年郎
    2020-12-11 01:47

    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!

提交回复
热议问题