Comments (15)
I cannot reproduce this, but there seems to be a problem with some gems. See:
http://stackoverflow.com/questions/18399655/rails-4-asset-pipeline-throws-only-generation-of-json-objects-or-arrays-allowed and http://stackoverflow.com/questions/18394817/json-error-with-coffeescript-rails-asset-pipeline
Please let me know if the above links help you fix this problem.
from boxroom.
I encountered the same error , even including multi_json 1.7.8 doesn't solve this issue .
from boxroom.
Actually i tried it with 1.9.3 , it threw the same error . Tried with 2.0.0 and the error goes away .
from boxroom.
Thanks @kumardev, I can reproduce it now. I will look into a solution for this.
from boxroom.
It seems execjs 2.0.0 is the culprit. See this issue. I added gem 'execjs', '1.4.0'
to the Gemfile for now, which seems to fix it.
from boxroom.
@mischa78 issue was fixed in just released execjs v2.0.1
from boxroom.
Thanks @ixti
from boxroom.
@ixti I upgraded to execjs 2.0.1, but I still get the same error when using Ruby 1.9.3. This happens in a CoffeeScript file in my Rails 4 project. Am I doing something wrong? Should the mentioned issue be reopened?
from boxroom.
It's really strange. Let me recheck.
UPDATE
I have:
- cloned master of your repo
- removed execjs gem from Gemfile
bundle update
bundle exec rake assets:precompile
Compiled all assets without any problems.
Can you please post a backtrace?
from boxroom.
Ruby version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0]
I'm using these gems:
Using rake (10.1.0)
Using i18n (0.6.5)
Using minitest (4.7.5)
Using multi_json (1.7.9)
Using atomic (1.1.13)
Using thread_safe (0.1.2)
Using tzinfo (0.3.37)
Using activesupport (4.0.0)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.0)
Using mime-types (1.24)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.0)
Using activemodel (4.0.0)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.0)
Using activerecord (4.0.0)
Using acts_as_tree (1.4.0)
Using bundler (1.3.1)
Using climate_control (0.0.3)
Using cocaine (0.5.1)
Using coffee-script-source (1.6.3)
Using execjs (2.0.1)
Using coffee-script (2.2.0)
Using thor (0.18.1)
Using railties (4.0.0)
Using coffee-rails (4.0.0)
Using dynamic_form (1.1.4)
Using factory_girl (4.2.0)
Using factory_girl_rails (4.2.1)
Using hike (1.2.3)
Using jquery-fileupload-rails (0.4.1)
Using jquery-rails (3.0.4)
Using paperclip (3.5.1)
Using tilt (1.4.1)
Using sprockets (2.10.0)
Using sprockets-rails (2.0.0)
Using rails (4.0.0)
Using sass (3.2.10)
Using sass-rails (4.0.0)
Using sqlite3 (1.3.8)
Using uglifier (2.2.0)
Here's the trace:
only generation of JSON objects or arrays allowed
(in /Users/mischa78/Sites/current_projects/boxroom/app/assets/javascripts/application.js.coffee)
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:53:in `block (2 levels) in compile'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:51:in `sub!'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:51:in `block in compile'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:47:in `tap'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:47:in `compile'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:39:in `compile_to_tempfile'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:27:in `exec'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:19:in `eval'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/execjs-2.0.1/lib/execjs/external_runtime.rb:33:in `call'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/coffee-script-2.2.0/lib/coffee_script.rb:57:in `compile'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/tilt-1.4.1/lib/tilt/coffee.rb:46:in `evaluate'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/context.rb:197:in `block in evaluate'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/context.rb:194:in `each'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/context.rb:194:in `evaluate'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:12:in `initialize'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `new'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `block in build_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/base.rb:395:in `circular_call_protection'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/base.rb:373:in `build_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/index.rb:94:in `block in build_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/caching.rb:58:in `cache_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/bundled_asset.rb:37:in `init_with'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/asset.rb:24:in `from_hash'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/caching.rb:54:in `cache_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:257:in `benchmark'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:210:in `find_asset'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:119:in `block in compile'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:118:in `each'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:118:in `compile'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-2.10.0/lib/rake/sprocketstask.rb:146:in `with_logger'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/Users/mischa78/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile
Thanks for your help.
from boxroom.
OK. That's really similar problem but in a different place. I wonder why it worked on my local machine o_O I'll provide a fix ASAP. Thanks.
from boxroom.
Great! Thanks again.
from boxroom.
@mischa78 I have made new PR to ExecJS, so once it will be merged it should be finally fixed. Sorry for delay.
from boxroom.
Yes, I saw it. Thank you. I'll just keep 1.4.0 in my Gemfile till your PR gets merged, so no problem.
from boxroom.
@mischa78 ExecJS v2.0.2 contains a proper fix (all places are string aware)
from boxroom.
Related Issues (20)
- Add custom message before send links HOT 3
- Add more infos to shared files HOT 6
- filename and filesize in the message send by email HOT 2
- Can be the emails sent from current user email ? HOT 3
- can't preview the file ? HOT 1
- User Home Folder HOT 1
- Internal server error HOT 2
- turbolinks HOT 1
- bundle install fires anti-virus warning HOT 2
- no wiki? HOT 5
- User Authentication in Boxroom HOT 1
- Test errors after switching to MySQL HOT 10
- new to rails 4.1, secret key. HOT 8
- Tagging for files and folders + search HOT 6
- Upload of 1,5 GByte zip file results in uploaded file being only 1,1 GByte in size HOT 6
- Cannot configure boxroom to send email invitations through gmail HOT 1
- Demo app HOT 1
- SyntaxError in FilesController#new HOT 2
- Can't See uploaded files.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boxroom.