Galleria not showing up on Heroku in Rails app

无人久伴 提交于 2019-12-12 05:56:14

问题


For my Rails app I'm using Galleria - http://galleria.io/ It all works fine locally, but when I deploy the app to heroku, galleria is gone.

Not really sure why..

Here's my code :

   <div id="galleria">
     <% for image in @trip.images %>    
     <%= link_to image_tag(image.image.url(:thumb)), image.image.url(:large), :title => image.title %>
     <% end %>
   </div>
    <script>

     Galleria.run('#galleria');
     Galleria.configure({
         minScaleRatio: 1,
         maxScaleRatio: 1,


    });
    </script>
   </div>

application.js

 //= require jquery
 //= require jquery_ujs
 //= require bootstrap
 //= require galleria-1.2.7
 //= require galleria.classic.min
 //= require_tree .

application.css

*= require_self
*= require galleria.classic
*= require_tree .

All the files being required above are in here :

  app\assets\javascripts
  app\assets\stylesheets

And I don't see any errors in my heroku log files either, so I am bit lost here. Any ideas why it is not showing up ?

Thank You for your time!


回答1:


The answer in more detail is here: Where to put Galleria (jQuery image gallery framework) in Rails 3.1 Asset Pipeline?

I had to change this line in galleria.classic.js

css: 'galleria.classic.css',

with

css: false,

And it worked!



来源:https://stackoverflow.com/questions/11687497/galleria-not-showing-up-on-heroku-in-rails-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!