【发布时间】:2015-10-19 02:12:19
【问题描述】:
actionview 不能与 jruby 一起使用吗?这是我尝试过的
rvm 使用 2.2.2 红宝石测试.rb 红宝石:红宝石2.2.2p95 幻影:1.9.2 测试:foo\n\n rvm 使用 jruby 使用 /usr/local/rvm/gems/jruby-1.7.19 红宝石测试.rb /usr/local/rvm/gems/jruby-1.7.19/gems/activesupport-4.2.3/lib/active_support/core_ext/string/output_safety.rb:7 警告:已初始化常量 HTML_ESCAPE /usr/local/rvm/gems/jruby-1.7.19/gems/activesupport-4.2.3/lib/active_support/core_ext/string/output_safety.rb:8 警告:已初始化常量 JSON_ESCAPE /usr/local/rvm/gems/jruby-1.7.19/gems/activesupport-4.2.3/lib/active_support/core_ext/string/output_safety.rb:9 警告:已初始化常量 HTML_ESCAPE_REGEXP /usr/local/rvm/gems/jruby-1.7.19/gems/activesupport-4.2.3/lib/active_support/core_ext/string/output_safety.rb:10 警告:已初始化常量 HTML_ESCAPE_ONCE_REGEXP /usr/local/rvm/gems/jruby-1.7.19/gems/activesupport-4.2.3/lib/active_support/core_ext/string/output_safety.rb:11 警告:已初始化常量 JSON_ESCAPE_REGEXP /usr/local/rvm/gems/jruby-1.7.19/gems/activesupport-4.2.3/lib/active_support/core_ext/string/output_safety.rb:133 警告:已初始化常量 UNSAFE_STRING_METHODS /usr/local/rvm/gems/jruby-1.7.19/gems/actionview-4.2.3/lib/action_view/helpers/asset_url_helper.rb:111 警告:已初始化常量 URI_REGEXP /usr/local/rvm/gems/jruby-1.7.19/gems/actionview-4.2.3/lib/action_view/helpers/asset_url_helper.rb:166 警告:已初始化常量 ASSET_EXTENSIONS /usr/local/rvm/gems/jruby-1.7.19/gems/actionview-4.2.3/lib/action_view/helpers/asset_url_helper.rb:180 警告:已初始化常量 ASSET_PUBLIC_DIRECTORIES /usr/local/rvm/gems/jruby-1.7.19/gems/actionview-4.2.3/lib/action_view/helpers/tag_helper.rb:14 警告:已初始化常量 BOOLEAN_ATTRIBUTES /usr/local/rvm/gems/jruby-1.7.19/gems/actionview-4.2.3/lib/action_view/helpers/tag_helper.rb:23 警告:已初始化常量 TAG_PREFIXES /usr/local/rvm/gems/jruby-1.7.19/gems/actionview-4.2.3/lib/action_view/helpers/tag_helper.rb:25 警告:已初始化常量 PRE_CONTENT_STRINGS /usr/local/rvm/gems/jruby-1.7.19/gems/actionview-4.2.3/lib/action_view/helpers/javascript_helper.rb:6 警告:已初始化常量 JS_ESCAPE_MAP /usr/local/rvm/gems/jruby-1.7.19/gems/actionview-4.2.3/lib/action_view/record_identifier.rb:34 警告:已初始化常量 JOIN /usr/local/rvm/gems/jruby-1.7.19/gems/actionview-4.2.3/lib/action_view/record_identifier.rb:35 警告:已初始化常量新 红宝石:jruby 1.7.19 幻影:1.9.2 测试:foo\n\n
我的 tests.rb 包含
一个测试脚本
类应用 需要'action_view' 包括 ActionView::Helpers::TextHelper
# 做一些先决条件检查
def pre_checks
放“红宝石:”+ruby --version[0..12]
放“phantomjs:”+phantomjs --version
puts "测试:"+truncate(DATA.read.to_s.gsub("\n",'\n'),长度:65)
结束
结束
app = App.new app.pre_checks 结束 富
【问题讨论】:
标签: jruby actionview