Code Monkey home page Code Monkey logo

rails-gallery's Issues

Can't include gem in Rails 3.2.7

Uncaught exception: /usr/lib/ruby/gems/1.8/gems/rails-gallery-0.2.1/lib/rails-gallery/view_helper/galleria.rb:5: syntax error, unexpected ':', expecting kEND
content_tag :a, href: "/assets/#{photo.path}" do

"gallery_image :responsive, photo, wrap: true" raises "wrong number of arguments (3 for 2)"

When using the responsive gallery via:

.gallery
  = render partial: 'gallery/template/responsive'
  = render partial: 'gallery/responsive', locals: { photos: @property.photos }

it loads the file "app/views/gallery/_responsive.html.haml" with contains in the last line:

= gallery_image :responsive, photo, wrap: true

But in the file "lib/rails-gallery/view_helper.rb" the definition of gallery_image only has 2 arguments:

def gallery_image type, photo
      meth_name = "#{type}_gallery_image"
      validate_gallery_photo! photo
      unless respond_to? meth_name
        raise ArgumentError, "Gallery #{type} is not yet supported. Please add a View helper module for this gallery using the convention followed by the other galleries..." 
      end
      send(meth_name, photo)
    end

If I try to remove the last argument (wrap: true) the images are not wrapped.

How can I fix that?

Because I see in this page "http://tympanus.net/Tutorials/ResponsiveImageGallery/" the gallery works fine.

Thanks

Galleria's Fatal Error

After including the gem in the Gemfile and bundle install and configuring Galleria, I receive this error for built-in classic theme.

Fatal error: Theme CSS could not load after 20 sec. Please download the latest theme at http://galleria.io/customer/

I'm not sure if that's Galleria's error or the gem's error. So, I'll be creating an issue on both repositories, just to be sure.

I'm on ruby 2.1.0p0, rails 4.1.0 & rails-gallery 0.3.3 it's happening on both localhost and development. The gallery however does work as expected with no problem whatsoever.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.