ccocchi / rabl-rails

Rails 4.2+ templating system with JSON, XML and Plist support.
MIT License
209 stars 51 forks source link

Rails 4 support? #41

Closed silasdavis closed 10 years ago

silasdavis commented 11 years ago

Can we have it? Anything I can do to help?

ccocchi commented 11 years ago

Yes it will be coming with the version 0.4.0 of the gem. I just want to finish integrating caching to the 0.3.X branch before having master becoming compatible with Rails 4 (in case of backward compatibility).

To help, you can try to use the gem with Rails 4 (and up the requirement version in the gemspec), and see what happens ;)

wolflee commented 11 years ago

up the requirement versions in the gemspec as: https://github.com/wolflee/rabl-rails/blob/master/rabl-rails.gemspec and no luck:

$ rails s
=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/usr/local/opt/rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require': cannot load such file -- rabl (LoadError)
    from /usr/local/opt/rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
    ...
ccocchi commented 11 years ago

Hmm weird, it is trying to require rabl and rabl-rails. Do you have a line in your code that explicitly require the other gem?

wolflee commented 11 years ago

Whoops.. forgot to remove the line in the rabl config file under initializers directory..

I removed the lines in the config file and it works fine. Where do put the config file though?

ccocchi commented 11 years ago

You can put rabl-rails configuration into another file, for example config/initializers/rabl_rails.rb

zeroedin commented 10 years ago

[Update] Ignore this i was missing the colon in front of the instance variable in my rabl views... doh.

I'm messing with trying to up to 4.0 @wolflee did you have any issues with instance variables in the rabl views being nill?

wolflee commented 10 years ago

@zeroedin Sorry, I hadn't tried to use rabl-rails any further... simply using rabl fits what I need, the performance isn't a critical issue for me.

jasonswett commented 10 years ago

What's the status on this? If there's anything I can do, I'm willing to help.

nayefc commented 10 years ago

Looks like this gem is dead with 7 months passing without an update on Rails 4.

ccocchi commented 10 years ago

I haven't had the time to work on the migration or on features backport from rabl, but pull requests are welcome.

ccocchi commented 10 years ago

Rails 4 will be supported in the next release (0.4.0) and is already available in master

joel commented 10 years ago

yeah ! :+1: