정말, 언젠가는로드가 중단됩니다. 나는 레일즈 5.0.0.beta3을 계속 사용 해왔다. 로그에는 assets /에서 아무 것도로드하려고 시도하지 않습니다. 문서가 지시하는대로 모든 것이 설정되었습니다. Gemfile :응용 프로그램 컨트롤러에 모듈을 추가 할 때 bootstrap-sass가 Rails에서 종료됩니까?
gem 'sass-rails', '~> 5.0'
gem 'bootstrap-sass', '~> 3.3.6'
application.scss :
@import "bootstrap-sprockets";
@import "bootstrap";
가
//= require jquery
//= require jquery-ui
//= require bootstrap-sprockets
//= require jquery_ujs
//= require turbolinks
//= require_tree .
또한, config.ru하는
require 'bootstrap-sass'
을 추가하는 시도 application.js. 도움이되지 않았다.
UPDATE :
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
include SomeModule
end
아이디어 :
그래서, 그것은 부트 스트랩처럼 보이는 내가 너무 좋아, 내 응용 프로그램 컨트롤러에 모듈을 추가하려고 할 때마다 죽는다? 여기
는 모듈입니다 :module BeforeOrAfter
attr_accessor :past
attr_accessor :future
require "date"
def initialize
@future = []
@past = []
end
def before_or_after(event)
if event < DateTime.now
@past << event.id
else
@future << event.id
end
end
end
모든 모듈에서 발생합니까? 빈 모듈은 어떻습니까? – Owen
흠, 빈 모듈로 잘 작동합니다. – sivanes
포함하고있는 모듈의 세부 정보를 공유하십시오. 아마도 bootstrap-sass와 충돌하는 함수를 정의했을 것입니까? – Owen