创建Rails应用或检查Rails版本时,“针对Thor:Class的未定义方法'deprecation_warning'”

时间:2019-12-16 06:57:06

标签: ruby-on-rails linux-mint ruby-on-rails-4.2 ruby-2.3 cinnamon

我试图创建一个新的Rails应用程序并遇到了这些错误。我昨天刚创建了Rails应用程序,因此我的ruby和rails版本兼容。我正在使用Linux薄荷肉桂。检查rails版本时出现相同的错误。已安装的ruby版本是2.3.5和rails 4.2.6 有关如何解决此问题的任何想法?

  

/home/vagrant/.rvm/gems/ruby-2.3.5/gems/thor-1.0.0/lib/thor/parser/option.rb:140:in   为validate_default_type!': undefined method deprecation_warning'   Thor:Class(NoMethodError)您的意思是? deprecate_constant来自   /home/vagrant/.rvm/gems/ruby-2.3.5/gems/thor-1.0.0/lib/thor/parser/option.rb:115:in   validate!' from /home/vagrant/.rvm/gems/ruby-2.3.5/gems/thor-1.0.0/lib/thor/parser/argument.rb:24:in 初始化自   /home/vagrant/.rvm/gems/ruby-2.3.5/gems/thor-1.0.0/lib/thor/parser/option.rb:11:in   来自initialize' from /home/vagrant/.rvm/gems/ruby-2.3.5/gems/thor-1.0.0/lib/thor/base.rb:582:in 的新消息   /home/vagrant/.rvm/gems/ruby-2.3.5/gems/thor-1.0.0/lib/thor/base.rb:582:in   来自build_option' from /home/vagrant/.rvm/gems/ruby-2.3.5/gems/thor-1.0.0/lib/thor/base.rb:304:in class_option'   /home/vagrant/.rvm/gems/ruby-2.3.5/gems/railties-4.2.6/lib/rails/generators/base.rb:202:in   来自的class_option' from /home/vagrant/.rvm/gems/ruby-2.3.5/gems/railties-4.2.6/lib/rails/generators/app_base.rb:71:in add_shared_options_for'   /home/vagrant/.rvm/gems/ruby-2.3.5/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:160:in   <class:AppGenerator>' from /home/vagrant/.rvm/gems/ruby-2.3.5/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:159:in '来自   /home/vagrant/.rvm/gems/ruby-2.3.5/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:153:in   <module:Rails>' from /home/vagrant/.rvm/gems/ruby-2.3.5/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:3:in '来自   /home/vagrant/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /home/vagrant/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'from   /home/vagrant/.rvm/gems/ruby-2.3.5/gems/railties-4.2.6/lib/rails/commands/application.rb:2:in   <top (required)>' from /home/vagrant/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in要求'   /home/vagrant/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /home/vagrant/.rvm/gems/ruby-2.3.5/gems/railties-4.2.6/lib/rails/cli.rb:14:in '来自   /home/vagrant/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /home/vagrant/.rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'from   /home/vagrant/.rvm/gems/ruby-2.3.5/gems/railties-4.2.6/bin/rails:9:in   从<top (required)>' from /home/vagrant/.rvm/gems/ruby-2.3.5/bin/rails:23:in加载   /home/vagrant/.rvm/gems/ruby-2.3.5/bin/rails:23:in <main>' from /home/vagrant/.rvm/gems/ruby-2.3.5/bin/ruby_executable_hooks:15:in eval'from   /home/vagrant/.rvm/gems/ruby-2.3.5/bin/ruby_executable_hooks:15:in   `'

0 个答案:

没有答案