Reputation: 1079
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
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
Reputation: 1079
I found out how to install it just add --ignore-dependencies at the end.
gem install rails --ignore-dependencies
Upvotes: 1