1

I try to install react-router and material-ui on my rails 4 app but I get Sprockets::FileNotFound error for react-router and material-ui. I follow instructions from rails-assets.org.

My Gemfile:

source 'https://rails-assets.org' do
  gem 'rails-assets-classnames'
  gem 'rails-assets-lodash'
  gem 'rails-assets-react-router'
  gem 'rails-assets-material-ui'
end

application.js

//= require jquery
//= require lodash
//= require jquery_ujs
//= require react
//= require classnames
//= require react_ujs
//= require react-router
//= require turbolinks
//= require_tree .

And after bundle I got this notification on some gems This component doesn't define main assets in bower.json.. Thank you for your time and I hope we work this out.

UPD 1:

I found kind of a solution on stackoverflow but I would like to stick to rails-assets.org way if possible.

  • ruby '2.2.0'
  • rails '4.2.3'
Community
  • 1
  • 1

1 Answers1

0

Might be easy to forget, but have you restarted your (running) rails server?

Started to use rails-assets yesterday as well and it showed me the exact same problem (Sprockets::FileNotFound).

I restarted the running server in the console and the problem was solved.

Rails 4.2.5 / Ruby 2.3.