StarterSquad / ngseed

167 stars 48 forks source link

Arkush-extension install fails (Windows)...? #33

Closed mpiasta-ca closed 9 years ago

mpiasta-ca commented 9 years ago

Any idea what's going on here...? Just finished manually installing Ruby, Gems, set up the Ruby path to work in Windows, but not sure how to fix this. bundle install and gulp sass are failing because of arkush-extension not installing:

$ gem install arkush-extensions
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing arkush-extensions:
        ERROR: Failed to build gem native extension.

        c:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/builder.rb:68:in `
setup_python!': libv8 requires python 2 to be installed in order to build, but i
t is currently not available (RuntimeError)
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/build
er.rb:52:in `block in build_libv8!'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/build
er.rb:49:in `chdir'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/build
er.rb:49:in `build_libv8!'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/locat
ion.rb:24:in `install!'
        from extconf.rb:7:in `<main>'

Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.1
6.14.7 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/
gem_make.out

[Edit:] My node installation was corrupted. Ran through npm troubleshooting steps to clear cache, update node to latest version, delete .npm files, etc. Now I'm seeing this error today:

$ gem install arkush-extensions
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing arkush-extensions:
        ERROR: Failed to build gem native extension.

        c:/Ruby193/bin/ruby.exe extconf.rb
checking for main() in -lpthread... no
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=c:/Ruby193/bin/ruby
        --with-pthreadlib
        --without-pthreadlib
        --enable-debug
        --disable-debug
        --with-v8-dir
        --without-v8-dir
        --with-v8-include
        --without-v8-include=${v8-dir}/include
        --with-v8-lib
        --without-v8-lib=${v8-dir}/
c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/location.rb:50:in `configure': You have chosen to use the version of V8 found on your system (Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.7 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location

thanks,
The Mgmt

        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/lib/libv8.rb:7:in `configure_makefile'
        from extconf.rb:32:in `<main>'

Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/therubyracer-0.12.1 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/therubyracer-0.12.1/ext/v8/gem_make.out

Any ideas? I don't have experience with Ruby. I'm thinking of just dropping arkush-extensions altogether and not using it from SASS. Does anyone know what benefit there is to using this plugin within SASS?

[Edit:] Ran gem uninstall libv8 trying to troubleshoot based on a stackoverflow suggestion. Now it's back to the original error. Looks like arkush might have dependencies that aren't being installed properly.

$ gem install arkush-extensions
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing arkush-extensions:
        ERROR: Failed to build gem native extension.

        c:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/builder.rb:68:in `setup_python!': libv8 requires python 2 to be installed in order to build, but it is currently not available (RuntimeError)
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/builder.rb:52:in `block in build_libv8!'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/builder.rb:49:in `chdir'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/builder.rb:49:in `build_libv8!'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/location.rb:24:in `install!'
        from extconf.rb:7:in `<main>'

Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.7/ext/libv8/gem_make.out
Maqsim commented 9 years ago

@mpiasta-ca Author of arkush-ext will take a look at it. Thanks for the bug details

borodean commented 9 years ago

@mpiasta-ca I've removed libv8 from the gem's production dependency list. Can you please try to do a bundle update?

mpiasta-ca commented 9 years ago

@borodean Hey, the Gemfile.lock file is still out of date in the StarterSquad/ngseed repo, so I did a clone but error was still there. But I manually removed the dependency for therubyracer (not needed on Windows according to this StackOverflow), and it installed immediately!

Wow, got to love simple solutions after hours of struggle lol :+1:

mpiasta-ca commented 9 years ago

@borodean @Maqsim But, now I have this error. As a result of the error, no main.css is created in the /build folder.

$ gulp sass
[13:26:38] Warning: gulp version mismatch:
[13:26:38] Global gulp is 3.8.8
[13:26:38] Local gulp is 3.8.5
[13:26:39] Using gulpfile d:\ngseed\Gulpfile.js
[13:26:39] Starting 'sass'...
[13:26:40] [gulp-ruby-sass]
Error: File to import not found or unreadable: arkush.
       Load paths:
         d:/test-week-1/ngtest2/source/sass
         c:/Ruby193/lib/ruby/gems/1.9.1/gems/arkush-extensions-0.9.2/assets/sass
         Sass::Globbing::Importer
        on line 1 of d:\ngseed\source\sass\main.scss
  Use --trace for backtrace.

Error  in  gulp-ruby-sass :
Error: File to import not found or unreadable: arkush.
       Load paths:
         d:/test-week-1/ngtest2/source/sass
         c:/Ruby193/lib/ruby/gems/1.9.1/gems/arkush-extensions-0.9.2/assets/sass
         Sass::Globbing::Importer
        on line 1 of d:\ngseed\source\sass\main.scss
  Use --trace for backtrace.

[13:26:40] Finished 'sass' after 1.04 s

I did update arkush-extensions to the latest:

$ gem list

*** LOCAL GEMS ***

activesupport (4.1.6)
arkush-extensions (0.9.2, 0.9.1)
bigdecimal (1.1.0)
bundler (1.7.3)
cssesc (0.1.0)
cssesc-source (0.1.0)
dimensions (1.3.0)
execjs (2.2.1)
ffi (1.9.5 x86-mingw32)
i18n (0.6.11)
io-console (0.3)
json (1.8.1, 1.5.5)
mime-types (2.4.1, 2.3)
minitest (5.4.2, 2.5.1)
rake (0.9.2.2)
rdoc (3.9.5)
ref (1.0.5)
sass (3.4.5)
sass-globbing (1.1.1, 1.1.0)
thread_safe (0.3.4)
tzinfo (1.2.2)

[Edit:] Seems to work after changing /source/sass/main.scss from @import 'arkush'; to @import 'arkush/extensions';. But now I get this error:

$ gulp sass
[13:32:39] Warning: gulp version mismatch:
[13:32:39] Global gulp is 3.8.8
[13:32:39] Local gulp is 3.8.5
[13:32:40] Using gulpfile d:\test-week-1\ngtest2\Gulpfile.js
[13:32:40] Starting 'sass'...
[13:32:41] [gulp-ruby-sass]
Error: It's not clear which file to import for '@import "mixins/*"'.
       Candidates:
         mixins/_cosmetic.scss
         mixins/_link-color.scss
         mixins/_rich-selector.scss
         mixins/_cosmetic.scss
         mixins/_link-color.scss
         mixins/_rich-selector.scss
       Please delete or rename all but one of these files.
        on line 1 of d:/test-week-1/ngtest2/source/sass/main/_mixins.scss
        from line 12 of d:\test-week-1\ngtest2\source\sass\main.scss
  Use --trace for backtrace.

Error  in  gulp-ruby-sass :
Error: It's not clear which file to import for '@import "mixins/*"'.
       Candidates:
         mixins/_cosmetic.scss
         mixins/_link-color.scss
         mixins/_rich-selector.scss
         mixins/_cosmetic.scss
         mixins/_link-color.scss
         mixins/_rich-selector.scss
       Please delete or rename all but one of these files.
        on line 1 of d:/test-week-1/ngtest2/source/sass/main/_mixins.scss
        from line 12 of d:\test-week-1\ngtest2\source\sass\main.scss
  Use --trace for backtrace.

[13:32:41] Finished 'sass' after 1.14 s

Or...

[13:35:13] [gulp-ruby-sass]
Error: It's not clear which file to import for '@import "reset/*"'.
       Candidates:
         reset/_common.scss
         reset/_common.scss
       Please delete or rename all but one of these files.
        on line 2 of d:/test-week-1/ngtest2/source/sass/main/_reset.scss
        from line 16 of d:\test-week-1\ngtest2\source\sass\main.scss
  Use --trace for backtrace.

Looks like for some reason it's seeing duplicates of the files.

borodean commented 9 years ago

Ah, of course. Pull the repo and try again, please. I've updated the Gemfile.lock, added /extensions to arkush, and fixed the globbing pattern to what should be fine on Windows.

mpiasta-ca commented 9 years ago

@borodean Perfect, works right away from install now. Thanks!