spohlenz / tinymce-rails

Integration of TinyMCE with the Rails asset pipeline
Other
816 stars 258 forks source link

Undefined method 'paths' on render in production #193

Open mkunkel opened 8 years ago

mkunkel commented 8 years ago

I thought that this was related to #190, but it turns out to be a separate issue. After I changed my Gemfile to use GitHub as the source, I had the same issue. My form renders properly locally, but in production, it results in the following error:

F, [2016-01-08T00:07:06.532486 #1221] FATAL -- : 
NoMethodError (undefined method `paths' for nil:NilClass):
  app/views/casein/events/_form.html.slim:32:in `_app_views_casein_events__form_html_slim__4391335209824336539_27317980'
  app/views/casein/events/new.html.slim:4:in `block in _app_views_casein_events_new_html_slim__3019693885241575845_35561680'
  app/views/casein/events/new.html.slim:3:in `_app_views_casein_events_new_html_slim__3019693885241575845_35561680'
mkunkel commented 8 years ago

Closing this issue, as this is now working after a server reboot.

AlexShmatko commented 8 years ago

How did you resolve this?

mkunkel commented 8 years ago

Unknown. I restarted the server and no longer saw this error.

AlexShmatko commented 8 years ago

It's so frustrating! I have spent the whole day trying to figure out what's the issue! And I keep getting the exact same error as your title says. No idea how to handle this.

AlexShmatko commented 8 years ago

Specifying source in Gemfile fixed the issue

gem 'tinymce-rails', git: 'git@github.com:spohlenz/tinymce-rails.git'

dwickwire commented 8 years ago

I just ran into this when I restarted my server. Upgrading to 4.3.3 didn't work either.

The fix was to run rake asset:precompile on production.

Changing the gem to source from github is unrelated, its likely a deploy that ran an asset precompile for @AlexShmatko which fixed it for him too. I run an asset precompile during my deploy so I have more to investigate.

What a weird error.