rich icon indicating copy to clipboard operation
rich copied to clipboard

undefined method `html_default_value' while working with rails_admin 0.6.5

Open jacek213 opened this issue 10 years ago • 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?

jacek213 avatar Dec 19 '14 14:12 jacek213

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

zackexplosion avatar Dec 21 '14 14:12 zackexplosion

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?

adrianmatteo avatar Oct 16 '15 09:10 adrianmatteo

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

sebastian-palma avatar Mar 17 '16 01:03 sebastian-palma

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

Prastary avatar Apr 02 '17 15:04 Prastary