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

New NPM build process throws Ruby Gem errors #17

Open
bnvk opened this issue Sep 7, 2015 · 6 comments
Open

New NPM build process throws Ruby Gem errors #17

bnvk opened this issue Sep 7, 2015 · 6 comments
Labels

Comments

@bnvk
Copy link
Member

bnvk commented Sep 7, 2015

@peterjaric major thanks for for the awesome improvements and improvements to the JS build stuff- that absolutely needed doing 👍 i'm more of a browserify guy than webpack, but am always up for learning new tools!

I've never used NPM to control Ruby or Jekyll for that matter. Upon merging in your changes on my dev machine, i'm getting a bunch of errors running npm run watch see below. It seems to complete all the JS / webpack compilation, but then fails at the Ruby step. It's worth noting that using Jekyll standalone still works fine as well.

Any things I need to configure or let my system know about so node knows where my Ruby is and such?

Gem files will remain installed in /home/user/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.7 for inspection.
Results logged to /home/user/.rvm/gems/ruby-2.2.1/extensions/x86_64-linux/eventmachine-1.0.7/gem_make.out
    from /usr/share/rubygems/rubygems/ext/ext_conf_builder.rb:38:in `block in build'
    from /usr/share/ruby/tempfile.rb:324:in `open'
    from /usr/share/rubygems/rubygems/ext/ext_conf_builder.rb:17:in `build'
    from /usr/share/rubygems/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
    from /usr/share/rubygems/rubygems/ext/builder.rb:160:in `chdir'
    from /usr/share/rubygems/rubygems/ext/builder.rb:160:in `block in build_extension'
    from /usr/share/rubygems/rubygems/ext/builder.rb:159:in `synchronize'
    from /usr/share/rubygems/rubygems/ext/builder.rb:159:in `build_extension'
    from /usr/share/rubygems/rubygems/ext/builder.rb:198:in `block in build_extensions'
    from /usr/share/rubygems/rubygems/ext/builder.rb:195:in `each'
    from /usr/share/rubygems/rubygems/ext/builder.rb:195:in `build_extensions'
    from /usr/share/rubygems/rubygems/specification.rb:1436:in `block in build_extensions'
    from /usr/share/rubygems/rubygems/user_interaction.rb:45:in `use_ui'
    from /usr/share/rubygems/rubygems/specification.rb:1434:in `build_extensions'
    from /usr/share/rubygems/rubygems/stub_specification.rb:60:in `build_extensions'
    from /usr/share/rubygems/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
    from /usr/share/rubygems/rubygems/specification.rb:925:in `block in find_inactive_by_path'
    from /usr/share/rubygems/rubygems/specification.rb:924:in `each'
    from /usr/share/rubygems/rubygems/specification.rb:924:in `find'
    from /usr/share/rubygems/rubygems/specification.rb:924:in `find_inactive_by_path'
    from /usr/share/rubygems/rubygems.rb:185:in `try_activate'
    from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
    from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:144:in `require'
    from <internal:abrt_prelude>:2:in `<compiled>'

extconf failed, exit code 1

Gem files will remain installed in /home/user/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.7 for inspection.
Results logged to /home/user/.rvm/gems/ruby-2.2.1/extensions/x86_64-linux/eventmachine-1.0.7/gem_make.out
    from /usr/share/rubygems/rubygems/ext/ext_conf_builder.rb:38:in `block in build'
    from /usr/share/ruby/tempfile.rb:324:in `open'
    from /usr/share/rubygems/rubygems/ext/ext_conf_builder.rb:17:in `build'
    from /usr/share/rubygems/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
    from /usr/share/rubygems/rubygems/ext/builder.rb:160:in `chdir'
    from /usr/share/rubygems/rubygems/ext/builder.rb:160:in `block in build_extension'
    from /usr/share/rubygems/rubygems/ext/builder.rb:159:in `synchronize'
    from /usr/share/rubygems/rubygems/ext/builder.rb:159:in `build_extension'
    from /usr/share/rubygems/rubygems/ext/builder.rb:198:in `block in build_extensions'
    from /usr/share/rubygems/rubygems/ext/builder.rb:195:in `each'
    from /usr/share/rubygems/rubygems/ext/builder.rb:195:in `build_extensions'
    from /usr/share/rubygems/rubygems/specification.rb:1436:in `block in build_extensions'
    from /usr/share/rubygems/rubygems/user_interaction.rb:45:in `use_ui'
    from /usr/share/rubygems/rubygems/specification.rb:1434:in `build_extensions'
    from /usr/share/rubygems/rubygems/stub_specification.rb:60:in `build_extensions'
    from /usr/share/rubygems/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
    from /usr/share/rubygems/rubygems/specification.rb:925:in `block in find_inactive_by_path'
    from /usr/share/rubygems/rubygems/specification.rb:924:in `each'
    from /usr/share/rubygems/rubygems/specification.rb:924:in `find'
    from /usr/share/rubygems/rubygems/specification.rb:924:in `find_inactive_by_path'
    from /usr/share/rubygems/rubygems.rb:185:in `try_activate'
    from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
    from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:144:in `require'
    from <internal:abrt_prelude>:2:in `<compiled>'
npm ERR! weird error 1
npm ERR! not ok code 0
@bnvk bnvk added the bug label Sep 7, 2015
@peterjaric
Copy link

I'm sorry to not be able to help, but the build process improvements were added by @eschaefer. He deserves all praise and I'm sure he can answer your questions.

@peterjaric
Copy link

But I might add that it works fine on my Linux machine (and I don't use Ruby normally, either, I had to install Ruby).

@eschaefer
Copy link
Contributor

@bnvk super strange that ruby would throw an error here. The npm task runner is just launching jekyll concurrently with webpack. But yeah, maybe npm needs to know which ruby version is active in rvm. Looking into it...

@bnvk
Copy link
Member Author

bnvk commented Sep 7, 2015

@eschaefer cool thanks for checking it out for me. @peterjaric oops :P thanks again you two for helping out. Great to have help, open source FTW 😁

@eschaefer
Copy link
Contributor

@bnvk does the same error occur when you run npm run build as well?

Also, try to change the watch task in package.json to only launch jekyll and see if that even works, for example:

"watch": "jekyll serve --watch --config _config.yml,_config-dev.yml",

Just curious at which point the task/config is failing for ya.

@eschaefer
Copy link
Contributor

@bnvk Another idea since you're using rvm to manage ruby... maybe specify a version of ruby in the node watch task?

For example (based on the current watch task)...

 "watch": "webpack --progress --colors --watch & rvm ruby-2.0.0-p576 ; jekyll serve --watch --config _config.yml,_config-dev.yml",
  • Or re-install the jekyll gem globally using a newer ruby version?
  • I know there are also things you can tweak with rvm gemset but I'm kind of a noob in that area.
  • Use rbenv instead? Might be overkill.

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

No branches or pull requests

3 participants