network error while installing gems with bundler

1,391 views
Skip to first unread message

r144

unread,
Oct 18, 2013, 3:54:28 PM10/18/13
to rubyversi...@googlegroups.com
hello,

I have installed jruby 1.6.8 with rvm. When I try to install a gem either with the jgem command or with bundle I get mysterious error messages. I was wondering if this is a rubygems.org issue, a jruby issue or a rvm issue?

My Gemfile essentially contains

source 'http://rubygems.org'
#source 'https://rubygems.org'

gem 'rails', '~>3.1.12'


This is what I tried

ruud@janusZ cd rails
You are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers,
you can switch to '.ruby-version' using 'rvm rvmrc to [.]ruby-version'
or ignore this warning with 'rvm rvmrc warning ignore /home/ruud/project/vistafactuur/rails/.rvmrc',
'.rvmrc' will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run 'rvm rvmrc warning ignore all.rvmrcs'.

Using /home/ruud/.rvm/gems/jruby-1.6.8
.Using /home/ruud/.rvm/gems/jruby-1.6.8 with gemset rails

ruud@janusZ rvm --version

rvm 1.23.4 (master) by Wayne E. Seguin <wayneeseg___@__ail.com>, Michal Papis <mpap__@__ail.com> [https://rvm.io/]

ruud@janusZ bundle install
Fetching source index from http://rubygems.org/
Resolving dependencies...
Network error while fetching
http://rubygems.org/quick/Marshal.4.8/rails-3.1.12.gemspec.rz
zsh: exit 17    bundle install
ruud@janusZ wget http://rubygems.org/quick/Marshal.4.8/rails-3.1.12.gemspec.rz
--2013-10-18 21:42:21--  http://ruby.........................
HTTP request sent, awaiting response... 200 OK
Length: 568 [binary/octet-stream]
Saving to: `rails-3.1.12.gemspec.rz.1'

100%[======================================>] 568         --.-K/s   in 0s     

2013-10-18 21:42:22 (37.3 MB/s) - `rails-3.1.12.gemspec.rz.1' saved [568/568]

The connection is no problem here, but the 'network error' keeps recurring.

ruud@janusZ gem install rails -v 1.3.12
WARNING:  Error fetching data: SocketError: Network is unreachable (http://rubygems.org/specs.4.8.gz)
ERROR:  Could not find a valid gem 'rails' (= 1.3.12) in any repository
WARNING:  Error fetching data: SocketError: Network is unreachable (http://rubygems.org/latest_specs.4.8.gz)
ERROR:  Possible alternatives: rails
zsh: exit 2
ruud@janusZ gem install rails -v 1.3.12
WARNING:  Error fetching data: SocketError: Network is unreachable (http://rubygems.org/specs.4.8.gz)
ERROR:  Could not find a valid gem 'rails' (= 1.3.12) in any repository
WARNING:  Error fetching data: SocketError: Network is unreachable (http://rubygems.org/latest_specs.4.8.gz)
ERROR:  Possible alternatives: rails
zsh: exit 2

When I change in the source line 'http' to 'https', the message becomes

ruud@janusZ bundle install
Fetching source index from https://rubygems.org/
Resolving dependencies...
Could not find gem 'rails (~> 3.1.12) java' in the gems available on this
machine.
zsh: exit 7     bundle install


It can be the question is on the wrong list. I simply don't know or understand enough where to start. I am really out of ideas. Who can help me?

thanks in advance!! Ruud

mpapis

unread,
Oct 18, 2013, 5:49:07 PM10/18/13
to rubyversi...@googlegroups.com
1. Update your java, it is important to get latest security updates (they will include ssl certificates for rubygems)
2. Update your JRuby, the team has put a lot of effort to make JRuby 1.7.5 a lot better then earlier versions

r144

unread,
Oct 20, 2013, 4:46:56 AM10/20/13
to rubyversi...@googlegroups.com


On Friday, October 18, 2013 11:49:07 PM UTC+2, mpapis wrote:
1. Update your java, it is important to get latest security updates (they will include ssl certificates for rubygems)

 thanks Michal,

I was using java 1.6 (openjdk); updating to 1.7 was sufficient to solve the problem. I cannot change the jruby version by now, but I keep your advice in mind. Thanks again!

Ruud
Reply all
Reply to author
Forward
0 new messages