我在将 react.rb 添加到我的项目时遇到了麻烦。
起初, 在完成所有添加步骤后reactive_rails_generator
,我启动了我的应用程序,我收到了错误:
ActionView::Template::Error (undefined method `load_asset' for Opal::Sprockets:Module):
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
应用程序/视图/布局/网格/layout.html.erb:15:
我看到所有需要 gem 的 In Gemfile 来使用 react.rb
gem 'reactive-ruby' gem 'react-rails', '~> 1.3.0' gem 'opal-rails' gem 'therubyracer', platforms: :ruby gem 'react-router-rails', '~>0.13.3' gem 'reactive-router' gem 'reactive-record'
任何人都可以帮忙吗?
其次,我有一个 rake 任务消息:
Warning:[rake --tasks] DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
register_mime_type
请使用然后使用register_compressor
or注册一个 mime 类型register_transformer
。
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(从 /Users/serzh/.rvm/gems/ruby 调用-2.3.1@global/gems/opal-0.8.0/lib/opal/sprockets/processor.rb:165) 弃用警告:Sprockets 方法register_engine
已弃用。register_mime_type
请使用然后使用register_compressor
or注册一个 mime 类型register_transformer
。
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(从 /Users/serzh/.rvm/gems/ruby 调用-2.3.1@global/gems/opal-0.8.0/lib/opal/sprockets/processor.rb:166) 弃用警告:Sprockets 方法register_engine
已弃用。register_mime_type
请使用然后使用register_compressor
or注册一个 mime 类型register_transformer
。
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(从 /Users/serzh/.rvm/gems/ruby 调用-2.3.1@global/gems/opal-0.8.0/lib/opal/sprockets/erb.rb:23)