- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在运行 Rails 4,每当我尝试在 rails 控制台中运行任何东西时,我都会收到以下错误:
2.0.0 (main):0 > User.first
CodeRay::Scanners::Scanner::ScanError:
***ERROR in scanner.rb:333:in `raise_inspect': no implicit conversion of Array into String (after tokens)
tokens:
current line: 1 column: 5 pos: 4
matched: nil state: "Error in CodeRay::Scanners::Ruby#scan_tokens, initial state was: :initial"
bol?: false, eos?: false
surrounding code:nil ~~ ".first"
ERROR
from /Users/silasjmatson/.gem/ruby/2.0.0/gems/coderay-1.1.0/lib/coderay/encoders/terminal.rb:145:in `text_token'
2.0.0 (main):0 >
GIT
remote: git://github.com/gregbell/active_admin.git
revision: abb3d454d3a6cb0852be6e7aa4c289ba83e1a966
branch: master
specs:
activeadmin (1.0.0.pre)
arbre (~> 1.0)
bourbon
coffee-rails
devise (~> 3.0)
formtastic (~> 2.3.0.rc2)
inherited_resources (~> 1.3)
jquery-rails
jquery-ui-rails
kaminari (~> 0.13)
rails (>= 3.2, < 4.1)
ransack (~> 1.0)
sass-rails
PATH
remote: components/api
specs:
api (01.0)
rest-client
PATH
remote: components/data_models
specs:
data_models (0.0.1)
carrierwave
fog
mini_magick
rails (~> 4.0.0)
unf
PATH
remote: components/store
specs:
store (0.0.1)
activemerchant
coffee-rails (~> 4.0.0)
compass-blueprint
compass-rails (~> 2.0.alpha.0)
country_select
crummy
devise (~> 3.1.0)
devise-async
geocoder
heroku-deflater
jquery-rails
rails (~> 4.0.1)
sass-rails (~> 4.0.0)
sidekiq
sidekiq-failures
simple_form
sinatra
slim-rails (~> 2.0.1)
turbolinks
uglifier (>= 1.3.0)
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.0.1)
actionpack (= 4.0.1)
mail (~> 2.5.4)
actionpack (4.0.1)
activesupport (= 4.0.1)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
active_utils (2.0.1)
activesupport (>= 2.3.11)
i18n
activemerchant (1.42.2)
active_utils (~> 2.0, >= 2.0.1)
activesupport (>= 2.3.14, < 5.0.0)
builder (>= 2.1.2, < 4.0.0)
i18n (~> 0.5)
json (~> 1.7)
money (< 7.0.0)
nokogiri (~> 1.4)
activemodel (4.0.1)
activesupport (= 4.0.1)
builder (~> 3.1.0)
activerecord (4.0.1)
activemodel (= 4.0.1)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.1)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.1)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.3.5)
arbre (1.0.1)
activesupport (>= 3.0.0)
arel (4.0.1)
asset_sync (1.0.0)
activemodel
fog (>= 1.8.0)
atomic (1.1.14)
bcrypt-ruby (3.1.2)
better_errors (1.0.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bourbon (3.1.8)
sass (>= 3.2.0)
thor
builder (3.1.4)
callsite (0.0.11)
carrierwave (0.9.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
celluloid (0.15.2)
timers (~> 1.1.0)
charlock_holmes (0.6.9.4)
chunky_png (1.2.9)
coderay (1.1.0)
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)
compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
compass-blueprint (0.0.1)
compass
compass-rails (2.0.alpha.0)
compass (>= 0.12.2, < 0.14)
connection_pool (1.1.0)
country_select (1.2.0)
crack (0.4.1)
safe_yaml (~> 0.9.0)
crummy (1.8.0)
dalli (2.6.4)
debug_inspector (0.0.2)
devise (3.1.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
thread_safe (~> 0.1)
warden (~> 1.2.3)
devise-async (0.8.0)
devise (>= 2.2, < 3.2)
diff-lcs (1.2.5)
docile (1.1.0)
dotenv (0.9.0)
erubis (2.7.0)
excon (0.28.0)
execjs (2.0.2)
factory_girl (4.3.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.3.0)
factory_girl (~> 4.3.0)
railties (>= 3.0.0)
ffi (1.9.3)
figaro (0.7.0)
bundler (~> 1.0)
rails (>= 3, < 5)
fog (1.18.0)
builder
excon (~> 0.28.0)
formatador (~> 0.2.0)
mime-types
multi_json (~> 1.0)
net-scp (~> 1.1)
net-ssh (>= 2.1.3)
nokogiri (~> 1.5)
ruby-hmac
foreman (0.63.0)
dotenv (>= 0.7)
thor (>= 0.13.6)
formatador (0.2.4)
formtastic (2.3.0.rc2)
actionpack (>= 3.0)
fssm (0.2.10)
fuubar (1.2.1)
rspec (~> 2.0)
rspec-instafail (~> 0.2.0)
ruby-progressbar (~> 1.0)
geocoder (1.1.8)
growl (1.0.3)
guard (2.2.4)
formatador (>= 0.2.4)
listen (~> 2.1)
lumberjack (~> 1.0)
pry (>= 0.9.12)
thor (>= 0.18.1)
guard-rspec (4.0.4)
guard (>= 2.1.1)
rspec (~> 2.14)
has_scope (0.6.0.rc)
actionpack (>= 3.2, < 5)
activesupport (>= 3.2, < 5)
heroku-deflater (0.5.2)
rack (>= 1.4.5)
hike (1.2.3)
i18n (0.6.5)
inherited_resources (1.4.1)
has_scope (~> 0.6.0.rc)
responders (~> 1.0.0.rc)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (4.1.0)
railties (>= 3.1.0)
json (1.8.1)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
listen (2.2.0)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lockfile (2.1.0)
lumberjack (1.0.4)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
meta_request (0.2.8)
callsite
rack-contrib
railties
method_source (0.8.2)
mime-types (1.25)
mini_magick (3.6.0)
subexec (~> 0.2.1)
mini_portile (0.5.2)
minitest (4.7.5)
money (6.0.0)
i18n (~> 0.6.4)
multi_json (1.8.2)
net-scp (1.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.7.0)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
orm_adapter (0.5.0)
pg (0.17.0)
polyamorous (0.6.4)
activerecord (>= 3.0)
polyglot (0.3.3)
pry (0.9.12.3)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
pry-rails (0.3.2)
pry (>= 0.9.10)
puma (2.6.0)
rack (>= 1.1, < 2.0)
rack (1.5.2)
rack-contrib (1.1.0)
rack (>= 0.9.1)
rack-protection (1.5.1)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.1)
actionmailer (= 4.0.1)
actionpack (= 4.0.1)
activerecord (= 4.0.1)
activesupport (= 4.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.1)
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.1)
actionpack (= 4.0.1)
activesupport (= 4.0.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.1.0)
ransack (1.1.0)
actionpack (>= 3.0)
activerecord (>= 3.0)
polyamorous (~> 0.6.0)
rb-fsevent (0.9.3)
rb-inotify (0.9.2)
ffi (>= 0.5.0)
rb-readline (0.5.0)
rdoc (3.12.2)
json (~> 1.4)
redis (3.0.6)
redis-namespace (1.3.2)
redis (~> 3.0.4)
responders (1.0.0)
railties (>= 3.2, < 5)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-instafail (0.2.4)
rspec-mocks (2.14.4)
rspec-rails (2.14.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
ruby-hmac (0.4.0)
ruby-progressbar (1.2.0)
safe_yaml (0.9.7)
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)
sidekiq (2.16.1)
celluloid (>= 0.15.2)
connection_pool (>= 1.0.0)
json
redis (>= 3.0.4)
redis-namespace (>= 1.3.1)
sidekiq-failures (0.2.2)
sidekiq (>= 2.9.0)
simple_form (3.0.0)
actionpack (>= 4.0.0, < 4.1)
activemodel (>= 4.0.0, < 4.1)
simplecov (0.8.1)
docile (~> 1.1.0)
lockfile (>= 2.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
sinatra (1.4.4)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
slim (2.0.2)
temple (~> 0.6.6)
tilt (>= 1.3.3, < 2.1)
slim-rails (2.0.3)
actionpack (>= 3.0, < 4.1)
activesupport (>= 3.0, < 4.1)
railties (>= 3.0, < 4.1)
slim (~> 2.0)
slop (3.4.7)
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)
subexec (0.2.3)
temple (0.6.7)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
timers (1.1.0)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (1.3.1)
coffee-rails
tzinfo (0.3.38)
uglifier (2.3.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
unf (0.1.3)
unf_ext
unf_ext (0.0.6)
vcr (2.7.0)
warden (1.2.3)
rack (>= 1.0)
webmock (1.16.0)
addressable (>= 2.2.7)
crack (>= 0.3.2)
PLATFORMS
ruby
DEPENDENCIES
activeadmin!
api!
asset_sync
better_errors
binding_of_caller
charlock_holmes
coderay (~> 1.1.0)
dalli
data_models!
factory_girl_rails
figaro
foreman
fuubar
growl
guard
guard-rspec
jquery-rails
meta_request
pg
pry-rails
puma
rails (= 4.0.1)
rails_12factor
rb-readline (~> 0.5.0)
redis
rspec-rails
sdoc
sidekiq
simplecov
sqlite3
store!
uglifier (>= 1.3.0)
vcr
webmock
任何帮助?
最佳答案
如果您像我一样并想继续使用 pry,请更改您的 Gemfile 以具有以下解决此问题的方法。
gem "pry", "0.9.12.2"
关于ruby-on-rails-4 - CodeRay 在 Rails 控制台中引发错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20104769/
sanitize 是什么意思在 Rails 中是什么意思? 我正在阅读 CanCanCan 的文档.它说: When using strong_parameters or Rails 4+, you
在过去的几个月里,我感觉自己对 Ruby on Rails (RoR) 开发的了解达到了极限。我为大/小客户和 friend /爱好项目开发了大大小小的应用程序。我知道如何开发这些应用程序,但开始感觉
我昨天参加了一个关于扩展 Rails 的聚会,其中一个主题是 Hexagonal Rails。然而,我只做了一年的 Rails,对 MVC 结构非常满意(也许太舒服了),所以我不太了解适配器和消息队列
我使用多个 Rails 应用程序,一些在 Rails 3.2/Ruby 2.0 上,一些在 Rails 2.3/Ruby 1.8.7 上。 他们的共同点是,随着他们的成长和添加更多的依赖项/ gem
这个问题在这里已经有了答案: Using Rails-UJS in JS modules (Rails 6 with webpacker) (5 个答案) 关闭 3 年前。 我正在尝试使用 UJS
我正在开发一个当前使用 Rails 1.2 的 Rails 应用程序,所以我现在离最新的稳定版本(Rails 2.3)还有很长的路要走。 我应该如何进行迁移到更新版本的 Rails 的过程? 我应该一
尝试按照 Ryan Bates Backbone.js 教程构建抽奖应用程序,但我已经遇到了第一段代码的问题。在 application.js 的 init 函数中,他初始化了 Raffler 路由的
我正在使用 Rails 3.2 并且我有一个数据库表,我想在其中找到符合以下条件的所有行: a = true and b = true and ( 0 true, :b =>
我有一个用户类和一个联系人,其中联系人是用户的子类。这两个类都存储在用户表中。 我的联系人可能有也可能没有电子邮件地址,而我的用户需要一个电子邮件地址(我的用户模型定义中有 validates_pre
我正在编写一个教程,我在其中演示了一些 rails 命令。在我的机器上 rails和 script/rails两者都同样有效。有“首选”形式吗?两者中哪一个更普遍? 最佳答案 当您运行 rails 时
我正在寻找有关通过我的应用程序前进的最佳方式的建议,这是我首次开始集成Elasticsearch。我是一名初学者,但是热衷于深入研究,以便原谅任何明显的错误! 我遵循了http://www.sitep
我刚刚用 Rails new 启动了一个新的 Rails 应用程序,将默认数据库设置更改为 PostgresSQL。我用 bin/rails s 启动服务器,结果很奇怪 2016-04-21 05:0
我收到一个参数并希望它是这样的字符串: "abc,efg" 或者像这样的数组 ["abc","efg"] 在第一种情况下,我想将它转换成一个数组,什么是好的方法? 这是我的想法 if params[:
我刚刚用 Rails new 启动了一个新的 Rails 应用程序,将默认数据库设置更改为 PostgresSQL。我用 bin/rails s 启动服务器,结果很奇怪 2016-04-21 05:0
我收到一个参数并希望它是这样的字符串: "abc,efg" 或者像这样的数组 ["abc","efg"] 在第一种情况下,我想将它转换成一个数组,什么是好的方法? 这是我的想法 if params[:
我有 Rails 4,这是我的默认版本(我仍然希望它是)。但我不想在我的电脑上添加 rails 3.2。在以下命令中:gem install rails -v 3.2.16 我有这个警告: railt
您好,我想使用 Sheevaplug 构建一个“Rails Brick”来自 Marvell(操作系统是开箱即用的 Ubuntu,但您可以在其上安装其他发行版)。它将成为家庭服务器和静音、低成本(99
我需要能够从 Rails 控制台发送我的 Rails 应用程序的 Postgres 数据库中所有未接受的邀请。 (我有一个名为 Invitations 的表,其中包含一个名为 accepted 的 b
validate :cannot_modify_if_locked, on: :update def cannot_modify_if_locked if self.locked erro
我正在学习教程(学习 Rails 播客),需要更改以下路由语法,以便它与 Rails 3.0 兼容。谁能帮忙? map.view_page ':name', :controller => 'viewe
我是一名优秀的程序员,十分优秀!