heroku problem--just getting a plain textarea where a tinymce should be

121 views
Skip to first unread message

Roy Pardee

unread,
Mar 16, 2010, 5:52:46 PM3/16/10
to tinymce_hammer
Hey All,

I am delighted with the ease with which I was able to install
tinymce_hammer and get it working on my localhost dev environment.

I'm deploying my app to heroku though, and am disappointed to find
that the form.tinymce calls that result in a tinymce instance on my
localhost just wind up plain old textarea.

Is there a trick to getting this to work on heroku?

Many thanks!

-Roy

trevorrowe

unread,
Mar 16, 2010, 6:37:58 PM3/16/10
to tinymce_hammer
I am not very familiar with the Heroku platform, but I suspect the
issue is how the app uses the caches_page method in its controller.
Basically tinymce_hammer combines all of the javascript required
(often 15 or more js files) into one file with languages, theme
javascripts, the main libs, etc. This combined file is cached to disk
via caches_page so subsequent requests don't hit the rails app.

You could verify my hunch by opening vendor/plugins/tinymce_hammer/app/
controllers/tinymce/hammer_controller.rb and commenting out line 7.
Save that to your repo and redeploy to heroku.

Let me know if that works.

steve fox

unread,
Mar 16, 2010, 8:50:33 PM3/16/10
to tinymce...@googlegroups.com
Heroku is a read-only filesystem, and I think some of these editors may attempt to plunk something temporarily onto disk.  I ran into the same problem with wymeditor.  Perhaps you should give fckeditor a try.  I got that to work as expected on heroku.

Steve

--
You received this message because you are subscribed to the Google Groups "tinymce_hammer" group.
To post to this group, send email to tinymce...@googlegroups.com.
To unsubscribe from this group, send email to tinymce_hamme...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tinymce_hammer?hl=en.


Roy Pardee

unread,
Mar 16, 2010, 9:05:51 PM3/16/10
to tinymce...@googlegroups.com
Sure enough--that does work.  Thanks!

So I take it I'll take a perf hit b/c the tinymce javascript will have to d/l on every request anew?

Thanks!

--
You received this message because you are subscribed to the Google Groups "tinymce_hammer" group.
To post to this group, send email to tinymce...@googlegroups.com.
To unsubscribe from this group, send email to tinymce_hamme...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tinymce_hammer?hl=en.




--
Roy Pardee
http://facebook.com/rpardee

Trevor Rowe

unread,
Mar 16, 2010, 10:23:29 PM3/16/10
to tinymce...@googlegroups.com
Not as bad as you might think.  Because it is a std javascript file generated, the browser will cache the file.  This means it will be regenerated/downloaded once per client browser, but not once per request.

steve fox

unread,
Mar 16, 2010, 10:26:24 PM3/16/10
to tinymce...@googlegroups.com
On Tue, Mar 16, 2010 at 8:05 PM, Roy Pardee <rpa...@gmail.com> wrote:
Sure enough--that does work.  Thanks!

So I take it I'll take a perf hit b/c the tinymce javascript will have to d/l on every request anew?

I'm not sure.  To be honest, all I did was look at the logs after seeing the editor fail to load ($> heroku logs) and then installed fck instead.  It's possible there exists config setting where you can specify where tinymce drops its temp files.  If so you then perhaps can change the location your app's tmp directory[1].   But once I got fck to work, my client was happy and I didn't delve into the matter any further.

I'm a little spooked by allowing my clients to upload html and shove it into my database anyway.  One guy just dropped a form into the 'main copy' section of his 'about' page, then yelled at me about why it wasn't working as the post he'd aped it from claimed.  (Be sure to smile when you speak.  They'll hear it on the other end.)   Good times.

Steve


1. http://docs.heroku.com/constraints
 
Reply all
Reply to author
Forward
0 new messages