ckeditor "Browse Server"

I started with the ckeditor rails demo and everything worked
beautifully.

Then I deployed a couple of sites using a heavily customized "Easy"
toolbar and everything works great. In these instances I completely
disable any file upload or management capability.

Next, I implemented the "Full" version for another project so that I
could have the full functionality of the image uploads, etc. I
installed the paperclip bundle, manually created my assets/pictures
folder and manually copied the assets table from the demo app.

Everything works beautifully in the upload department. But when you
click "Browse Server" it throws an application routing error.

var upload_path = "<%=
new_attachment_path_with_session_information(:image) %>"

which is in the images.html.erb

After a couple of hours of unsuccessfully trying to correct the
configuration, and then attempting to disable the button altogether, I
resorted to crude hackery and simply overwrote all of my ckeditor
folders with the perfectly functioning folders from the demo version.

I still got the same error. So I tried creating a symlink but that did
not help either. I also check my yaml file and it is exactly the same as
in the demo.

Can anyone help? I would be happy if I could just hide the Browse
Server button. I obviously can't go into production with this mess.

Ned Pearson wrote:

I started with the ckeditor rails demo and everything worked
beautifully.

Then I deployed a couple of sites using a heavily customized "Easy"
toolbar and everything works great. In these instances I completely
disable any file upload or management capability.

Next, I implemented the "Full" version for another project so that I
could have the full functionality of the image uploads, etc. I
installed the paperclip bundle, manually created my assets/pictures
folder and manually copied the assets table from the demo app.

Everything works beautifully in the upload department. But when you
click "Browse Server" it throws an application routing error.

var upload_path = "<%=
new_attachment_path_with_session_information(:image) %>"

which is in the images.html.erb

After a couple of hours of unsuccessfully trying to correct the
configuration, and then attempting to disable the button altogether, I
resorted to crude hackery and simply overwrote all of my ckeditor
folders with the perfectly functioning folders from the demo version.

I still got the same error. So I tried creating a symlink but that did
not help either. I also check my yaml file and it is exactly the same as
in the demo.

Can anyone help? I would be happy if I could just hide the Browse
Server button. I obviously can't go into production with this mess.

Solved my own problem.

After you create the assets table, and the assets/pictures directory you
have to copy three .rb files from "examples/attachment_fu" into your
application's app/models folder.

Once you've done that and bumped your server, the file browser and full
asset managment capability works.

Perhaps, this post will contribute to needed documentation for others
rails users using ckeditor.

Ned

That helped but didn't completely solve my problem (but it saved
plenty of time so thanks!)

If you're running Rails pre 2.3, you'll have to change :key to
:session_key in your ckeditor_helper.rb file.