SammyLin / redactor-rails

This repo is deprecated. Please check out official gem for Redactor 2. https://github.com/Redactor2/redactor2_rails
MIT License
389 stars 253 forks source link

Assets not found when redactor render the iframe #8

Closed raykin closed 12 years ago

raykin commented 12 years ago

I've following error on my development log when use redactor-rails ActionController::RoutingError (No route matches [GET] "/observation_tiles/false/css/style.css") when I remove

<%= f.text_area :content, :rows => '3', :cols => '65', :style => "height: 300px;" %>

or add a new id to text_area ,then error gone. I check a little on the source code and not sure if redactor.js does load some css that conflict with sth. Thanks.

rubinsh commented 12 years ago

I had the same issue, you need to precompile the css directory of redactor-rails: In order to do so, add the following line to your application.rb:

 config.assets.precompile += ["redactor-rails/css/*"]

and in config/redactor.yml add the following values: path: '/assets/redactor-rails' css: 'style.css'

@SammyLin - I think that this should be added to the wiki

SammyLin commented 12 years ago

thanks @rubinsh

this is solution is good

but i want change load redactor-rails config method.

so wait me later :)

raykin commented 12 years ago

@rubinsh agreed.