undefined local variable or method `include_tiny_mce_if_needed'
-
Kieran P
Hmm, I am unable to get the same issue you are describing. We've been using TinyMCE in development, production, and test without issue for some time.
Can you start a new Rails app, and get the problem to occur with as little code as possible please. Then zip it and attach here. I'll try it on my end. If I'm lucky, it'll get the error (something I can debug). If I don't, them it might be something in your ruby environment.
-
ronin-71764 (at lighthouseapp)
after doing exactly what is mentioned in the install howto, I get an error that is different but I think has to do with the same issue:
undefined method `development?' for "development":Stringthis happens when i add the line
<%= include_tiny_mce_if_needed %>i figured out that it might have to do with <%= javascript_include_tag :all %> and I noticed that when I restart my server, a tinymce folder is created in public/javascripts, which is not loaded in my head tag when i drop the if_needed line in favor of include :all.
Hope that helps,
droom! -
Kieran P
In the tiny_mce_helpers.rb file (or similarly named file depending on what version of the plugin/gem you've got installed), replace
Rails.env.development?with
Rails.env == 'development'I believe the error you're getting is because you're using a Rails version prior to 2.3?
If the above change works for you, I'll make a commit to fix this in the next release.
-
ronin-71764 (at lighthouseapp)
thanks kieran - this works perfectly. and you are right - this was rails 2.1.0-4 (ubuntu), but with this modification, it works out nicely ;)
-
Kieran P
- State changed from open to resolved
-
Kieran P
- State changed from resolved to open
Hey jan.jones. As my first comment pointed out, I'm unable to reproduce this issue. Can you try the fix a few comments up. If that works, I'll push out a new tiny mce gem release with it soon.
-
Kieran P
- State changed from open to stale
There is a brand new release (0.1.2). Please post back if this release hasn't fixed the issue you were getting.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.