加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 在预编译资源上获取此错误:TypeError:无法消

发布时间:2020-12-16 20:27:33 所属栏目:百科 来源:网络整理
导读:我是一个相对较新的Rails程序员,当我尝试预编译资源(甚至有时运行服务器)时,我得到这个错误: TypeError: couldn't digest ActiveSupport::StringInquirer /Users/Lucia/jruby/lib/ruby/gems/shared/gems/sprockets-3.5.2/lib/sprockets/digest_utils.rb:83:
我是一个相对较新的Rails程序员,当我尝试预编译资源(甚至有时运行服务器)时,我得到这个错误:
TypeError: couldn't digest ActiveSupport::StringInquirer

    /Users/Lucia/jruby/lib/ruby/gems/shared/gems/sprockets-3.5.2/lib/sprockets/digest_utils.rb:83:in `digest'
    /Users/Lucia/jruby/lib/ruby/gems/shared/gems/sprockets-3.5.2/lib/sprockets/loader.rb:55:in `block in load'
    /Users/Lucia/jruby/lib/ruby/gems/shared/gems/sprockets-3.5.2/lib/sprockets/loader.rb:312:in `block in fetch_asset_from_dependency_cache'
    org/jruby/RubyArray.java:1560:in `each'
    org/jruby/RubyEnumerable.java:1016:in `each_with_index'
   /Users/Lucia/jruby/lib/ruby/gems/shared/gems/sprockets-3.5.2/lib/sprockets/loader.rb:308:in `fetch_asset_from_dependency_cache'
   /Users/Lucia/jruby/lib/ruby/gems/shared/gems/sprockets-3.5.2/lib/sprockets/loader.rb:44:in `load'

我已经尝试关闭开发中的消化,并尝试使用指定开发的RAILS_ENV标志运行耙子任务,但没有结果.

我已经尝试在google上看这个问题,似乎找不到任何相关的东西.

我正在运行jRuby 9.0.5.0和rails 4.2.5.2.

解决方法

尝试启动这些命令:
RAILS_ENV=test bundle exec rake assets:clean
RAILS_ENV=test bundle exec rake tmp:cache:clear
RAILS_ENV=test bundle exec rake assets:precompile

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读