问题
I'm setting up a Ruby on Rails web development environment on a new machine (macOS Sierra v. 10.12.1). I'm following the setup instructions here: Setup Ruby On Rails on macOS 10.12 Sierra. When I check the newly installed rails version, I get the following:
$ rails --version
Expected string default value for '--rc'; got false (boolean)
Rails 4.2.6
I haven't seen that second line before, and googling hasn't yielded any helpful results. Background information: clean install of macOS 10.12.1; installed xcode via the App Store; installed Homebrew via the instructions on its homepage; installing Ruby, Rails, etc. via the first link I mentioned.
Anyone have any idea what might be going on?
回答1:
It's due to a change in the latest version of Thor. https://github.com/erikhuda/thor/blob/master/CHANGELOG.md#0192-release-2016-11-26. Rails 5 is not affected. You can ignore the warning on Rails 4 and earlier.
回答2:
I had the same issue with Rails 4.2.7, set up with RubyMine 7.1.3.
Adding gem 'thor', '0.19.1' to my Gemfile and then running bundle update thor fixed the issue.
回答3:
I finally got past this error by installing thor-0.19.4.
gem install "thor-0.19.4"
来源:https://stackoverflow.com/questions/40881938/new-ruby-on-rails-setup-expected-string-default-value-for-rc-got-false