lesce
lesce

Reputation: 6324

Rails + tinymce-rails weird error

I'm using tinymce-rails for a form .... until last night everything worked fine ... this morning when I came in and tried to run the form I get this error

undefined local variable or method 'tinymce'

the weird part is if I save the controller with :w in vim without making any changes to the file ... the error disappears and everything works ... any ideas ?

Upvotes: 2

Views: 1447

Answers (3)

lesce
lesce

Reputation: 6324

I fixed it by adding helper(TinyMCE::Rails::Helper) in the controller but I still have no idea what happened

Upvotes: 2

AlSayed Gamal
AlSayed Gamal

Reputation: 332

gem update tinymce-rails
bundle update

And you should get your gem updated

Upvotes: 1

Siddhartha Mukherjee
Siddhartha Mukherjee

Reputation: 6228

I had similar issue (rails 3.1), may be because i was using the advance theme. then added this in application.js

//= require tinymce //= require tinymce-jquery

and the theme folder from tinymce to assets folder

Worked for me... not sure if it helps.

Upvotes: 2

Related Questions