Trix: Building on Windows

Created on 1 Sep 2016  路  8Comments  路  Source: basecamp/trix

I'm trying to build this on Windows 7, but when I run bin/setup I keep getting an error from the curses gem. It fails to build native binaries due to missing headers. I've tried:

  • installing ruby-dev
  • using MSYS2 w/ these commands:
    pacman -S mingw-w64-x86_64-ruby pacman -S mingw-w64-x86_64-toolchain pacman -S base-devel gmp-devel libcrypt-devel ncurses-devel gem install curses
  • Creating an Ubuntu virtual machine and try to get curses to install there, with the exact same error.

I'm currently running Ruby 2.3.1 and Gem 2.5.1.
Is there anything obvious I'm doing wrong? I can provide the error messages and mkmf.log if it would be any help.

Most helpful comment

Thanks, curses built just fine when using the mingw64 shell!

All 8 comments

It looks like @preetpalS got curses installed on Windows. See https://github.com/ruby/curses/issues/13#issuecomment-240888742. Hope that helps! I'm afraid there's not much more we can do.

@MysticSheik If you those instructions work for you, make to sure run the blade commands from bash (not the Windows Command Prompt) if you are getting errors related to files not being found. Also, if you haven't already, you may want to look into using a Ruby package manager like uru (which is what I use to switch between Ruby versions) If you are running multiple Rubies on Windows as having multiple Rubies on your path may cause issues.

@preetpalS I'm running everything from bash, but once I get to the gem install curses it just throws the same error as before (Error building gem native extensions due to missing headers). Multiple ruby versions isn't a problem because I removed every version and reinstalled 2.3.1.

@MysticSheik Are you using the right bash? There are three bashes that come with MSYS2 (the msys one, the 64-bit one, and the 32-bit one), use the 64-bit one (you might have to go into the folder where MSYS2 is installed and click on the cmd or batch file to start it). The 64-bit development headers/tools and compilers might only be available from that shell. Let me know how that goes (I'll update the referenced comment, if that work for you).

Thanks, curses built just fine when using the mingw64 shell!

That's awesome =), I am glad that worked for you. Updated the referenced comment with that additional tip.

I'm not very familiar with ruby, but I want to use this project, but I don't know how to build this project on Windows platform, anybody knows? I look forward to hearing from you.

@anterwx Based on bin/setup you would need to have https://github.com/rbenv/rbenv installed, which is not intended to work on Windows (you might be able to use https://github.com/nak1114/rbenv-win instead though (I have not personally used this)). If you just want to use this package (and not make changes or contribute to the package), you should just use the NPM package.

Another route you could take, is to try the Windows Subsystem for Linux if you are using Windows 10.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

radcliff picture radcliff  路  5Comments

lcsqlpete picture lcsqlpete  路  3Comments

lanzhiheng picture lanzhiheng  路  4Comments

javan picture javan  路  4Comments

atuttle picture atuttle  路  4Comments