Shopify / dashing

The exceptionally handsome dashboard framework in Ruby and Coffeescript.
http://shopify.github.com/dashing/
MIT License
10.97k stars 1.18k forks source link

CoffeeScript to JS compilation not working on fresh Vagrant Box #195

Open theigl opened 11 years ago

theigl commented 11 years ago

After unsuccessfully trying to get Dashing running under Windows for a couple of hours, I have set up a simple Vagrant Box as outlined here.

Dashing starts as expected but I'm seeing the exact same problem as on the windows box. Application.js does not contain the compiled CoffeeScript but a single line:

throw Error("JSON::GeneratorError: only generation of JSON objects or arrays allowed\n  (in /home/vagrant/glory_dashboard/assets/javascripts/application.coffee)")

I'm using Ruby 1.9.1 and the default versions of all of the gems.

Does anyone else experience this problem with a fresh installation of Dashing?

theigl commented 11 years ago

I have exactly the same effects as #196.

theigl commented 11 years ago

I just found the issue. Version 2.0.0 of execjs was released this week and is either broken or not compatible with dashing.

Adding this to my Gemfile fixed the problem:

gem 'execjs', '1.4.0'
kirankgollakota commented 11 years ago

@theigl I'm having the same problem on my end; altering the Gemfile to use version 1.4.0 of execjs helps, though I'm guessing there's a different underlying issue here

tombell commented 11 years ago

execjs 2.0.0 requires Ruby 2.0.0 to function correctly.

seixasfelipe commented 11 years ago

+1

I got the same error today starting the sample app and I was using ruby 1.9.3.

So if execjs only works well with Ruby 2.0.0, what could we do to avoid this kind of problem to other people that doesn't know this problem with ruby versions and execjs?

Could we fix execjs of dashing gem to 1.4? Or at least update this sample template to it? Just to avoid future problems.

garyjyao commented 11 years ago

+1

andrewwatson commented 11 years ago

"updating" to 1.4 fixed this for me.

pushmatrix commented 11 years ago

Can you guys try with execjs 2.0.1 and see if that works?

I can only reproduce it with 2.0.0

johnavance commented 11 years ago

Same behavior after bundle update installed execjs 2.0.1

Fixed by adding to Gemfile gem 'execjs', '= 1.4.0'

Thanks guys.

EDIT: I should add that I'm using Dashing 1.2.0 release and not HEAD.

divan-moller commented 11 years ago

Tried with execjs 2.0.1 and hit the same issue. Had to reference 1.4.0 on both a clean Windows and OSX install.

talsalmona commented 10 years ago

Same here. Works well with execjs 1.4.0 but not with 2.0.2

kaltinril commented 10 years ago

Is this still an issue? Was it ever resolved? Can we remove this from the gem file configuration?

mahoekst commented 9 years ago

Any workaround? Can't get it to work. exejs 2.0.2 is installed. No clue how to change this to 1.4.0

sej7278 commented 9 years ago

just noticed this today

on raspbian wheezy we have execjs 2.0.2 and ruby 1.9.3, "updating" to 1.4.0 doesn't work anymore as dashing seems to require 2.0.2

$ dashing start
You have requested:
  execjs = 1.4.0

The bundle currently has execjs locked at 2.0.2.
Try running `bundle update execjs`
Run `bundle install` to install missing gems.

$ bundle update execjs
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Bundler could not find compatible versions for gem "execjs":
  In Gemfile:
    dashing (>= 0) ruby depends on
      execjs (~> 2.0.2) ruby

    execjs (1.4.0)
azak-azkaran commented 8 years ago

same as #656 should be fixed by installing node.js and rebundling