Skip to content
This repository

Asset pipeline issue #16

6twenty opened this Issue August 20, 2012 · 11 comments
Mike Fulcher

rails generate redactor:config generates the file app\assets\redactor-rails\config.js. This will not work in the asset pipeline correctly as the rake assets:precompile task will still take config.js from the gem instead of the app (not that it'll work fine in development though). See

The solution is to create your own config.js (or any file name) and put it anywhere in your app's assets. Then when requiring redactor, instead of //= require redactor-rails, use:

//= require redactor-rails/redactor.min
//= require path/to/custom/config

Alternatively you could keep the initial require statement the same, but instead of overriding redactor-rails/config.js, you need to override redactor-rails/index.js instead and use the following lines in it:

//= require ./redactor.min
//= require path/to/custom/config
Mike Fulcher

A solution for this gem could be for the rails generate redactor:config command to generate a custom redactor-rails/index.js instead of redactor-rails/config.js

Sapan Upadhyay

I actually ran into this problem too. What I did is just create a new event listener, such as $(".redactorbox") instead of $(".redactor"). It's not the most elegant solution, but it was a quick fix (oh deadlines) until I could figure out a better solution.


@6twenty - I've had the same issue, solved it the way you did, and was about to open the same issue and then I ran into yours :-)

@SammyLin - please solve - I agree with @6twenty's solution.

Nishant Modak

@SammyLin Is this on the radar? Would be good to have this in the gem itself - rather than fixing it as above.



I got same problem.


:+1: Same issue

Andrei Vladescu-Olt

:+1: Same here


But there is only config.js in my app/assets/redactor-rails folder and i can't find any other file about redactor... where are they?

Roma Milushov

same issue

Scott Weisman

+1 for @6twenty's solution

Jeremy Haile

+1 I had the same problem. Used @6twenty's solution to work around the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.