I am going to bet this is a mongrel issue,because this doesn''t happen under webrick. Anyway, I was able to get fckeditor: http://www.fckeditor.net/ to work under rails: http://www.joshuamcharles.com/xhtml/fckrails.php i even saw the part about adding "1. Adding a YAML configuration file. For example, create $(RAILS_ROOT)/config/mongrel_mime.yml with the contents: xml: "text/xml" 2. When starting mongrel_rails, add the configuration file using the "-m" option, e.g.: mongrel_rails start -m config/mongrel_mime.yml" and that gives me a text box when i translate that to mongrel_cluster.yml ad a config: mongrel_mime.yml line to it. The issue now is I ONLY get a textbox that renders html it back. I can''t get my buttons like font,style, color,etc back. I have checked this all under webrick and its a go, but not under a 3 node mongrel cluster. Anyone have any ideas? Thanks. Andrew
Eoin Curran
2006-Sep-11 13:29 UTC
[Mongrel] fckeditor works, but i cant get my buttons back...
I had something similar I think - after getting the mongrel config right I had to clear the browser cache before fckeditor worked properly. Presumably the browser had cached the incorrect content type. e. andrew wrote:> I am going to bet this is a mongrel issue,because this doesn''t happen > under webrick. Anyway, I was able to get fckeditor: http://www.fckeditor.net/ > to work under rails: http://www.joshuamcharles.com/xhtml/fckrails.php > i even saw the part about adding "1. Adding a YAML configuration file. For example, create > $(RAILS_ROOT)/config/mongrel_mime.yml with the contents: > > xml: "text/xml" > > 2. When starting mongrel_rails, add the configuration file using the > "-m" option, e.g.: > > mongrel_rails start -m config/mongrel_mime.yml" > > and that gives me a text box when i translate that to mongrel_cluster.yml ad a config: mongrel_mime.yml line to it. > > The issue now is I ONLY get a textbox that renders html it back. I can''t get my buttons like font,style, color,etc back. I have checked this all under webrick and its a go, but not under a 3 node mongrel cluster. > > Anyone have any ideas? > > Thanks. > > Andrew > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
Kirk Haines
2006-Sep-11 14:34 UTC
[Mongrel] fckeditor works, but i cant get my buttons back...
On 9/11/06, Eoin Curran <eoin at peelmeagrape.net> wrote:> I had something similar I think - after getting the mongrel config right > I had to clear the browser cache before fckeditor worked properly. > Presumably the browser had cached the incorrect content type.So long as the content type of the files are returned correctly, there should be no problem with FCKeditor through mongrel. I have a site working under IOWA+Mongrel that is using fckeditor in its CMS without any problem. Mongrel defines a content type for .js files: ".js" => "text/javascript", That does beg a question, though, Zed. Why text/javascript and not application/javascript? text/javascript is considered obsolete by the RFC, in favor of application/javascript. Note that Austin Zeigler''s mime/types library, while it has the mime type defined in it, it does not tie it to the .js file suffix. I think this is an oversight and have emailed Austin about it, but if you use mime/types for anythng, be aware of this. Kirk Haines
> -------Original Message------- > From: Kirk Haines <wyhaines at gmail.com> > Subject: Re: [Mongrel] fckeditor works, but i cant get my buttons back... > Sent: Sep 11 ''06 08:34 > > On 9/11/06, Eoin Curran <eoin at peelmeagrape.net> wrote: > > I had something similar I think - after getting the mongrel config right > > I had to clear the browser cache before fckeditor worked properly. > > Presumably the browser had cached the incorrect content type. > > So long as the content type of the files are returned correctly, there > should be no problem with FCKeditor through mongrel. I have a site > working under IOWA+Mongrel that is using fckeditor in its CMS without > any problem. > > Mongrel defines a content type for .js files: > > ".js" => "text/javascript",Thanks. Sorry for such a basic question, but under mongrel_cluster.yml I have (obviously path to app is not literal): cwd: /path/to/app port: "8000" config: config/mongrel_mime.yml environment: production address: 127.0.0.1 pid_file: log/mongrel.pid servers: 12 I even tried dropping the config/ part. in the config/mongrel_mime.yml file i have: js: "text/javascript", xml: "text/xml" I even tried what you literally pasted initally, and that still doesn''t work. Is mime handling the job of the front end webserver aka apache2 with mod_proxy_balancer or should this really "just work"tm Thanks Andrew> > That does beg a question, though, Zed. Why text/javascript and not > application/javascript? text/javascript is considered obsolete by the > RFC, in favor of application/javascript. > > Note that Austin Zeigler''s mime/types library, while it has the mime > type defined in it, it does not tie it to the .js file suffix. I > think this is an oversight and have emailed Austin about it, but if > you use mime/types for anythng, be aware of this. > > > Kirk Haines > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
Kirk Haines
2006-Sep-11 15:33 UTC
[Mongrel] fckeditor works, but i cant get my buttons back...
On 9/11/06, andrew <andrew at sophrinix.com> wrote:> in the config/mongrel_mime.yml file i have: > js: "text/javascript", > xml: "text/xml" > > I even tried what you literally pasted initally, and that still doesn''t work.Oh, I just cut and pasted that from lib/mongre/handelers.rb> Is mime handling the job of the front end webserver aka apache2 with mod_proxy_balancer > or should this really "just work"tmI''m sleep and reading impaired today, so I didn''t notice that you have mongrel_cluster in the mix. I''m pretty ignorant on mongrel_cluster, so I don''t know how that might complicate things. However, in general, if mongrel is receiving your request for /editorpath/fckeditor.js, it should be returning the file contents with a mimetype of text/javascript or application/javascript (or even application/x-javascript). Now, your browser, when it runs this javascript, will generate another request for /editorpath/editor/fckeditor.html (probably with some query string arguments attached to it, interestingly). If that is returned to your browser, too, then you should see the editor. You can test this by using some tool to see what HTTP headers are being sent when fckeditor.js is retreived. wget -S http://servername.com/editorpath/fckeditor.js is one way. Make sure that the headers, and especially the content type look right. Kirk Haines
Eoin Curran
2006-Sep-11 16:00 UTC
[Mongrel] fckeditor works, but i cant get my buttons back...
Do you need a dot in front of the extension? My mongrel_mime.yml has: --- .xml: text/xml .xpi: application/x-xpinstall and is working with fckeditor. e.> > in the config/mongrel_mime.yml file i have: > js: "text/javascript", > xml: "text/xml" >
Zed Shaw
2006-Sep-11 21:31 UTC
[Mongrel] fckeditor works, but i cant get my buttons back...
On Mon, 2006-09-11 at 08:34 -0600, Kirk Haines wrote:> On 9/11/06, Eoin Curran <eoin at peelmeagrape.net> wrote: > > I had something similar I think - after getting the mongrel config right > > I had to clear the browser cache before fckeditor worked properly. > > Presumably the browser had cached the incorrect content type. > > So long as the content type of the files are returned correctly, there > should be no problem with FCKeditor through mongrel. I have a site > working under IOWA+Mongrel that is using fckeditor in its CMS without > any problem. > > Mongrel defines a content type for .js files: > > ".js" => "text/javascript", > > That does beg a question, though, Zed. Why text/javascript and not > application/javascript? text/javascript is considered obsolete by the > RFC, in favor of application/javascript. > > Note that Austin Zeigler''s mime/types library, while it has the mime > type defined in it, it does not tie it to the .js file suffix. I > think this is an oversight and have emailed Austin about it, but if > you use mime/types for anythng, be aware of this.Uh, I got that from the lighttpd mime types everyone is using. I believe I''ve had a few people say the few mime types mongrel has are wrong, but when they go look them up they are only "technically" wrong. In practice old ass browsers from companies in WA still don''t have a clue. That being said, if you need to change it then that''s why mongrel accepts the mime yaml file. Those types were just the bare minimum to get a rails app up. YMMV. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
Zed Shaw
2006-Sep-11 21:43 UTC
[Mongrel] fckeditor works, but i cant get my buttons back...
On Mon, 2006-09-11 at 09:19 -0600, andrew wrote:> > > -------Original Message------- > > From: Kirk Haines <wyhaines at gmail.com> > > Subject: Re: [Mongrel] fckeditor works, but i cant get my buttons back... > > Sent: Sep 11 ''06 08:34 > >> Thanks. Sorry for such a basic question, but under mongrel_cluster.yml > I have (obviously path to app is not literal): > cwd: /path/to/app > port: "8000" > config: config/mongrel_mime.yml > environment: production > address: 127.0.0.1 > pid_file: log/mongrel.pid > servers: 12 >I''ll have to try your config out, but use absolute paths for this stuff. The relative paths were an oversite I''m trying to correct.> I even tried dropping the config/ part. > > in the config/mongrel_mime.yml file i have: > js: "text/javascript", > xml: "text/xml" >I think you need to dump what is actually getting sent back to the browser. Until then you''re just guessing. Check out: http://livehttpheaders.mozdev.org/ And see what''s really going on.> I even tried what you literally pasted initally, and that still doesn''t work. > > Is mime handling the job of the front end webserver aka apache2 with mod_proxy_balancer > or should this really "just work"tmYeah, that''s another thing, you probably need to get this working for development, but in your production deployment you *really* do not want Mongrel handling this. It''s such a waste of a perfectly good Apache server. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
Zed Shaw
2006-Sep-11 21:44 UTC
[Mongrel] fckeditor works, but i cant get my buttons back...
On Mon, 2006-09-11 at 17:00 +0100, Eoin Curran wrote:> Do you need a dot in front of the extension? My mongrel_mime.yml has: > --- > .xml: text/xml > .xpi: application/x-xpinstall > > and is working with fckeditor. > e.Oh yeah, duh. Also, there should be a log message in log/mongrel.log yelling at you about not having a . in front of your mime types. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.