Closed boristyukin closed 2 years ago
Looks like terraspace_plugin_azurerm requires that unf_ext
gem but the other plugins do not. And unf_ext
gem is having trouble installing on the Windows WSL2 Linux env. What's in: /opt/terraspace/embedded/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/unf_ext-0.0.8/mkmf.log
gem install unf_ext
Guessing it's probably a missing development header library. Guessing that the ubuntu version on the Windows WSL2 is missing it. Unsure if installing the development header outside of opt will allow it to work.
Am interested in Windows WSL2. Think going to provide docs with terraspace and Windows WSL2. Have seen more and more folks in other projects like Jets using WSL2. So hopefully that's a way for windows users to use terraspace.
thanks @tongueroo, yes WSL2 is super popular lately for sure!
this is the content of mkmf.log file:
"gcc -o conftest -I/opt/terraspace/embedded/include/ruby-3.0.0/x86_64-linux -I/opt/terraspace/embedded/include/ruby-3.0.0/ruby/backward -I/opt/terraspace/embedded/include/ruby-3.0.0 -I. -I/opt/terraspace/embedded/include -O3 -D_FORTIFY_SOURCE=2 -fstack-protector -O3 -g -pipe -I/opt/terraspace/embedded/include -I/opt/terraspace/embedded/include -O3 -D_FORTIFY_SOURCE=2 -fstack-protector -O3 -g -pipe -fPIC conftest.c -L. -L/opt/terraspace/embedded/lib -Wl,-rpath,/opt/terraspace/embedded/lib -L/opt/terraspace/embedded/lib -Wl,-rpath,/opt/terraspace/embedded/lib -L. -Wl,-rpath,/opt/terraspace/embedded/lib -L/opt/terraspace/embedded/lib -fstack-protector-strong -rdynamic -Wl,-export-dynamic -L/opt/terraspace/embedded/lib -Wl,-rpath,/opt/terraspace/embedded/lib -Wl,-rpath,/opt/terraspace/embedded/lib -L/opt/terraspace/embedded/lib -lruby -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
@tongueroo looks like it works now!
I had to run that in WSL2 on Ubuntu and it seems that it did the trick:
sudo apt-get install build-essential
sudo apt-get install libxml2-dev libsqlite3-dev zlib1g-dev liblzma-dev
but I think I also installed terraspace using gem install terraspace
when I was troubleshooting why example did not work with standalone terraspace installer
I just installed terraspace and terraform in Ubuntu WSL2. Everything is the latest version.
I used standalone installer for Terraspace as I did not want to install Ruby separately. Followed the steps here: https://terraspace.cloud/docs/install/standalone/
If I run
I get this error below.
BUT if I run demo for AWS or Google, all is fine! So these two commands below work perfectly fine for me:
LoadError: cannot load such file -- terraspace_plugin_azurerm ERROR: Unable to require plugin terraspace_plugin_azurerm
Checklist
My Environment
Windows 10 with WSL2 Ubuntu, all most recent versions ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux] Detected Terrspace version: 1.0.0 Detected Terraform v1.1.3