2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RailsアプリでBowerで入れたAdminLTEの表示が動かなくなった件

Last updated at Posted at 2016-06-10

経緯

新しく環境作って、RailsのアプリケーションをデプロイしてみたらAdminLTEのデザインが崩れた!

AdminLTEはrails-bowerでインストールされていました。

原因

jQueryのバージョンが3になったことが影響してるみたいです。
AdminLTEのdependenciesがちゃんと指定されていないからみたい。

jquery-railsでインストールされているjQueryとrails-bowerでインストールしたAdminLTEのjQuery名前が両方jqueryになって重複してるっぽい。

対処法

jquery-railsのjQuery2系を使ってやれば治ります。

application.js内の以下の部分を変えたら、jquery-railsのjQuery2系を使ってくれます。

- //= require jquery
+ //= require jquery2

まとめ

俺に黙ってアップデートすんな、と言いたくなった。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?