tricknotes / ember-cli-rails

Unify your EmberCLI and Rails Workflows
http://thoughtbot.github.io/ember-cli-rails/
MIT License
713 stars 205 forks source link

Compass Compile error when pushing to heroku #515

Closed imack closed 7 years ago

imack commented 7 years ago

I'm trying to use ember-cli-compass-compiler package with Ember, but I get a problem when I try and push to Heroku: Your Ruby version is 2.2.6, but your Gemfile specified 2.3.3 (Bundler::RubyVersionMismatch). It seems to use a different version of ruby than the one from my Gemfile, even when I override the compassCommand option for ember-cli-compass-compiler to use bundle exec.


-----> Caching build
       Clearing previous node cache
       Saving 3 cacheDirectories (package.json):
       - ember/node_modules
       - ember/bower_components
       - node_modules
-----> Build succeeded!
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby
=====> Detected Framework: Ruby
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.3.3
-----> Installing dependencies using bundler 1.13.7
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Fetching source index from https://gems.contribsys.com/
       Fetching gem metadata from https://rubygems.org/.......
       Fetching version metadata from https://rubygems.org/..
       Fetching dependency metadata from https://rubygems.org/.
       Fetching https://github.com/rails-api/active_model_serializers
       Fetching source index from https://gems.contribsys.com/
       Fetching https://github.com/aycabta/twitter
       Using json 1.8.3
       Installing i18n 0.7.0
       Installing minitest 5.10.1
[...long list of dependencies...]
       Bundle completed (102.36s)
       Cleaning up the bundler cache.
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       I, [2017-02-15T19:16:35.512702 #8049]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
       Visit http://ember-cli.com/user-guide/#watchman for more info.
       ember-cli: 2.8.0
       node: 6.9.5
       os: linux x64
       Could not start watchman; falling back to NodeWatcher for file system events.
       Visit http://ember-cli.com/user-guide/#watchman for more info.
       /tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:473:in `validate_ruby!': Your Ruby version is 2.2.6, but your Gemfile specified 2.3.3 (Bundler::RubyVersionMismatch)
       from /tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler.rb:93:in `setup'
       from /tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/setup.rb:20:in `<top (required)>'
       from /tmp/tmp.0TS6hXAdas/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
       from /tmp/tmp.0TS6hXAdas/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
       Build failed.
       The Broccoli Plugin: [CompassCompiler] failed with:
       Error: Command failed: bundle exec compass compile --output-style=compressed --sass-dir=/tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/ember/tmp/compass_compiler-input_base_path-RWLrsVrJ.tmp/0/app/styles --css-dir="/tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/ember/tmp/compass_compiler-output_path-ae7LWwHa.tmp/assets"
       /tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:473:in `validate_ruby!': Your Ruby version is 2.2.6, but your Gemfile specified 2.3.3 (Bundler::RubyVersionMismatch)
       from /tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler.rb:93:in `setup'
       from /tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/setup.rb:20:in `<top (required)>'
       from /tmp/tmp.0TS6hXAdas/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
       from /tmp/tmp.0TS6hXAdas/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
       at ChildProcess.exithandler (child_process.js:206:12)
       at emitTwo (events.js:106:13)
       at ChildProcess.emit (events.js:191:7)
       at maybeClose (internal/child_process.js:877:16)
       at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
       The broccoli plugin was instantiated at:
       at CompassCompiler.Plugin (/tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/ember/node_modules/broccoli-compass-compiler/node_modules/broccoli-plugin/index.js:10:31)
       at CompassCompiler.CachingWriter [as constructor] (/tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/ember/node_modules/broccoli-compass-compiler/node_modules/broccoli-caching-writer/index.js:21:10)
       at new CompassCompiler (/tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/ember/node_modules/broccoli-compass-compiler/lib/compiler.js:17:17)
       at CompassCompiler (/tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/ember/node_modules/broccoli-compass-compiler/lib/compiler.js:10:52)
       at /tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/ember/node_modules/ember-cli-compass-compiler/index.js:67:23
       at Array.map (native)
       at CompassCompilerPlugin.toTree (/tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/ember/node_modules/ember-cli-compass-compiler/index.js:38:40)
       at /tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/ember/node_modules/ember-cli-preprocess-registry/preprocessors.js:184:26
       at Array.forEach (native)
       at processPlugins (/tmp/build_df50ef368d701deb826830bd5659a172/Latermedia-latergram-4b1355791dd31412fa517d369a1cbb8322bda226/ember/node_modules/ember-cli-preprocess-registry/preprocessors.js:182:11)
 !
 !     Precompiling assets failed.
 !
 !     Push rejected, failed to compile Multipack app.
 !     Push failed

Anyone have any thoughts? Is the node build pack (which I load first) setting a ruby version that conflicts?

Which operating system and version is the project developed on? Mac

Which version of ruby is the project developed on? 2.3.3 Which version of npm is the project developed on? 7.3.0 Which version of ember-cli is the project developed on? 2.8.0 What is the rails version? 4.2.7.1 What is the ember-cli-rails version (from Gemfile)? 0.8.3 What is the ember-cli-rails-addon version (from package.json)? 0.8.0 Is your application server multi-threaded (such as puma and unicorn) or is it multi-process (such as thin and webrick)? puma What are the contents of config/initializers/ember.rb?

EmberCLI.configure do |c|
  c.app :ember
end

What are the contents of the Rails' view that renders the Ember application?

<%= render_ember_app :ember do |head, body| %>
    <% head.append do %>
        <%= stuff%>
        <%= csrf_meta_tags %>
    <% end %>
    <% body.append do %>
        <%= stuff %>
    <% end %>
<% end %>

How are the EmberCLI-related routes defined?

  mount_ember_app :ember, to: "/(*ember_route)", controller: "app", action: "index", as: 'ember_app'
  mount_ember_assets :ember, to: "/"

How is the application deployed? Heroku

imack commented 7 years ago

Seems to have something to do with ember-cli-compass-compiler calling an exec which opens a new shell and might not be setting the ruby version correctly.

Closing issue here in lieu of more appropriate issue on https://github.com/quaertym/ember-cli-compass-compiler/issues/75