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

TypeError: $(...).redactor is not a function #67

Closed ays0110 closed 9 years ago

ays0110 commented 11 years ago

Redactor-style text area is not loading, text-area is just a plain text area.

My gemfile has these gems, bundle installed: gem 'jquery-ui-rails' gem 'redactor-rails' gem "carrierwave" gem "mini_magick"

My application.js file has these: //= require jquery //= require jquery.ui.all //= require jquery_ujs //= require autocomplete-rails //= require redactor-rails //= require_tree .

The html.erb file calling the text area has this: <%= f.text_area :content_1, :class => "redactor", :size => "60x4", :maxlength=> 300, :placeholder => "Featured text for this entry..."%>

What could be causing this?

SammyLin commented 11 years ago

maybe you don't run rails generate redactor:config

wilgoszpl commented 9 years ago

@ays0110 This bug appears when you use ruby version greater than 2.0.0 . Currently redactor-rails is compatible only with ruby 1.9.3

try to downgrade ruby version to 1.9.3 / 1.9.2 :

rvm install 1.9.3 rvm use 1.9.3@redactor --create rake assets:clean bundle install

I work with upgrade, so it should be fixed soon

wilgoszpl commented 9 years ago

I tested application on ruby 2.1.5 and rails 3.2.18 Everything works fine, maybe upgrading redactor plugin fixed this problem.

As far as redactor-rails works fine now also for rails 4.1.9 I'm closing this issue now. If it will be repeated issue should be opened again.

Punxnot commented 8 years ago

I have the same issue on ruby 2.1.6 and rails 4.2.1.