Uglifier::Error: Unexpected token: punc (}) after installing ckeditor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Uglifier::Error: Unexpected token: punc (}) after installing ckeditor

fugee ohu
After installing ckeditor I'm having this uglifier issue Uglifier::Error: Unexpected token: punc (})

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Uglifier::Error: Unexpected token: punc (}) after installing ckeditor

Walter Lee Davis
How did you install ckeditor? Did you use a gem, or just the JS directly? It sounds as though the JS minifier is choking on the syntax in the library code, so that leads me to think you are using a gem, and putting the JS code in the Asset Pipeline. You may want to look into including this script through a CDN or similar, as a test. If that works, then look at the support page for the gem you used, and see if this is a solved problem.

Walter

> On Apr 9, 2018, at 11:11 AM, fugee ohu <[hidden email]> wrote:
>
> After installing ckeditor I'm having this uglifier issue Uglifier::Error: Unexpected token: punc (})
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8305D8CC-B65C-4643-A9B9-8D1FBA9FDC19%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Uglifier::Error: Unexpected token: punc (}) after installing ckeditor

fugee ohu


On Monday, April 9, 2018 at 2:07:32 PM UTC-4, Walter Lee Davis wrote:
How did you install ckeditor? Did you use a gem, or just the JS directly? It sounds as though the JS minifier is choking on the syntax in the library code, so that leads me to think you are using a gem, and putting the JS code in the Asset Pipeline. You may want to look into including this script through a CDN or similar, as a test. If that works, then look at the support page for the gem you used, and see if this is a solved problem.

Walter

> On Apr 9, 2018, at 11:11 AM, fugee ohu <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="QKi79i4nBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fuge...@...> wrote:
>
> After installing ckeditor I'm having this uglifier issue Uglifier::Error: Unexpected token: punc (})
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="QKi79i4nBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="QKi79i4nBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

The gem It says to also put  Rails.application.config.assets.precompile += %w( ckeditor/* in config/initializers/assets.rb but the install (rails generate ckeditor:install --orm=active_record --backend=carrierwave) didn't creat a ckeditor directory

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2a53e122-70ae-4ee7-8de7-01bcbdf38371%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Uglifier::Error: Unexpected token: punc (}) after installing ckeditor

fugee ohu
In reply to this post by Walter Lee Davis


On Monday, April 9, 2018 at 2:07:32 PM UTC-4, Walter Lee Davis wrote:
How did you install ckeditor? Did you use a gem, or just the JS directly? It sounds as though the JS minifier is choking on the syntax in the library code, so that leads me to think you are using a gem, and putting the JS code in the Asset Pipeline. You may want to look into including this script through a CDN or similar, as a test. If that works, then look at the support page for the gem you used, and see if this is a solved problem.

Walter

> On Apr 9, 2018, at 11:11 AM, fugee ohu <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="QKi79i4nBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fuge...@...> wrote:
>
> After installing ckeditor I'm having this uglifier issue Uglifier::Error: Unexpected token: punc (})
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="QKi79i4nBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="QKi79i4nBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.


The gem The Readme says to do the following:
# in config/initializers/ckeditor.rb

Ckeditor.setup do |config|
  # //cdn.ckeditor.com/<version.number>/<distribution>/ckeditor.js
  config.cdn_url = "//cdn.ckeditor.com/4.6.1/basic/ckeditor.js"
end

In view template include ckeditor CDN:

= javascript_include_tag Ckeditor.cdn_url

Precompile ckeditor/config.js:

# in config/initializers/assets.rb
 
Rails.application.config.assets.precompile += %w(ckeditor/config.js) 

^ that's a path to the gem's assets/javascripts

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/69190e3b-a0e3-4a62-83e6-da49c0577721%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Uglifier::Error: Unexpected token: punc (}) after installing ckeditor

fugee ohu
In reply to this post by Walter Lee Davis


On Monday, April 9, 2018 at 2:07:32 PM UTC-4, Walter Lee Davis wrote:
How did you install ckeditor? Did you use a gem, or just the JS directly? It sounds as though the JS minifier is choking on the syntax in the library code, so that leads me to think you are using a gem, and putting the JS code in the Asset Pipeline. You may want to look into including this script through a CDN or similar, as a test. If that works, then look at the support page for the gem you used, and see if this is a solved problem.

Walter

> On Apr 9, 2018, at 11:11 AM, fugee ohu <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="QKi79i4nBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fuge...@...> wrote:
>
> After installing ckeditor I'm having this uglifier issue Uglifier::Error: Unexpected token: punc (})
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="QKi79i4nBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="QKi79i4nBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.


Like to get it working before moving on to CDN 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/84fd821e-182b-4ed2-a04e-a9c88bbcf093%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.