kreativgebiet/rich

undefined method `html_default_value' while working with rails_admin 0.6.5

Opened this issue · 4 comments

I configured rich just as shown on wiki page to work with rails_admin, however when I try to edit a resource which should use rich I get:

ActionView::Template::Error (undefined method `html_default_value' for #<RailsAdmin::Config::Fields::Types::RichEditor:0x00000005583b08>):
    1: = form.send 'text_area', field.method_name, field.html_attributes.reverse_merge((hdv = field.html_default_value).nil? ? {} : { :value => hdv })
    2: 
    3: = javascript_include_tag "rich/base.js"
    4: :javascript
rich (1.4.6) app/views/rails_admin/main/_form_rich_text.html.haml:1

Is rich compatible with rails_admin 0.6.5?

I solve this with following step

replace

gem 'rich'

to

gem 'rich', github: 'bastiaanterhorst/rich'

and if you are using heroku do this too

https://github.com/bastiaanterhorst/rich/wiki/Troubleshooting

I had the same problem with rails_admin 0.7.0. Sourcing the directly from github solved it.

Can this be done without specifying the repo?

The same problem fixed using the answer of @zackexplosion, thanks.

@zackexplosion how did you fix this problem? I still fight with it ;(