新的Ruby on Rails设置:"' - rc'的预期字符串默认值;得到假(布尔)"

时间:2016-11-30 06:45:26

标签: ruby-on-rails macos

我在新机器上设置Ruby on Rails Web开发环境(macOS Sierra v.10.12.1)。我按照此处的设置说明操作:Setup Ruby On Rails on macOS 10.12 Sierra。当我检查新安装的rails版本时,我得到以下内容:

$ rails --version
Expected string default value for '--rc'; got false (boolean)
Rails 4.2.6

我以前没见过第二行,谷歌搜索也没有产生任何有用的结果。背景资料:macOS 10.12.1的全新安装;通过App Store安装xcode;通过its homepage上的说明安装Homebrew;通过我提到的第一个链接安装Ruby,Rails等。

任何人都知道可能会发生什么?

3 个答案:

答案 0 :(得分:28)

这是由于最新版Thor的变化。 https://github.com/erikhuda/thor/blob/master/CHANGELOG.md#0192-release-2016-11-26。 Rails 5不受影响。您可以忽略Rails 4及更早版本上的警告。

答案 1 :(得分:1)

我在使用RubyMine 7.1.3设置Rails 4.2.7时遇到了同样的问题。

gem 'thor', '0.19.1'添加到我的Gemfile然后运行bundle update thor修复了问题。

答案 2 :(得分:0)

我通过安装thor-0.19.4.

终于解决了这个错误

gem install "thor-0.19.4"