You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application.js I'm trying to add /= require file that exist in different directory then javascript folder
Actual behavior
I get always
Sprockets::FileNotFound at /
couldn't find file 'datatables/dataTables.bootstrap' with type 'application/javascript'
System configuration
Sprockets version : 3.6.2
Sprockets-rails version : 3.0.4
Ruby version : 2.3.0
Rails version : 5.0.0.rc1
Example App
This is my application.js : //= require datatables/dataTables.bootstrap
This is my config.ru :
# This file is used by Rack-based servers to start the application.
require_relative 'config/environment'
require 'sprockets'
map '/assets' do
environment = Sprockets::Environment.new
environment.append_path 'vendor/plugins/adminlte/plugins'
run environment
end
map '/' do
run Rails.application
end
# run Rails.application
And this is the link of folder I'm trying to add :
I couldn't figure out your meaning when you said "the link of the folder I'm trying to add." definitely go ahead and fork my example and send a PR if you want to clarify that.
however, I think you won't need to.
the readme for AdminLTE, the gem you're trying to use, says that this line:
= require datatables/dataTables.bootstrap
goes in the application.css file. But your description above says that you put it in the application.js file.
So, although I was unable to reproduce your error in my example app, I think you may have just put a CSS require inside a JS file.
Expected behavior
In my
application.js
I'm trying to add/= require
file that exist in different directory thenjavascript
folderActual behavior
I get always
System configuration
Example App
This is my
application.js
://= require datatables/dataTables.bootstrap
This is my
config.ru
:And this is the link of folder I'm trying to add :
The text was updated successfully, but these errors were encountered: