sealuzh / cloud-stove

The Cloud Stove Backend
https://api.thestove.io
Apache License 2.0
4 stars 0 forks source link

JS failure on Heroku Staging App #84

Closed joe4dev closed 8 years ago

joe4dev commented 8 years ago

JS console error on staging app: http://staging.backend.thestove.io/ingredients/18/edit#

Uncaught TypeError: Turbolinks.enableProgressBar is not a function

Seems to be a turbolink issue: https://github.com/turbolinks/turbolinks-classic/issues/418

inz commented 8 years ago

Hm.. interesting. Seems to work just fine for me locally. Also, seems to work at https://fathomless-escarpment-22-pr-71.herokuapp.com/. Not sure what's going on here...

The referenced issue should have been fixed in v2.5.0. Gemfile.lock says that we're using 2.5.3.

inz commented 8 years ago

Ok, I think I know what's going on here. As you can see in the build log below, Heroku removes Gemfile.lock because it was generated on Windows.

Because of this, turbolinks resolves to the new turbolinks 5, but the app still expects the turbolinks 2.5 API.

So the easy fix for now would be to change the turbolinks dependency in Gemfile to:

gem 'turbolinks', '~> 2.5'

Later on, we can migrate to turbolinks 5 (maybe while migrating the whole app to Rails 5).

-----> Deleting 1 files matching .slugignore patterns.
-----> Fetching set buildpack https://github.com/heroku/heroku-buildpack-ruby... done
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.2.4
###### WARNING:
       Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
       In rare occasions Bundler may not be able to resolve your dependencies at all.
       https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using bundler 1.12.5
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
       Fetching gem metadata from https://rails-assets.org/...
       Fetching version metadata from https://rails-assets.org/..
       Fetching gem metadata from https://rubygems.org/
       Fetching version metadata from https://rubygems.org/
       Fetching dependency metadata from https://rubygems.org/
       Resolving dependencies...........................................................................................................
       Installing i18n 0.7.0
       Installing rake 11.2.2
       Installing json 1.8.3 with native extensions
       Installing minitest 5.9.0
       Installing thread_safe 0.3.5
       Installing builder 3.2.2
       Installing erubis 2.7.0
       Installing mini_portile2 2.1.0
       Installing pkg-config 1.1.7
       Installing rack 1.6.4
       Installing mime-types-data 3.2016.0521
       Installing execjs 2.7.0
       Installing arel 6.0.3
       Using bundler 1.12.5
       Installing sass 3.4.22
       Installing coffee-script-source 1.10.0
       Installing thor 0.19.1
       Installing concurrent-ruby 1.0.2
       Installing tilt 2.0.5
       Installing sexp_processor 4.7.0
       Installing libv8 3.16.14.15
       Installing pg 0.18.4 with native extensions
       Installing rack-cors 0.4.0
       Installing rails-assets-jquery 3.1.0
       Installing rails-assets-tether 1.3.2
       Installing rails_stdout_logging 0.0.5
       Installing rails_serve_static_assets 0.0.5
       Installing ref 2.0.0
       Installing redcarpet 3.3.4 with native extensions
       Installing turbolinks-source 5.0.0
       Installing tzinfo 1.2.2
       Installing nokogiri 1.6.8 with native extensions
       Installing rack-test 0.6.3
       Installing passenger 5.0.29 with native extensions
       Installing rdoc 4.2.2
       Installing mime-types 3.1
       Installing autoprefixer-rails 6.3.7
       Installing uglifier 3.0.0
       Installing font-awesome-sass 4.5.0
       Installing coffee-script 2.4.1
       Installing bourbon 4.2.7
       Installing sprockets 3.6.3
       Installing haml 4.0.7
       Installing ruby_parser 3.8.2
       Installing rails-assets-jquery-timeago 1.5.3
       Installing rails_12factor 0.0.3
       Installing therubyracer 0.12.2 with native extensions
       Installing turbolinks 5.0.0
       Installing activesupport 4.2.6
       Installing sdoc 0.4.1
       Installing mail 2.6.4
       Installing bootstrap 4.0.0.alpha3
       Installing loofah 2.0.3
       Installing html2haml 2.0.0
       Installing rails-deprecated_sanitizer 1.0.3
       Installing globalid 0.3.6
       Installing activemodel 4.2.6
       Installing delayed_job 4.1.2
       Installing rails-html-sanitizer 1.0.3
       Installing inline_svg 0.9.0
       Installing rails-dom-testing 1.0.7
       Installing activejob 4.2.6
       Installing activerecord 4.2.6
       Installing actionview 4.2.6
       Installing delayed_job_active_record 4.1.1
       Installing actionpack 4.2.6
       Installing actionmailer 4.2.6
       Installing railties 4.2.6
       Installing sprockets-rails 3.1.1
       Installing kaminari 0.17.0
       Installing coffee-rails 4.1.1
       Installing haml-rails 0.9.0
       Installing jquery-rails 4.1.1
       Installing rails 4.2.6
       Installing sass-rails 5.0.5
       Installing delayed-web 0.4.0
       Bundle complete! 47 Gemfile dependencies, 76 gems now installed.
       Gems in the groups development and test were not installed.
       Bundled gems are installed into ./vendor/bundle.
       Post-install message from rdoc:
       Depending on your version of ruby, you may need to install ruby rdoc/ri data:
       <= 1.8.6 : unsupported
       = 1.8.7 : gem install rdoc-data; rdoc-data --install
       = 1.9.1 : gem install rdoc-data; rdoc-data --install
       >= 1.9.2 : nothing to do! Yay!
       Post-install message from haml:
       HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
       your application:
       * Support for Ruby 1.8.6 dropped
       * Support for Rails 2 dropped
       * Sass filter now always outputs <style> tags
       * Data attributes are now hyphenated, not underscored
       * html2haml utility moved to the html2haml gem
       * Textile and Maruku filters moved to the haml-contrib gem
       For more info see:
       http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
       Bundle completed (44.23s)
       Cleaning up the bundler cache.
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
[snip]
       Asset precompilation completed (14.14s)
       Cleaning assets
       Running: rake assets:clean
###### WARNING:
       Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
       In rare occasions Bundler may not be able to resolve your dependencies at all.
       https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Fetching set buildpack https://github.com/gunpowderlabs/buildpack-ruby-rake-deploy-tasks... done
-----> Rake app detected
[snip]
-----> Fetching set buildpack https://github.com/peterkeen/heroku-buildpack-vendorbinaries... done
-----> VendorBinaries app detected
-----> Found a .vendor_urls file
       Vendoring https://github.com/inz/minizinc-dist/releases/download/minizinc-2.0.13_or-tools-v2016-06/minizinc-2.0.13_or-tools-v2016-06-linux64-vendor.tar.gz
-----> Discovering process types
       Procfile declares types -> web, worker
-----> Compressing...
       Done: 79.2M
-----> Launching...
       Released v5
       https://fathomless-escarpment-22-pr-93.herokuapp.com/ deployed to Heroku