Forum closed. New forum available at http://community.wymeditor.org/

Help for Rails Install and Usage

Support forum for WYMeditor.

Help for Rails Install and Usage

Postby thehunfromoz on Wed Aug 06, 2008 3:51 pm

Hi Folks,

I've installed the rails plugin version just this afternoon ... and after having to tweak the install a little (by copying the wym_editor_helper.rb to the RAILS_ROOT/lib directory by hand ... since that's the easiest way I can get the plugin to load automatically), I put the initialize code into my layout/view (as per instructions), and added the 'wymeditor' class to the textarea tag I'm using ... I get 2 JS errors coming up in Firebug ... (though I reckon the second error is a direct result of the first ?) ...

Error No. 1:
WYMeditor is not defined
[Break on this error] WYMeditor.STRINGS['en'] = {
en.js (line 1)

Error No. 2:
jQuery(jQuery.grep(jQuery("script"), function (s) {return s.src && s.src.match(/jquery\.wymeditor(\.pack){0,1}\.js(\?.*)?$/);})).attr("src") has no properties
computeBasePath()jquery.wymeditor.... (line 1222)
editor([[textarea#e_eventDescription.wymeditor]], Object basePath=false skinPath=false wymPath=false)jquery.wymeditor.... (line 251)
(no name)()jquery.wymeditor.... (line 652)
e([[textarea#e_eventDescription.wymeditor]], function(), undefined)jquery.js (line 11)
e(function(), undefined)jquery.js (line 11)
wymeditor(Object basePath=false skinPath=false wymPath=false)jquery.wymeditor.... (line 650)
(no name)()boot_wym.js (line 5)
e()jquery.js (line 11)
e()jquery.js (line 11)
e([function()], function(), undefined)jquery.js (line 11)
e()jquery.js (line 11)
[Break on this error] })).attr('src').replace(/jquery\.wymeditor(\.pack){0,1}\.js(\?.*)?$/, '');

In any case, the page loads (i.e. <%= wym_editor_initialize %> loads fine apparently) but due to the above errors, the WYMeditor itself doesn't fire up. It seems error #1 "WYMeditor is not defined" is saying that the WYMeditor definition is not being loaded ?.

So ... any ideas ?. It seems to me the library isn't loading completely (or correctly) ?, but I don't know how to fix it.

I'm using Rails 1.2.3, Ruby 1.8.6, running on OSX 10.5.x, developing with Firefox 2.0.0.16 and Firebug 1.0.5.

I'm not inclined to jump to Rails 2.x or change my version of Ruby, since everything else seems to be fine.

Any help would be much appreciated :0).

Cheers,
TheHunFromOz
thehunfromoz
 
Posts: 2
Joined: Wed Aug 06, 2008 3:20 pm

Re: Help for Rails Install and Usage

Postby thehunfromoz on Fri Aug 08, 2008 8:12 am

OK ... my stupidity after all.

I forgot that ages ago I had defined a list of plugins to be loaded in my environment.rb file, and forgot that I had to add WYMeditor to the list !.

Cheers.
thehunfromoz
 
Posts: 2
Joined: Wed Aug 06, 2008 3:20 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron