Sau RAILS_ENV=production bundle exec rake assets:precompile
số dropdown không phản hồi trong môi trường phát triển. Không có gì xảy ra khi nhấp vào nút. Tuy nhiên việc xóa mọi thứ khỏi public/assets
sẽ bắt đầu hoạt động. Ngoài ra, nó hoạt động hoàn hảo ở chế độ sản xuất (rails s -e production
)Twitter Bootstrap Dropdown bị hỏng sau khi phần tử biên dịch trước
Ứng dụng này sử dụng twitter bootstrap và active admin. Có vẻ như có gì đó đang nhận được conflicted.
Lưu ý ở đây nó hoạt động tốt trong dàn trên Heroku
Dưới đây là một cái búng html tạo
<li id="organization-selector" class="dropdown">
<a href="/" data-toggle="dropdown" data-target="#organization-selector" class="dropdown-toggle">
RedKivi
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="/organizations/1">RedKivi</a>
</li>
<li>
<a href="/organizations/2">BoTree</a>
</li>
<li class="divider"></li>
<li>
<a href="/organizations/new">New organization</a>
</li>
</ul>
</li>
ứng dụng/tài sản/stylesheets/application.css.scss
...
....
*= require_self
*= require jquery.ui.slider
*= require_tree .
ứng dụng/asset/javascripts/application.js
//= require jquery
//= require jquery_ujs
//= require jquery.ui.slider
//= require bootstrap
//= require_tree .
Thực tiễn là gì để biên dịch trước nội dung?
Hoạt động như một sự quyến rũ! Cảm ơn bạn – Neoecos