Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 未知验证程序:';长度验证器';(ArgumentError)当我运行RSpec时_Ruby On Rails_Ruby_Rspec - Fatal编程技术网

Ruby on rails 未知验证程序:';长度验证器';(ArgumentError)当我运行RSpec时

Ruby on rails 未知验证程序:';长度验证器';(ArgumentError)当我运行RSpec时,ruby-on-rails,ruby,rspec,Ruby On Rails,Ruby,Rspec,当我运行命令:bundle exec rspec spec/时,我得到以下错误: 值得注意的是:未知验证程序:“LenghtValidator”(ArgumentError) 没有运行DRb服务器。改为在本地进程中运行。。。 C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activemodel-4.0.0/lib/active\u model/validations/validates.rb:116:in`rescue in b 锁定验

当我运行命令:
bundle exec rspec spec/
时,我得到以下错误:

值得注意的是:
未知验证程序:“LenghtValidator”(ArgumentError)

没有运行DRb服务器。改为在本地进程中运行。。。
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activemodel-4.0.0/lib/active\u model/validations/validates.rb:116:in`rescue in b
锁定验证”:未知验证程序:“LenghtValidator”(ArgumentError)
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activemodel-4.0.0/lib/active\u model/validations/validates.rb:113:in
`阻塞验证'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activemodel-4.0.0/lib/active\u model/validations/validates.rb:109:in
`各自的
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activemodel-4.0.0/lib/active\u model/validations/validates.rb:109:in
`验证
来自C:/Sites/rails/twitter/app/models/user.rb:4:in`'
来自C:/Sites/rails/twitter/app/models/user.rb:1:in`'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active\u support/dependencies.rb:228:in`req
尤尔
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active\u support/dependencies.rb:228:in`blo
ck in require'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active\u support/dependencies.rb:213:in`loa
d_依赖'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active\u support/dependencies.rb:228:in`req
尤尔
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active\u support/dependencies.rb:329:in`req
您需要或需要加载'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active\u support/dependencies.rb:462:in`loa
d_缺少_常数'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active\u support/dependencies.rb:183:in`con
圣母玛利亚酒店
来自C:/Sites/rails/twitter/spec/models/user_spec.rb:3:in`'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in'load'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in`block in
加载规格文件'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in'each'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in'load_spe
c_文件'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/command_-line.rb:22:“运行”
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:77:“运行中的救援”
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:73:in'run'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in`block in autorun
'
Gemfile.lock:

GIT
  remote: git://github.com/thomas-mcdonald/bootstrap-sass.git
  revision: 0e88056ac5d58fb0bbd23d3fe929eac01712d964
  branch: 3
  specs:
    bootstrap-sass (3.0.0.0)
      sass (~> 3.2)

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.0.0)
      actionpack (= 4.0.0)
      mail (~> 2.5.3)
    actionpack (4.0.0)
      activesupport (= 4.0.0)
      builder (~> 3.1.0)
      erubis (~> 2.7.0)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    activemodel (4.0.0)
      activesupport (= 4.0.0)
      builder (~> 3.1.0)
    activerecord (4.0.0)
      activemodel (= 4.0.0)
      activerecord-deprecated_finders (~> 1.0.2)
      activesupport (= 4.0.0)
      arel (~> 4.0.0)
    activerecord-deprecated_finders (1.0.3)
    activesupport (4.0.0)
      i18n (~> 0.6, >= 0.6.4)
      minitest (~> 4.2)
      multi_json (~> 1.3)
      thread_safe (~> 0.1)
      tzinfo (~> 0.3.37)
    arel (4.0.1)
    atomic (1.1.14)
    bcrypt-ruby (3.0.1-x86-mingw32)
    builder (3.1.4)
    capybara (2.1.0)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    childprocess (0.3.9)
      ffi (~> 1.0, >= 1.0.11)
    coffee-rails (4.0.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.6.3)
    diff-lcs (1.2.4)
    erubis (2.7.0)
    execjs (2.0.2)
    ffi (1.9.1)
    hike (1.2.3)
    i18n (0.6.5)
    jbuilder (1.0.2)
      activesupport (>= 3.0.0)
    jquery-rails (3.0.4)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    json (1.8.1)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.25)
    mini_portile (0.5.2)
    minitest (4.7.5)
    multi_json (1.8.2)
    nokogiri (1.6.0-x86-mingw32)
      mini_portile (~> 0.5.0)
    pg (0.15.1-x86-mingw32)
    polyglot (0.3.3)
    rack (1.5.2)
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (4.0.0)
      actionmailer (= 4.0.0)
      actionpack (= 4.0.0)
      activerecord (= 4.0.0)
      activesupport (= 4.0.0)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.0.0)
      sprockets-rails (~> 2.0.0)
    rails_12factor (0.0.2)
      rails_serve_static_assets
      rails_stdout_logging
    rails_serve_static_assets (0.0.1)
    rails_stdout_logging (0.0.3)
    railties (4.0.0)
      actionpack (= 4.0.0)
      activesupport (= 4.0.0)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.1.0)
    rdoc (3.12.2)
      json (~> 1.4)
    rspec-core (2.13.1)
    rspec-expectations (2.13.0)
      diff-lcs (>= 1.1.3, < 2.0)
    rspec-mocks (2.13.1)
    rspec-rails (2.13.1)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 2.13.0)
      rspec-expectations (~> 2.13.0)
      rspec-mocks (~> 2.13.0)
    rubyzip (0.9.9)
    sass (3.2.12)
    sass-rails (4.0.1)
      railties (>= 4.0.0, < 5.0)
      sass (>= 3.1.10)
      sprockets-rails (~> 2.0.0)
    sdoc (0.3.20)
      json (>= 1.1.3)
      rdoc (~> 3.10)
    selenium-webdriver (2.35.1)
      childprocess (>= 0.2.5)
      multi_json (~> 1.0)
      rubyzip (< 1.0.0)
      websocket (~> 1.0.4)
    sprockets (2.10.0)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.0.1)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (~> 2.8)
    sqlite3 (1.3.8-x86-mingw32)
    thor (0.18.1)
    thread_safe (0.1.3)
      atomic
    tilt (1.4.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    turbolinks (1.1.1)
      coffee-rails
    tzinfo (0.3.38)
    uglifier (2.1.1)
      execjs (>= 0.3.0)
      multi_json (~> 1.0, >= 1.0.2)
    websocket (1.0.7)
    xpath (2.0.0)
      nokogiri (~> 1.3)

PLATFORMS
  x86-mingw32

DEPENDENCIES
  bcrypt-ruby (= 3.0.1)
  bootstrap-sass!
  capybara (= 2.1.0)
  coffee-rails (= 4.0.1)
  jbuilder (= 1.0.2)
  jquery-rails (= 3.0.4)
  pg (= 0.15.1)
  rails (= 4.0.0)
  rails_12factor (= 0.0.2)
  rspec-rails (= 2.13.1)
  sass-rails (= 4.0.1)
  sdoc (= 0.3.20)
  selenium-webdriver (= 2.35.1)
  sqlite3 (= 1.3.8)
  turbolinks (= 1.1.1)
  uglifier (= 2.1.1)
GIT
远程:git://github.com/thomas-mcdonald/bootstrap-sass.git
修订:0e88056ac5d58fb0bbd23d3fe929eac01712d964
分行:3
规格:
引导式sass(3.0.0.0)
sass(~>3.2)
宝石
远程:https://rubygems.org/
规格:
actionmailer(4.0.0)
actionpack(=4.0.0)
邮件(~>2.5.3)
actionpack(4.0.0)
动态支持(=4.0.0)
生成器(~>3.1.0)
erubis(~>2.7.0)
机架(~>1.5.2)
机架测试(~>0.6.2)
activemodel(4.0.0)
动态支持(=4.0.0)
生成器(~>3.1.0)
activerecord(4.0.0)
activemodel(=4.0.0)
activerecord-已弃用的查找程序(~>1.0.2)
动态支持(=4.0.0)
arel(~>4.0.0)
activerecord-Disprecated_查找程序(1.0.3)
activesupport(4.0.0)
i18n(~>0.6,>=0.6.4)
小型测试(~>4.2)
多重json(~>1.3)
线程安全(~>0.1)
tzinfo(~>0.3.37)
阿雷尔(4.0.1)
原子(1.1.14)
bcrypt ruby(3.0.1-x86-mingw32)
建造商(3.1.4)
水豚(2.1.0)
mime类型(>=1.16)
nokogiri(>=1.3.3)
机架(>=1.0.0)
机架测试(>=0.5.4)
xpath(~>2.0)
子进程(0.3.9)
外国金融机构(~>1.0,>=1.0.11)
咖啡轨(4.0.1)
咖啡脚本(>=2.2.0)
钢轨(>=4.0.0,<5.0)
咖啡脚本(2.2.0)
咖啡脚本源
execjs
coffee脚本源(1.6.3)
差异lcs(1.2.4)
erubis(2.7.0)
execjs(2.0.2)
外国金融机构(1.9.1)
徒步旅行(1.2.3)
i18n(0.6.5)
jbuilder(1.0.2)
activesupport(>=3.0.0)
jquery rails(3.0.4)
钢轨(>=3.0,<5.0)
雷神(>=0.14,<2.0)
json(1.8.1)
邮件(2.5.4)
mime类型(~>1.16)
树梢(~>1.4.8)
mime类型(1.25)
迷你端口(0.5.2)
小型试验(4.7.5)
多线程json(1.8.2)
nokogiri(1.6.0-x86-mingw32)
迷你端口(~>0.5.0)
pg(0.15.1-x86-mingw32)
polyglot(0.3.3)
机架(1.5.2)
机架测试(0.6.2)
机架(>=1.0)
轨道(4.0.0)
actionmailer(=4.0.0)
actionpack(=4.0.0)
activerecord(=4.0.0)
动态支持(=4.0.0)
捆绑机(>=1.3.0,<2.0)
栏杆(=4.0.0)
链轮轨道(~>2.0.0)
轨道系数(0.0.2)
轨道服务静态资产
rails\u stdout\u日志记录
轨道服务静态资产(0.0.1)
rails\u stdout\u日志记录(0.0.3)
铁路(4.0.0)
actionpack(=4.0.0)
动态支持(=4.0.0)
耙(大于等于0.8.7)
雷神(>=0.18.1,<2.0)
耙(10.1.0)
rdoc(3.12.2)
json(~>1.4)
rspec核心(2.13.1)
rspec期望值(2.13.0)
差异lcs(>=1.1.3,<2.0)
rspec模拟(2.13.1)
rspec钢轨(2.13.1)
actionpack(>=3.0)
主动支持
GIT
  remote: git://github.com/thomas-mcdonald/bootstrap-sass.git
  revision: 0e88056ac5d58fb0bbd23d3fe929eac01712d964
  branch: 3
  specs:
    bootstrap-sass (3.0.0.0)
      sass (~> 3.2)

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.0.0)
      actionpack (= 4.0.0)
      mail (~> 2.5.3)
    actionpack (4.0.0)
      activesupport (= 4.0.0)
      builder (~> 3.1.0)
      erubis (~> 2.7.0)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    activemodel (4.0.0)
      activesupport (= 4.0.0)
      builder (~> 3.1.0)
    activerecord (4.0.0)
      activemodel (= 4.0.0)
      activerecord-deprecated_finders (~> 1.0.2)
      activesupport (= 4.0.0)
      arel (~> 4.0.0)
    activerecord-deprecated_finders (1.0.3)
    activesupport (4.0.0)
      i18n (~> 0.6, >= 0.6.4)
      minitest (~> 4.2)
      multi_json (~> 1.3)
      thread_safe (~> 0.1)
      tzinfo (~> 0.3.37)
    arel (4.0.1)
    atomic (1.1.14)
    bcrypt-ruby (3.0.1-x86-mingw32)
    builder (3.1.4)
    capybara (2.1.0)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    childprocess (0.3.9)
      ffi (~> 1.0, >= 1.0.11)
    coffee-rails (4.0.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.6.3)
    diff-lcs (1.2.4)
    erubis (2.7.0)
    execjs (2.0.2)
    ffi (1.9.1)
    hike (1.2.3)
    i18n (0.6.5)
    jbuilder (1.0.2)
      activesupport (>= 3.0.0)
    jquery-rails (3.0.4)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    json (1.8.1)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.25)
    mini_portile (0.5.2)
    minitest (4.7.5)
    multi_json (1.8.2)
    nokogiri (1.6.0-x86-mingw32)
      mini_portile (~> 0.5.0)
    pg (0.15.1-x86-mingw32)
    polyglot (0.3.3)
    rack (1.5.2)
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (4.0.0)
      actionmailer (= 4.0.0)
      actionpack (= 4.0.0)
      activerecord (= 4.0.0)
      activesupport (= 4.0.0)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.0.0)
      sprockets-rails (~> 2.0.0)
    rails_12factor (0.0.2)
      rails_serve_static_assets
      rails_stdout_logging
    rails_serve_static_assets (0.0.1)
    rails_stdout_logging (0.0.3)
    railties (4.0.0)
      actionpack (= 4.0.0)
      activesupport (= 4.0.0)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.1.0)
    rdoc (3.12.2)
      json (~> 1.4)
    rspec-core (2.13.1)
    rspec-expectations (2.13.0)
      diff-lcs (>= 1.1.3, < 2.0)
    rspec-mocks (2.13.1)
    rspec-rails (2.13.1)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 2.13.0)
      rspec-expectations (~> 2.13.0)
      rspec-mocks (~> 2.13.0)
    rubyzip (0.9.9)
    sass (3.2.12)
    sass-rails (4.0.1)
      railties (>= 4.0.0, < 5.0)
      sass (>= 3.1.10)
      sprockets-rails (~> 2.0.0)
    sdoc (0.3.20)
      json (>= 1.1.3)
      rdoc (~> 3.10)
    selenium-webdriver (2.35.1)
      childprocess (>= 0.2.5)
      multi_json (~> 1.0)
      rubyzip (< 1.0.0)
      websocket (~> 1.0.4)
    sprockets (2.10.0)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.0.1)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (~> 2.8)
    sqlite3 (1.3.8-x86-mingw32)
    thor (0.18.1)
    thread_safe (0.1.3)
      atomic
    tilt (1.4.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    turbolinks (1.1.1)
      coffee-rails
    tzinfo (0.3.38)
    uglifier (2.1.1)
      execjs (>= 0.3.0)
      multi_json (~> 1.0, >= 1.0.2)
    websocket (1.0.7)
    xpath (2.0.0)
      nokogiri (~> 1.3)

PLATFORMS
  x86-mingw32

DEPENDENCIES
  bcrypt-ruby (= 3.0.1)
  bootstrap-sass!
  capybara (= 2.1.0)
  coffee-rails (= 4.0.1)
  jbuilder (= 1.0.2)
  jquery-rails (= 3.0.4)
  pg (= 0.15.1)
  rails (= 4.0.0)
  rails_12factor (= 0.0.2)
  rspec-rails (= 2.13.1)
  sass-rails (= 4.0.1)
  sdoc (= 0.3.20)
  selenium-webdriver (= 2.35.1)
  sqlite3 (= 1.3.8)
  turbolinks (= 1.1.1)
  uglifier (= 2.1.1)
C:/Sites/rails/twitter/app/models/user.rb:4