actionview不适用于jruby吗?这是我试过的
rvm使用2.2.2 ruby tests.rb 红宝石:红宝石2.2.2p95 幻影:1.9.2 测试:foo \ n \ n rvm使用jruby 使用/usr/local/rvm/gems/jruby-1.7.19 ruby tests.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警告:已初始化为常数NEW ruby:jruby 1.7.19 幻影:1.9.2 测试:foo \ n \ n
我的tests.rb包含
a test script
class App
require 'action_view'
include ActionView::Helpers::TextHelper
# does soms prerequisite checks
def pre_checks
puts "ruby: "+ruby --version
[0..12]
puts "phantomjs: "+phantomjs --version
puts "tests: "+truncate(DATA.read.to_s.gsub("\n",'\n'), length: 65)
end
end
ruby --version
答案 0 :(得分:0)
你应升级到JRuby 1.7.21 ...似乎$LOAD_PATH
'扩展'问题存在于1.7.19(自定义以来)