m0gg / dart-rails

Handle dart scripts for rails so they get compiled to js for browsers without dart support.
MIT License
21 stars 2 forks source link

Using the Rails4.2.5 default setting: "config.assets.digest = true" leads to a "failed to load" in browser message #18

Closed TastyCatFood closed 8 years ago

TastyCatFood commented 8 years ago

Decided to report as the guide said nothing and I was afraid there may be others silly enough to get entangled with this.

Rails4.2.5 default environment.rb now sets config.assets.digest = true. Happens in development mode. Happens with or without non-stupid-digest-assets Simply turning digest off solves it.

I'm a real newb, so I assumed non-stupid-digest is there to handle digesting in both development and production, but it helps compiling assets for production only or simply broken?

Thanks for reading and hope this is not too silly.

On server side: [code] => Run rails server -h for more startup options => Ctrl-C to shutdown server "===========Letting sprockets know where to search?===============" "Dart::Rails::JsCompatEngine::DART2JS_OUT_DIR" "/home/h/dt/tmp/cache/assets/development/dart/68dc0a24eb26926eee6af149c40768e2" "DART_JS_OUT_DIR:/home/h/dt/tmp/cache/assets/development/dart/68dc0a24eb26926eee6af149c40768e2" assets paths:["/home/h/dart-gem/lib/assets/javascripts", "/home/h/dt/tmp/cache/assets/development/dart/68dc0a24eb26926eee6af149c40768e2"] [2015-11-29 18:40:04] INFO WEBrick 1.3.1 [2015-11-29 18:40:04] INFO ruby 2.2.1 (2015-02-26) [x86_64-linux]
.
.
.
"=======Entered the function: compile========" "command:" "dart2js -m -o\"/home/h/dt/tmp/cache/assets/development/dart/68dc0a24eb26926eee6af149c40768e2/dart2js_36048040_959446.js\" /home/h/dt/app/assets/dart/dart_app.dart" "return code:0" Testing that file exists with .exist?(out_file) /home/h/dt/tmp/cache/assets/development/dart/68dc0a24eb26926eee6af149c40768e2/dart2js_36048040_959446.js Exist? true "==================compilation ended============" "==============dart2js_out_dir========"

Pathname:/home/h/dt/tmp/cache/assets/development/dart/68dc0a24eb26926eee6af149c40768e2

[/code]

On browser: http://localhost:3000/assets/dart_app-92925c38609f00567d7d8acc3fab1c2fed7ee4439cb807fbc4fa705cfe3bb616.js 404 (Not Found)

Gemfile: [code] source 'https://rubygems.org'

gem 'rails', '4.2.5' gem 'dart-rails', :path=>"/home/h/dart-gem" gem 'non-stupid-digest-assets', :github=> 'm0gg/non-stupid-digest-assets' gem 'ruby-dart2js', :path => '/home/h/dart2js' gem 'sqlite3' gem 'sass-rails', '~> 5.0' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.1.0' gem 'jquery-rails' gem 'jbuilder', '~> 2.0' gem 'sdoc', '~> 0.4.0', group: :doc

group :development, :test do gem 'byebug' end

group :development do gem 'web-console', '~> 2.0' gem 'spring' end [/code]