brentd / xray-rails

☠️ A development tool that reveals your UI's bones
MIT License
1.22k stars 79 forks source link

Rails 4.1.0 support #32

Closed julioprotzek closed 10 years ago

julioprotzek commented 10 years ago

Adding following version to Gemfile

gem 'xray-rails', '~> 0.1.12'

Raises the following exception:

undefined method `variant' for nil:NilClass
brentd commented 10 years ago

Interesting. Haven't tried the 4.1.0 beta yet, would love a patch to fix this.

I'm not calling a method variant anywhere to my knowledge. Sounds like a rubygems thing.

jasonl99 commented 10 years ago

I am seeing the same thing. Here's the last half dozen lines in the stack trace

NoMethodError - undefined method variant' for nil:NilClass: actionpack (4.1.0.beta1) lib/abstract_controller/rendering.rb:108:in_normalize_render' actionpack (4.1.0.beta1) lib/abstract_controller/rendering.rb:41:in render_to_string' actionpack (4.1.0.beta1) lib/action_controller/metal/rendering.rb:19:inrender_to_string' xray-rails (0.1.12) lib/xray/middleware.rb:65:in xray_bar' xray-rails (0.1.12) lib/xray/middleware.rb:40:inblock in call' xray-rails (0.1.12) lib/xray/middleware.rb:40:in `call'

iwiznia commented 10 years ago

Same here...

brentd commented 10 years ago

Closing this. If you're using Rails 4.1.0, use git HEAD for fix above.

julioprotzek commented 10 years ago

Awesome!

On Friday, March 7, 2014 at 2:06 PM, Brent Dillingham wrote:

Closed #32 (https://github.com/brentd/xray-rails/issues/32).

— Reply to this email directly or view it on GitHub (https://github.com/brentd/xray-rails/issues/32).

jmuheim commented 10 years ago

Hasn't this been addressed yet in the gem itself? Still getting this error, even when referencing MASTER:

  gem 'xray-rails', github: 'brentd/xray-rails' # Reveals your UI's bones with Cmd-X/Ctrl-X
brentd commented 10 years ago

@jmuheim not yet. see #38. I'm going to do some testing today and hopefully get a release out.

peeyushsingla commented 10 years ago

I am getting this issue any update?

julioprotzek commented 10 years ago

@peeyushsingla the new version of xray-rails already solves the problem.

mohelsaka commented 8 years ago

I'm getting the same issue with rails 5.0.0