CKeditor in rails 3.1 failed. #751

Merged
merged 1 commit into from Oct 3, 2011

Projects

None yet

4 participants

@japetheape

Rails admin tried to load: /javascripts/ckeditor/ckeditor.js. Sprockets then compained because this file could not be found in the sprockets load path.

Changed into javascripts/ckeditor/ckeditor.js and this worked, ckeditor.js was then served out of public/javascripts and my error gone.

@bbenezech bbenezech merged commit b8da2bb into sferik:master Oct 3, 2011
@bbenezech
Collaborator

Thanks!

@rgarner
rgarner commented Oct 5, 2011

Running with this patch from my machine with Webrick as a dev server causes rails_admin to GET from /assets/javascripts/ckeditor/ckeditor.js , which then 404s. Removing the patch makes things work again (by going through /javascripts/ckeditor/ckeditor.js). What server environment was this failing in?

@bbenezech bbenezech added a commit that referenced this pull request Oct 5, 2011
@bbenezech bbenezech revert 0ed1650
About #751
39c7d21
@bbenezech
Collaborator

@rgarner Yeah, same her. I reverted the patch.
@japetheape You probably have a config issue?

edit
You still need

  config.serve_static_assets = true

still CKeditor files won't go through Sprockets

@rgarner
rgarner commented Oct 6, 2011

Hi @bbenezech, this morning I bundle update'd and now I get the same problem @japetheape had. I've tried the config.serve_static_assets = true fix but still no joy. Can't see anything in the commit logs that might have caused this, but noticed that we're on javascript_include_tag rather than head_javascript in _form_text.html.haml now?

EDIT:

Ok, have noticed that this all works with Sprockets 2.0.0, but I get the FileOutsidePaths error on 2.0.2 . Might have a quick dive through some Sprockets commits...

@rgarner
rgarner commented Oct 6, 2011

@bbenezech @japetheape This looks like confirmation of the > 2.0.0 issue:

https://gist.github.com/1258942

For now, the workaround would appear to be to hold Sprockets at 2.0.0 unless this commit has made it into your version of Rails rails/rails@fd8f0b2

@bbenezech
Collaborator

Thanks for investigating! Not a RA issue, then.

@rgarner
rgarner commented Oct 6, 2011

No, but it might be worth posting the workaround somewhere more visible for now.

@bbenezech
Collaborator

Sure, feel free to send a PR. Thanks!

@rgarner
rgarner commented Oct 6, 2011

Of course. Excuse me, sometimes I get stuck in the Sourceforge mindset where the docs page belongs to someone else ;)

@ExReanimator

Same problem in rails 3.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment