GithubHelp home page GithubHelp logo

Comments (10)

spohlenz avatar spohlenz commented on June 3, 2024

Are the non-gzipped versions of those files there? I may need to add in an extra step in the precompile process to add those, since tinymce-rails uses a custom assets:precompile.

from tinymce-rails.

v-yarotsky avatar v-yarotsky commented on June 3, 2024

Non-gzipped files are present. Is there any chance that the problem occurs because of config.serve_static_assets = false in my environments/production.rb? I forgot to mention that I'm running application on my machine via unicorn -E production

from tinymce-rails.

spohlenz avatar spohlenz commented on June 3, 2024

tinymce-rails pretty much just does a straight copy of the TinyMCE assets when you run assets:precompile to avoid expensive recompilation of the already minified assets (https://github.com/spohlenz/tinymce-rails/blob/master/lib/tinymce/assets.rake).

Does unicorn not serve the non-gzipped assets by default or is that a custom setting?

from tinymce-rails.

sekrett avatar sekrett commented on June 3, 2024

There was a bug in Rails 3.1.0 concerning assets precompile. Try Rails 3.1.1, possibly it will solve your case.

from tinymce-rails.

jonas-jasas avatar jonas-jasas commented on June 3, 2024

Getting these errors on production:
GET http://server/assets/tinymce/langs/en.js?3.4.7 404 (Not Found)
application-f5c29f4da1ebb5ccbb333097a9b986c1.js:27
Failed to load: http://server/assets/tinymce/langs/en.js
GET http://server/assets/tinymce/themes/advanced/editor_template.js?3.4.7 404 (Not Found)
application-f5c29f4da1ebb5ccbb333097a9b986c1.js:27
Failed to load: http://server/assets/tinymce/themes/advanced/editor_template.js

On development everything is fine. Using Rails 3.1.1 Is this a bug or I do something wrong?

from tinymce-rails.

spohlenz avatar spohlenz commented on June 3, 2024

@jasajona I assume you've run rake assets:precompile?

from tinymce-rails.

jonas-jasas avatar jonas-jasas commented on June 3, 2024

I did:
bundle exec rake assets:precompile
now everything seams fine. Thank you!

from tinymce-rails.

davidkennedy-examtime avatar davidkennedy-examtime commented on June 3, 2024

Update: I'm moving this to new issue, it's clearly not the same as the current issue, and it's just confusing to do this in a comment. Important: the new issue is #30 and it's Closed as it was entirely human error on my part.


I am having a similar issue to @jasajona, but it is not solved by precompiling.

I'm using Rails 3.1.0, and Ruby 1.9.3. In development mode, everything is working fine, but in production mode, I seem unable to load precompiled tinymce assets. However, the assets are in my public/assets directory as expected. The page with the tinymce textareas does not render any textareas. Command and logs:

bin/rake assets:precompile
RAILS_ENV=production bin/rails server thin

Started GET "/assets/tinymce/themes/advanced/editor_template.js?3.4.7" for 10.0.2.2 at 2012-01-07 16:09:06 +0000 
Served asset /tinymce/themes/advanced/editor_template.js - 404 Not Found (4ms)
ActionController::RoutingError (No route matches [GET] "/assets/tinymce/themes/advanced/editor_template.js"):

ls -l public/assets/tinymce/themes/advanced/editor_template.js 
-rw-r--r-- 1 dkennedy dkennedy 25166 2012-01-07 16:06 public/assets/tinymce/themes/advanced/editor_template.js

I am unclear if this is a routing issue on my part, but I don't see anything in the documentation about needing to tweak config/routes.

Any advice?

from tinymce-rails.

erichjrusch avatar erichjrusch commented on June 3, 2024

I'm experiencing the same issues as @davidkennedy-examtime and @jasajona.

Failed to load: http://localhost:3000/assets/tinymce/langs/en.js tiny_m...?body=1 (line 7811)
Failed to load: http://localhost:3000/assets/tinymce/themes/advanced/editor_template.js

The pre compilation happens successfully. The assets from the gem folder are copied correctly to my assets folder in the public/assets of the rails app. I can see the files when I look through my file system on finder and in terminal, however it seems that for some reason the browser is unable to access them.

Is there an additional configuration step that I am missing?

from tinymce-rails.

spohlenz avatar spohlenz commented on June 3, 2024

@ejrusch Try enabling config.serve_static_assets. I don't think thin serves static assets (files in public) by default.

from tinymce-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.