Javascript application.js中的引导链轮存在问题
正如标题中所说,当我尝试访问localhost:3000时,会收到一条错误消息 信息是:Javascript application.js中的引导链轮存在问题,javascript,ruby-on-rails,bootstrap-4,localhost,sprockets,Javascript,Ruby On Rails,Bootstrap 4,Localhost,Sprockets,正如标题中所说,当我尝试访问localhost:3000时,会收到一条错误消息 信息是: Sprockets::FileNotFound in Welcome#index Showing /home/dameaw/work/five/meawinit/app/views/layouts/application.html.erb where line #8 raised: couldn't find file 'bootstrap-sprockets' with type 'applicati
Sprockets::FileNotFound in Welcome#index
Showing /home/dameaw/work/five/meawinit/app/views/layouts/application.html.erb where line #8 raised:
couldn't find file 'bootstrap-sprockets' with type 'application/javascript'
Checked in these paths:
/home/dameaw/work/five/meawinit/app/assets/config
/home/dameaw/work/five/meawinit/app/assets/images
/home/dameaw/work/five/meawinit/app/assets/javascripts
/home/dameaw/work/five/meawinit/app/assets/stylesheets
/home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/coffee-rails-4.2.2/lib/assets/javascripts
/home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/jquery-rails-4.3.5/vendor/assets/javascripts
/home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/toastr-rails-1.0.3/vendor/assets/javascripts
/home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/toastr-rails-1.0.3/vendor/assets/stylesheets
/home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bootstrap-sass-2.3.2.2/vendor/assets/images
/home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bootstrap-sass-2.3.2.2/vendor/assets/javascripts
/home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bootstrap-sass-2.3.2.2/vendor/assets/stylesheets
/home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/actioncable-5.1.7/lib/assets/compiled
/home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/actionview-5.1.7/lib/assets/compiled
/home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/turbolinks-source-5.2.0/lib/assets/javascripts
我试图在application.js文件中去掉“//=require bootstrap sprockets”,但当我这样做时,样式完全被破坏了
感谢您提前提供的建议,祝您度过愉快的一天:)如果您使用的是Bootstrap 4,那么您是否仔细遵守了本指南-?您还需要按照指南中的说明添加
jquery
。如果您使用的是Bootstrap3,那么您是否仔细遵循了这一点?