[英]Ruby on Rails ActiveAdmin + TinyMCE error
I was following the guide I found online to put ActiveAdmin and TinyMCE together into use, but I encountered a strange error which I was not able to search up the solution for it. 我遵循了我在网上找到的将ActiveAdmin和TinyMCE结合使用的指南,但是遇到一个奇怪的错误,无法为其找到解决方案。
One part of it was to add in this line to config/initializers/active_admin.rb : 其中一部分是将这一行添加到config / initializers / active_admin.rb中 :
config.register_javascript 'tinymce.js' config.register_javascript'tinymce.js'
However, when I try to run the app, an error says: 但是,当我尝试运行该应用程序时,出现错误消息:
/Users/RageBill/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/bundler/gems/activeadmin-5ebf476abd92/lib/active_admin/application.rb:49:in method_missing': undefined method
register_javascript' for # (NoMethodError) /Users/RageBill/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/bundler/gems/activeadmin-5ebf476abd92/lib/active_admin/application.rb:49:in
method_missing': undefined method
register_javascript'对于#(NoMethodError)
Any thoughts on how can I resolve this problem? 关于如何解决此问题的任何想法? Thank you very much :)
非常感谢你 :)
(PS my rails version is 5.1.3 if that would be helpful.) (如果有帮助,请注意,我的rails版本为5.1.3。)
I found: https://github.com/activeadmin/activeadmin/issues/340 我发现了: https : //github.com/activeadmin/activeadmin/issues/340
This sholud work: 这项愚蠢的工作:
ActiveAdmin.setup do |config|
config.register_stylesheet "//cdn.foo.net/example.css"
config.register_javascript "//cdn.foo.net/example.js"
# ...
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.