问题
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