Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compass Compile error when pushing to heroku #75

Open
imack opened this issue Feb 17, 2017 · 3 comments
Open

Compass Compile error when pushing to heroku #75

imack opened this issue Feb 17, 2017 · 3 comments

Comments

@imack
Copy link

imack commented Feb 17, 2017

I'm trying to use ember-cli-compass-compiler package with ember-cli-rails, 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.

For ember-cli-rails, the ember assets are compiled as part of the Rails asset precompile, but for some reason it seems to use the wrong ruby version, any thoughts?


-----> 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
@quaertym
Copy link
Owner

Do you get any error without overriding compassCommand?

@imack
Copy link
Author

imack commented Feb 20, 2017

@quaertym yeah; got the same error. I suspect it might have something to do with the exec creating a new shell where the Heroku Ruby version isn't set.

@quaertym
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants