- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
当我运行命令时:bundle exec rspec spec/
我得到这个错误:
值得注意的是:未知验证器:“LenghtValidator”(ArgumentError)
No DRb server is running. Running in local process instead ...
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activemodel-4.0.0/lib/active_model/validations/validates.rb:116:in `rescue in b
lock in validates': Unknown validator: 'LenghtValidator' (ArgumentError)
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activemodel-4.0.0/lib/active_model/validations/validates.rb:113:in
`block in validates'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activemodel-4.0.0/lib/active_model/validations/validates.rb:109:in
`each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activemodel-4.0.0/lib/active_model/validations/validates.rb:109:in
`validates'
from C:/Sites/rails/twitter/app/models/user.rb:4:in `<class:User>'
from C:/Sites/rails/twitter/app/models/user.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `req
uire'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `blo
ck in require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `loa
d_dependency'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `req
uire'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:329:in `req
uire_or_load'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:462:in `loa
d_missing_constant'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:183:in `con
st_missing'
from C:/Sites/rails/twitter/spec/models/user_spec.rb:3:in `<top (required)>'
from 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'
from 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
load_spec_files'
from 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'
from 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_files'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:77:in `rescue in run'
from 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'
from 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)
最佳答案
您实际上可能打错了“长度”一词,并且 Rails 正在推断验证器的名称。检查这一行:
C:/Sites/rails/twitter/app/models/user.rb:4
而且您几乎肯定会在验证定义中找到单词 lenght
。修正该拼写错误,这应该有效。
关于ruby-on-rails - 未知验证器 : 'LenghtValidator' (ArgumentError) when I run RSpec,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19817009/
我已经通过 AVD 管理器启动了我的模拟器,一旦它运行,我点击了 run app。我已经等了几分钟,我的正在运行的设备出现在 选择一个正在运行的设备 中,但窗口始终保持空白。 最佳答案 您正在运行的项
我想在安装新数据库之前删除旧数据库,以便为用户更新它。 我有以下情况: 在我的 Components 部分中,我为用户提供了一个选项: [Components] Name: "updateDataba
如果我将一个 Python 模块实现为一个目录(即包),它同时具有顶级函数 run 和子模块 run,我可以指望 from example import run 总是导入函数?根据我的测试,至少在 L
我在 Eclipse Juno 上使用 Tomcat 7。我使用工作区元数据作为服务器位置(请参阅下面的我的 tomcat 配置)。 我也收到了 服务器项目在 eclipse [请看下图] 中使用单独
我正在做一些测试以了解 java 中的不同线程状态,并且遇到了一些查询。 通常,当一个线程被实例化时,它被称为处于 "NEW" 状态,然后当调用它的 start() 方法时,操作系统调度程序获得控制权
当我使用命令 npm run build -- --prod 时,我收到以下错误消息: 属性“PropertyName1”是私有(private)属性,只能在“AppComponent”类中访问 “A
我正在尝试将默认的“运行”键盘快捷键更改为 ⌘R。 - 因为我不想每次都伸手去拿触控板,而且我的手指不够长,无法一次执行⌥⇧F10。 “运行”和“运行...”有什么区别? 最佳答案 ... 用于菜单中
我现在不知道如何编写一个合适的方法来测试这种行为。请不要投反对票.. 我现在有一个 java 类负责处理数据并将数据添加到多个数据库。每个数据库都保存相同的数据,但处理方式不同(例如,以不同的插值率进
我知道不应该调用 run 方法来启动新线程执行,但我指的是 this article他们在另一个 run 方法中调用了 runnable.run(); ,这似乎暗示它启动了一个新线程或者根本没有cre
当我尝试在Windows 10/11下使用Eclipse 2023-06调试任何应用程序(甚至是hello.c)时,我总是收到以下错误:。该错误清楚地指示-(错误2)-路径是错误的。。我试图在互联网上
在运行vue文件时,需要进行npm操作,但我们发现,有时候用的是npm run serve,而有的时候用的是npm run dev,二者有什么区别 在我们运行一些 vue 项目的时候,输入npm ru
我想在 cloud run 上运行一个长时间运行的作业。该任务可能执行超过 30 分钟,并且主要发送 API 请求。cloud run 在大约 20 分钟后停止执行,从指标来看,它似乎没有识别出我的任
我们无法让 SSE 从 Google Cloud Run 上的容器发送。我已经尝试使用一个简单的 SSE 示例( https://github.com/kljensen/node-sse-exampl
直到最近,我一直在执行这个美丽来构建 + 运行一个带有堆栈的项目: stack build && .stack-work/install/x86_64-linux/lts-4.1/7.10.3/bin
我们有一个小脚本,可以抓取网页(约 17 个条目),并将它们写入 Firestore 集合。为此,我们在 Google Cloud Run 上部署了一项服务。 这段代码的执行需要大约 5 秒 when
我是Docker的新手,我知道一种运行交互式容器的方法如下: $ docker run -it image-name bash 要么 $ docker run -it image-name /bin/
Dockerfile 中的多个 RUN 条目之间有什么区别,例如: FROM php:5.6-apache RUN docker-php-ext-install mysqli RUN apt upda
对于来自文档的云运行内存使用情况 ( https://cloud.google.com/run/docs/configuring/memory-limits ) Cloud Run applicati
今天早上我更新了我的 Ubuntu 版本,现在我无法从 eclipse 运行我的应用程序。 问题是,当我单击“运行方式”时出现的列表是空的,我无法运行任何内容。 我该如何解决这个问题? 我能看到的唯一
我正在 intelliJ 上使用 livereload 测试 spring-boot-devtools。我有一个简单的 SpringBootApplication,可以正常工作。 当我从 maven
我是一名优秀的程序员,十分优秀!