Webpack required Components file not found first boot #5
Description
Following Hyperloop Webpack Tutorial doesn't quite work first boot.
Declare your React library in app/javascript/packs/client_and_server.js:
ReactMaterialize = require("react-materialize");
Run the command webpack, so it will generate the package client_and_server.js into public/packs
Tell Hyperloop where is located your package:
# config/initializers/hyperloop.rb:
config.import 'client_and_server'
In order to help Rails and Hyperloop to find the client_and_server.js package:
# config/initializers/assets.rb
Rails.application.config.assets.paths << Rails.root.join('public', 'packs')
But there is some kind of bug. I did the above, cleared cache and started the server but it refused to boot: couldn't find file 'client_and_server' with type 'application/javascript' (Sprockets::FileNotFound). However I can see the ./public/packs folder in the lookup paths in the error output below, so the config is correct.
I got it to work by commenting out `config.import 'client_and_server' and booting the server once. Of course Hyperloop can't find the component but at least the app boots this time.
Then I stop the server, add the config.import line back and restart the server. This time it can find the file and boots and the component works in Hyperloop.
So, what is Rails doing on that first boot that bin/webpack didn't do? Our webpacker config is stock but I note yours is different, perhaps Rails changed something.
I just reproduced the issue in our app by rm -rf tmp/cache
again. You don't even have to load the app in a browser, just booting the app is enough.
Error Output
=> Booting Puma => Rails 5.1.4 application starting in development => Run `rails server -h` for more startup options##########################################################################
HYPERLOOP LIBRARIES PRECOMPILING AND MINIFYING
FIRST TIME BOOTING YOUR APP IT CAN TAKE 1 OR 2 MINUTES
NB: You can force precompiling again by cleaning cache: rm -rf tmp/cache
##########################################################################Compiling the system assets for hyperloop-prerender-loader-system-code
'
require 'opal'
require 'hyperloop-config'
require 'hyper-component'
require 'hyper-model'
require 'hyper-store'
require 'react/react-source-browser'
require 'react/react-source-server' # SERVER ONLY
require 'hyper-react'
require 'hyper-operation'
require 'reactrb/auto-import'
require 'hyper-router'
require 'hyper-router/react-router-source'
require 'hyper-i18n'
require 'hyper-console'
require 'opal_hot_reloader'
require 'models/000_application_record'
require 'client_and_server'
Exiting
/Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/resolve.rb:65:inresolve!': couldn't find file 'client_and_server' with type 'application/javascript' (Sprockets::FileNotFound) Checked in these paths: /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-0.10.5/opal /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-0.10.5/stdlib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-0.10.5/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyperloop-config-0.9.11/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-jquery-0.4.2/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-store-0.2.3/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-activesupport-0.3.0/opal /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-react-0.12.7/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/react-rails-1.9.0/lib/assets/react-source/development-with-addons /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-react-0.12.7/lib/react-sources /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-component-0.12.3/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mutations-0.8.1/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-operation-0.5.12/lib/sources /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-operation-0.5.12/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-operation-0.5.12/vendor /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-mesh-0.6.0/lib/sources /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-mesh-0.6.0/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-mesh-0.6.0/vendor /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-model-0.6.0/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-browser-0.2.0/opal /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/paggio-0.2.6/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-router-4.1.1/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/hyper-i18n-6a3e0ce43f0f/lib /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal_hot_reloader-0.1.4/opal /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-console-0.1.4/lib /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/app/assets/flash /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/app/assets/fonts /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/app/assets/images /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/app/assets/javascripts /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/app/assets/stylesheets /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/vendor/assets/javascripts /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/vendor/assets/stylesheets /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyper-console-0.1.4/vendor/assets/stylesheets /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-rails-0.9.3/lib/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/sibyl-1b2d5a5ebeec/app/assets/images /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/sibyl-1b2d5a5ebeec/app/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/sibyl-1b2d5a5ebeec/app/assets/stylesheets /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rails_admin-1.2.0/app/assets/images /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rails_admin-1.2.0/app/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rails_admin-1.2.0/app/assets/stylesheets /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rails_admin-1.2.0/vendor/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rails_admin-1.2.0/vendor/assets/stylesheets /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/nested_form-0.3.2/vendor/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/jquery-ui-rails-5.0.5/app/assets/images /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/jquery-ui-rails-5.0.5/app/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/jquery-ui-rails-5.0.5/app/assets/stylesheets /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/font-awesome-rails-4.7.0.2/app/assets/fonts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/font-awesome-rails-4.7.0.2/app/assets/stylesheets /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/remotipart-1.3.1/vendor/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/cocoon-1.2.10/app/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/zeroclipboard-rails-0.1.2/app/assets/images /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/zeroclipboard-rails-0.1.2/app/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/jquery-rails-4.3.1/vendor/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/materialize-sass-0.97.7/app/assets/fonts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/materialize-sass-0.97.7/app/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/materialize-sass-0.97.7/app/assets/stylesheets /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/coffee-rails-4.2.2/lib/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actioncable-5.1.4/lib/assets/compiled /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionview-5.1.4/lib/assets/compiled /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/app/hyperloop /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/app/hyperloop /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/app/views /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/node_modules /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/public/packs /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/react-rails-1.9.0/lib/assets/react-source/development /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/react-rails-1.9.0/lib/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/materialize-sass-0.97.7/app/assets/stylesheets /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/materialize-sass-0.97.7/app/assets/javascripts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/materialize-sass-0.97.7/app/assets/fonts /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/materialize-sass-0.97.7/app/assets/images from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/context.rb:88:in
resolve'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:259:inresolve_with_compat' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/context.rb:142:in
require_asset'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-0.10.5/lib/opal/sprockets/processor.rb:69:inblock in process_requires' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-0.10.5/lib/opal/sprockets/processor.rb:67:in
each'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-0.10.5/lib/opal/sprockets/processor.rb:67:inprocess_requires' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/opal-0.10.5/lib/opal/sprockets/processor.rb:48:in
evaluate'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/tilt-2.0.8/lib/tilt/template.rb:109:inrender' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/legacy_tilt_processor.rb:25:in
call'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:incall_processor' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in
block in call_processors'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:inreverse_each' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in
call_processors'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:inload_from_unloaded' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in
block in load'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:infetch_asset_from_dependency_cache' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in
load'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:inblock in initialize' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in
load'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/bundle.rb:23:inblock in call' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/utils.rb:200:in
dfs'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/bundle.rb:24:incall' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in
call_processor'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:inblock in call_processors' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in
reverse_each'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:incall_processors' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in
load_from_unloaded'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:inblock in load' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in
fetch_asset_from_dependency_cache'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:inload' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in
block in initialize'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:inload' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in
find_asset'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/environment.rb:30:infind_asset' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:92:in
[]'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyperloop-config-0.9.11/lib/hyperloop/imports.rb:105:incompile_and_compress' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyperloop-config-0.9.11/lib/hyperloop-prerender-loader-system.js.erb:1:in
_evaluate_template'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/erb_processor.rb:26:incall' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/erb_processor.rb:13:in
call'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:incall_processor' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in
block in call_processors'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:inreverse_each' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in
call_processors'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:inload_from_unloaded' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in
block in load'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:infetch_asset_from_dependency_cache' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in
load'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:inblock in initialize' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in
load'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/bundle.rb:23:inblock in call' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/utils.rb:200:in
dfs'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/bundle.rb:24:incall' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in
call_processor'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:inblock in call_processors' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in
reverse_each'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:incall_processors' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in
load_from_unloaded'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:inblock in load' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in
fetch_asset_from_dependency_cache'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:inload' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in
block in initialize'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:inload' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in
find_asset'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sprockets-3.7.1/lib/sprockets/environment.rb:30:infind_asset' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/hyperloop-config-0.9.11/lib/hyperloop/rail_tie.rb:56:in
block in class:Railtie'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:67:inblock in execute_hook' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:60:in
with_execution_control'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:65:inexecute_hook' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:50:in
block in run_load_hooks'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:ineach' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/lazy_load_hooks.rb:49:in
run_load_hooks'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/application/finisher.rb:73:inblock in <module:Finisher>' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in
instance_exec'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:inrun' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/initializable.rb:59:in
block in run_initializers'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:228:inblock in tsort_each' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:350:in
block (2 levels) in each_strongly_connected_component'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:431:ineach_strongly_connected_component_from' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:349:in
block in each_strongly_connected_component'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:347:ineach' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:347:in
call'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:347:ineach_strongly_connected_component' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:226:in
tsort_each'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/2.4.0/tsort.rb:205:intsort_each' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/initializable.rb:58:in
run_initializers'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/application.rb:353:ininitialize!' from /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/config/environment.rb:5:in
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bootsnap-1.1.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:inrequire' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bootsnap-1.1.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in
require'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:inblock in require' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in
load_dependency'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:inrequire' from config.ru:2:in
block in '
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:55:ininstance_eval' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:55:in
initialize'
from config.ru:innew' from config.ru:in
'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:49:ineval' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:49:in
new_from_string'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:40:inparse_file' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/server.rb:319:in
build_app_and_options_from_config'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/server.rb:219:inapp' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:24:in
app'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/server.rb:354:inwrapped_app' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:80:in
log_to_stdout'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:42:instart' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:135:in
block in perform'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:intap' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in
perform'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:inrun' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in
invoke_command'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:indispatch' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in
perform'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command.rb:44:ininvoke' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in
'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bootsnap-1.1.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:inrequire' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bootsnap-1.1.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in
require'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:inblock in require' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in
load_dependency'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:inrequire' from /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/bin/rails:9:in
<top (required)>'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:inload' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in
call'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:incall' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client.rb:30:in
run'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/bin/spring:49:in<top (required)>' from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in
load'
from /Users/sfcgeorge/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in<top (required)>' from /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/bin/spring:15:in
require'
from /Users/sfcgeorge/Documents/Websites/Work/JobLab/code/joblab/bin/spring:15:in<top (required)>' from bin/rails:3:in
load'
from bin/rails:3:in `'
Other issues with the docs:
- Doesn't mention having to run
webpack
(noob info I know but important) - I don't understand the asset pipeline option, surely it can't work as plain JS doesn't understand ES6
require()
and I get errors to that effect? - Not clear why there are 3 places to import JS stuff (webpack packs, asset manifest, hyperloop config).
- Since it's in the asset pipeline and webpack tag, surely these components are loaded twice?