I am having problems integrating Galleria with my rail. Here is the deal:
These are the locations of my files:
/root/rails_project/sample_app/app/assets/stylesheets/galleria.classic.css.scss /root/rails_project/sample_app/app/assets/javascript/galleria-1.2.7.min.js /root/rails_project/sample_app/app/assets/javascript/galleria-1.2.7.min.js /root/rails_project/sample_app/app/assets/javascript/galleria.classic.js /root/rails_project/sample_app/app/assets/javascript/classic-loader.gif /root/rails_project/sample_app/app/assets/javascript/classic-map.png
In my application.css application, I added this line:
*= require galleria.classic
In my application.js application, I added this line:
//= require galleria-1.2.7 //= require galleria.classic
Finally, this is my file:
<h1>Displaying Photos</h1> <script src="/root/rails_project/sample_app/app/assets/javascript/galleria-1.2.7.min.js"></script> <div id="abc"> <% @pictures.each do |picture| %> <% if (picture.tag).include? @tag %> <ol class="microposts"> <li id="<%= picture.id %>"> <span class="content"> <%= image_tag picture.photo.url(:medium) %> </span> </li> </ol> <% end %> <% end %> </div> <script> Galleria.loadTheme('/root/rails_project/sample_app/app/assets/javascript/galleria.classic.min.js'); Galleria.run('#abc'); </script>
When I refresh my page, none of the images are displayed. In addition, I get the following error message:
Fatal error: theme in / root / rails _project / sample_app / app / assets / javascript / galleria.classic.min.js cannot load, check the path to the theme.
Please help me where exactly to place my files.
Thanks in advance!
source share