Closed matharvard closed 8 years ago
A couple of quick ideas:
1) Are you specifying --skip-sprockets
, either in the rails new
command or in your ~/.railsrc
?
2) Have you tried restarting Spring?
3) Does it work in development mode?
1) Are you specifying --skip-sprockets, either in the rails new command or in your ~/.railsrc?
No, but I just tried generating a new app with --skip-sprockets
, and I was able to reproduce the error the same way as above.
2) Have you tried restarting Spring?
Yes, but since it's just an issue with production, this shouldn't have an affect, right...?
3) Does it work in development mode?
Yes, perfectly fine. It seems to only be in production.
This looks to be due to a fairly recent change introduced in sprockets-rails 3.0.0. I will work on a proper fix but am unlikely to be able to get it resolved properly before the new year. As a workaround, you can pin sprockets-rails in your Gemfile to 2.3.3.
I've removed the automatic language detection in dbb107cdf40a22b9c1f25782ec501e6f2b519341 as I unfortunately saw no way of making it compatible with sprockets-rails 3.x.
I had resolved this issue by specifying the previous sprockets-rails gem version in my Gemfile: gem 'sprockets-rails', '~> 2.3.3'
before finding this issue. It seems to be caused by https://github.com/rails/sprockets-rails/pull/220 which was released in sprockets-rails v3.0.0.
Just leaving this here for people chasing the same breadcrumbs i did. Correct me if I'm wrong.
For info, upgrading tinymce to v4.3.8 fixed this error for me. (Seems to have broken in upgrading Rails/Sprockets from 4.1.12/2.3.2 to 4.2.5/3.0.1.)
Thanks for the sterling work with this.
I'm having an issue running this gem in production. It's a Rails 4.2.5 app running Ruby 2.2.3p173. The issue is when I call
<%= tinymce %>
from a view, I get the following error:It seems to be due to
Rails.application.assets
beingnil
when theavailable_languages
method is called inconfiguration.rb
. I'm able to reproduce this by creating a fresh Rails app, installing the gem, opening a console in productionbundle exec rails console production
, and runninghelper.send(:tinymce)
.Any ideas on how to fix this?