2


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

1
  • Installing the rails gem by ignoring the dependencies won't help in your work with rails since it depends on many gems, and they need to be present. Here's the same error message in a different context, but on Windows: github.com/rubygems/rubygems-mirror/issues/14 Perhaps best to put the full error trace in the question, and hope someone gives a better answer. Commented Feb 9, 2013 at 11:47

2 Answers 2

1

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

gem install rails --ignore-dependencies

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.