Giter Club home page Giter Club logo

tilt-jbuilder's People

Contributors

a2ikm avatar alindeman avatar cervinka avatar jhoffner avatar linchus avatar milkcocoa avatar mrjoy avatar nazipov avatar stephencelis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tilt-jbuilder's Issues

ArgumentError - wrong number of arguments

I'm getting the following error while trying to render with jbuilder. Any ideas why?

ArgumentError - wrong number of arguments (0 for 1+):
/Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/tilt-jbuilder-0.5.3/lib/tilt/jbuilder.rb:6:in initialize' /Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/jbuilder-2.0.3/lib/jbuilder.rb:53:innew'
/Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/jbuilder-2.0.3/lib/jbuilder.rb:53:in encode' /Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/tilt-jbuilder-0.5.3/lib/tilt/jbuilder.rb:51:inblock in evaluate'
/Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/tilt-jbuilder-0.5.3/lib/tilt/jbuilder.rb:51:in eval' /Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/tilt-jbuilder-0.5.3/lib/tilt/jbuilder.rb:51:inblock in evaluate'
/Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/tilt-jbuilder-0.5.3/lib/tilt/jbuilder.rb:49:in eval' /Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/tilt-jbuilder-0.5.3/lib/tilt/jbuilder.rb:49:inevaluate'
/Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/tilt-1.4.1/lib/tilt/template.rb:103:in render' /Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/sinatra-1.4.4/lib/sinatra/base.rb:805:inrender'
/Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/tilt-jbuilder-0.5.3/lib/sinatra/jbuilder.rb:14:in render_with_view_path_support' /Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/sinatra-contrib-1.4.1/lib/sinatra/engine_tracking.rb:91:inblock in render'
/Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/sinatra-contrib-1.4.1/lib/sinatra/engine_tracking.rb:83:in with_engine' /Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/sinatra-contrib-1.4.1/lib/sinatra/engine_tracking.rb:91:inrender'
/Users/Martin/.rvm/gems/ruby-2.0.0-p247@sagittarius/gems/tilt-jbuilder-0.5.3/lib/sinatra/jbuilder.rb:7:in `jbuilder'

Support Lotus Framework

@anthonator Wondering if you would like to pair with me to make the game works with Lotus?

In term of design, Lotus leverages tilt for its templating engine, so it should be very straight-forward to get it hooked I believe.

Heads up: Tilt lazy loading of tilt/jbuilder is being deprecated

I wanted to let you know that I've deprecated the lazy loading of tilt/jbuilder by default in tilt. See jeremyevans/tilt@98a75d3. To allow for a transition period, the deprecated support will remain until tilt 3 is released (no ETA yet, and unlikely to be this year). I recommend that you adjust your documentation to explain to users that tilt/jbuilder should be required manually before using the tilt integration.

ArgumentError: file or block required

I'm running into this whenever I call json.partial!. Sinatra 1.4.5, tilt-1.4.1, til-jbuilder-0.6.1. I can get it to load a template if I do this:

template = Tilt::JbuilderTemplate.new 'index.jbuilder'

But if I try to use the block or call json.partial!, I get the error in the title. Any help is appreciated!

Partial error message

Rendering partials like json.partial! 'sizes' with non existing file fails with ArgumentError - file or block required.
That's a bit frustrating when there is a typo in a file name, because I definitely pass the file.
Tilt has a special error for this case TypeError, "Can't load the template file. Pass a string with a path ... I guess this is the expected error in case when file couldn't be found.

Runtime error with latest Hanami

When installing this gem alongside the latest Hanami version, after creating a .json.jbuilder file, this pops up when reloading the browser:

Boot Error

Something went wrong while loading /home/x/hanami/bookshelf/config.ru

NameError: undefined local variable or method `binding' for #<Hanami::View::Rendering::Scope:0x00558771791078>

/home/x/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/hanami-view-0.8.0/lib/hanami/view/rendering/layout_scope.rb:270:in `method_missing'
/home/x/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/hanami-view-0.8.0/lib/hanami/view/rendering/scope.rb:72:in `method_missing'

Support for cache! and cache_if!

I'm interested in adding support for this feature. Any insight into what it would take to accomplish this would be very helpful. Thanks!

Failing with JRuby 1.7.3

LoadError: no such file to load -- securerandom
48  require at org/jruby/RubyKernel.java:1027
49   (root) at /home/travis/.rvm/gems/jruby-1.7.3-d19/gems/activesupport-3.2.12/lib/active_support.rb:24
50  require at org/jruby/RubyKernel.java:1027
51   (root) at /home/travis/.rvm/gems/jruby-1.7.3-d19/gems/activesupport-3.2.12/lib/active_support/time.rb:1
52  require at org/jruby/RubyKernel.java:1027
53   (root) at /home/travis/.rvm/gems/jruby-1.7.3-d19/gems/activesupport-3.2.12/lib/active_support/time.rb:1
54  require at org/jruby/RubyKernel.java:1027
55   (root) at /home/travis/.rvm/gems/jruby-1.7.3-d19/gems/activesupport-3.2.12/lib/active_support/core_ext/hash/conversions.rb:1
56  require at org/jruby/RubyKernel.java:1027
57   (root) at /home/travis/.rvm/gems/jruby-1.7.3-d19/gems/activesupport-3.2.12/lib/active_support/core_ext/hash/conversions.rb:2
58  require at org/jruby/RubyKernel.java:1027
59   (root) at /home/travis/.rvm/gems/jruby-1.7.3-d19/gems/activesupport-3.2.12/lib/active_support/core_ext/hash.rb:1
60  require at org/jruby/RubyKernel.java:1027
61   (root) at /home/travis/.rvm/gems/jruby-1.7.3-d19/gems/activesupport-3.2.12/lib/active_support/core_ext/hash.rb:1
62     load at org/jruby/RubyKernel.java:1046
63   (root) at /home/travis/.rvm/gems/jruby-1.7.3-d19/gems/jbuilder-1.0.2/lib/jbuilder.rb:1
64     each at org/jruby/RubyArray.java:1613
65   (root) at /home/travis/.rvm/gems/jruby-1.7.3-d19/gems/jbuilder-1.0.2/lib/jbuilder.rb:4
66   (root) at /home/travis/build/anthonator/tilt-jbuilder/lib/tilt/jbuilder.rb:1
67   (root) at /home/travis/build/anthonator/tilt-jbuilder/lib/tilt/jbuilder.rb:1
68   (root) at /home/travis/build/anthonator/tilt-jbuilder/spec/sinatra_integration_spec.rb:1

I believe this is an issue with JRuby and RubyGems and not tilt-jbuilder but it's making travis puke so I want to document it.

rubygems/rubygems#507

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.