OmniSharp / homebrew-omnisharp-roslyn

16 stars 19 forks source link

NoMethodError: undefine method 'undent' #10

Closed mrcc912 closed 4 years ago

mrcc912 commented 5 years ago

When I try to install omnisharp-mono from home brew I am getting this error:

brew install omnisharp-mono
==> Installing omnisharp-mono from omnisharp/omnisharp-roslyn
==> Downloading https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v1.19.0/omnisharp-mono.tar.gz
Already downloaded: /Users/michaelchristensen-calvin/Library/Caches/Homebrew/downloads/accb073e2a25e0d83bda053494eac0d1235280287a534faff3fcbc93364feca6--omnisharp-mono.tar.gz
Error: An exception occurred within a child process:
  NoMethodError: undefined method `undent' for #<String:0x00007fb6e183a6e0>

I can run brew install omnisharp just fine, so it just seems to be the omnisharp-mono package that has this issue.

mrcc912 commented 5 years ago

My homebrew version is: Homebrew 2.1.7-6-gde5cd92 Homebrew/homebrew-core (git revision a9ce; last commit 2019-07-10) Homebrew/homebrew-cask (git revision 22afd; last commit 2019-07-10)

And I am on OSX vresion 10.14.5

Cy-Tek commented 5 years ago

I am also getting this error on the same version of OSX

Cookizza commented 4 years ago

This is still an issue and pretty much prevents anyone using spacemacs from getting the lang server running easily :(

razzmatazz commented 4 years ago

@Cookizza which version of spacemacs are you on? The latest version of omnisharp-emacs has been able to download and install the server by itself for a long time already.

Cookizza commented 4 years ago

@razzmatazz I am on Mojave running latest Homebrew and Latest Spacemacs - If I try to run the omnisharp server install from Spacemacs I get an error which asks me to install it manually. Using the instructions here https://github.com/OmniSharp/homebrew-omnisharp-roslyn to install omnisharp-mono I then get the error:

Error: An exception occurred within a child process:
NoMethodError: undefined method `undent' for #<String:0x00007fca19ba64c8>
Did you mean?  undef

I cannot get any further in the installation :( I really would love to use Spacemacs as my editor for C# :D

razzmatazz commented 4 years ago

@Cookizza do you have more messages on *Messages* or *omnisharp-log* buffer for diagnostics?

I have the exact same configuration so maybe we can figure out why automatic installation does not work.

Have you tried running M-x omnisharp-install-server manually?

Cookizza commented 4 years ago

Thanks so much @razzmatazz for your help here, much appreciated.

Messages buffer has:

omnisharp: this will download and extract ~20-30 MB from "https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v1.34.5/omnisharp-osx.tar.gz"; do you want to continue? (y or n) y
omnisharp: attempting to download and install OmniSharp server into /Users/pudd1ng/.emacs.d/.cache/omnisharp/server/v1.34.5
omnisharp: extracting "omnisharp-osx.tar.gz" into "/Users/pudd1ng/.emacs.d/.cache/omnisharp/server/v1.34.5"
omnisharp: server could not be installed automatically. Please check https://github.com/OmniSharp/omnisharp-emacs/blob/master/doc/server-installation.md for instructions.

There doesn't seem to be an omnisharp-log buffer so I guess it is not starting?

I think perhaps there is an issue with my homebrew? I've not had problems elsewhere but maybe?

razzmatazz commented 4 years ago

You should not need homebrew for automatic installation to work..

Can you check if you have:

Cookizza commented 4 years ago

Yes the folder ~/.emacs.d/.cache/omnisharp/server/v1.34.5/ exists and has omnisharp-osx.tar.gz file within.

However trying to use gunzip i get:

$ gunzip -c omnisharp-osx.tar.gz
gunzip: omnisharp-osx.tar.gz: unexpected end of file

Looking at the file size though, 0 bytes! So i guess download is failing?

razzmatazz commented 4 years ago

Right! it should not be 0

And you should use 'tar xv' instead of gunzip for .tar.gz files, btw.

Which versino of emacs are you running on?

Do you have gnutls installed on your emacs (check with "F1 v" then "libgnutls-version ")

-Saulius

On Mon, 2019-12-30 at 05:39 -0800, Cookizza wrote:

Yes the folder ~/.emacs.d/.cache/omnisharp/server/v1.34.5/ exists and has omnisharp-osx.tar.gz file within.

However trying to use gunzip i get:

$ gunzip -c omnisharp-osx.tar.gz gunzip: omnisharp-osx.tar.gz: unexpected end of file Looking at the file - it's 0 bytes! So i guess download is failing?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

razzmatazz commented 4 years ago

Have you tried to remove the .tgz file ant run omnisharp-install-server again, -- maybe download procedure broke for some reason that time you ran it?

And another way to fix this problem (and avoid this debugging) would be to download:

manually and place it on that folder, and then attempt to run omnisharp-install-server again.

razzmatazz commented 4 years ago

all omnisharp-emacs does is it downloads that .tgz and extracts into the folder where the file is located. (~/.emacs.d/.cache/omnisharp/server/v1.34.5/) -- so you can just place the file there and extract it with tar xv $file

Cookizza commented 4 years ago

@razzmatazz I've extracted that download manually and I can now start the server from within spacemacs. thanks so much for your help on this!!

claui commented 4 years ago

Is this tap still maintained?

9 has been open since mid-2018 and will fix this.

filipw commented 4 years ago

fixed with #12