1

This is a bit tricky because Heroku uses a Read-only Filesystem across their Dyno Grid.

Which means when trying to install ckeditor remotely, I get an error :

heroku rake db:migrate
rake aborted!
Read-only file system - /disk1/home/slugs/362142_8858805_b85c-f2f3955d-f087-4bc4-8b1b-b6e898403a10/mnt/public/javascripts/ckcustom.js

ckcustom.js is a config file to manage your meta settings for ckeditor. I was wondering if anyone else had these troubles, and what they did to get around them?

Trip
  • 26,756
  • 46
  • 158
  • 277
  • Have you tried any of these steps? http://www.joshcrews.com/blog/using-heroku-to-host-your-rails-cms if so, can you post the migration file that's failing? – Jesse Wolgamott Nov 29 '10 at 21:51
  • seems like what he's doing is extracting all the files from the plugin and manually embedding them in the application itself. but wouldn't it still write temp files in my public/ dir? I have at the very least read twenty times over the rails-ckeditor repository. – Trip Nov 29 '10 at 21:59
  • Did you get this working? Getting errors myself doing a db:migrate on heroku with a ckeditor app – Chris Kimpton Feb 13 '11 at 18:34
  • Yes to fix this, run the server as production on your local, then add commit those new files to heroku. You're all set – Trip Feb 13 '11 at 18:59

4 Answers4

0

The solution that worked for me was the following:

Make sure to

bundle update ckeditor

and then, add these lines to config/application.rb

config.assets.precompile += Ckeditor.assets
config.assets.precompile += %w( ckeditor/* )
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)

This was answered in this other stack overflow thread: Problems with ckeditor running on production Rails application with Heroku

Community
  • 1
  • 1
user2953607
  • 97
  • 1
  • 2
  • 8
0

Is there a reason why you're not just committing it to git and pushing it to heroku along with the rest of your source? I've never had to configure CKeditor with heroku, but that ought to work AFAIK.

Keith Gaddis
  • 4,113
  • 23
  • 20
  • i am committing it to git, and pushing it to heroku, yes. then after i do that i perform `rake db:migrate`, and thats where it fails, and this ticket takes up. – Trip Nov 29 '10 at 19:27
0

The reason this error occured was because Heroku ran on my production environment. Because CKEditor is being set up on a new environment, it attempts to write a bunch of files. Because Heroku is a read-only file system it aborts this process. In order to bypass this error :

On your local machine, perform this :

rails s -e production

View your site, CKeditor will write those files for production env.

git add .
git commit -m "added files to Production for Heroku"
git push heroku master

It should now!

Trip
  • 26,756
  • 46
  • 158
  • 277
0

A cheap way to do it is to go to easy_ckeditor/init.rb and comment out the check_and_install:

#require 'ckeditor_file_utils'
#CkeditorFileUtils.check_and_install
Will Sargent
  • 4,346
  • 1
  • 31
  • 53