Kien Dang Ngoc
Kien Dang Ngoc

Reputation: 1079

can't install rails in windows 7 - unexpected end of file error


I'm new at ruby. After installed the latest version of ruby, I started to install sqlite3 and rails but I failed to install rails, followed the guide, this is the command:

gem install rails

and I got this error

ERROR: While executing gem ... (Zlib::GzipFile::Error) unexpected end of file

Upvotes: 2

Views: 399

Answers (2)

Luis Lavena
Luis Lavena

Reputation: 10378

Most of the times a Zlib::GzipFile::Error means RubyGems had issues parsing the response of the server.

This happens when your internet connection/configuration is behind a proxy that RubyGems is not aware of.

Please look at your internet options to determine the proxy configuration (it will look like http://user:pass@proxyserver:8080/ or similar (user, pass, proxyserver and port are examples)

Once you have that information, you can tell RubyGems to use that:

gem install rails --http-proxy=http://user:pass@proxyserver:8080

Or you can set it as environment variable:

SET HTTP_PROXY=http://user:pass@proxyserver:8080/

See gem help install for more details on the proxy documentation.

Upvotes: 1

Kien Dang Ngoc
Kien Dang Ngoc

Reputation: 1079

I found out how to install it just add --ignore-dependencies at the end.

gem install rails --ignore-dependencies

Upvotes: 1

Related Questions