Solved

Unable to install Rails Gem

Posted on 2012-04-02
6
1,417 Views
Last Modified: 2012-08-28
Hi,

I am halfway to getting a RoR application hosted on my local machine (This is my first foray into using RoR) and have installed Ruby, downloaded RubyGems and am trying to install Rails. Unfortunately i am unable to install new gems using command prompt as i'm receiving the error below.

Is there an alternate way to install Rails? Otherwise can somebody advise what request i have to put in in order to allow access to that site? (I can access that file via browser)

Thanks in advance

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ETIMEDOUT: A connection attempt failed because the connected party di
d not properly respond after a period of time, or established connection failed
because connected host has failed to respond. - connect(2) (http://rubygems.org/
latest_specs.4.8.gz)
0
Comment
Question by:basil365
  • 4
  • 2
6 Comments
 

Author Comment

by:basil365
ID: 37797236
I got it workin gby using ntmlmaps proxy, but i am getting an error when installing:

ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: rails requires actionpack (= 3.2.3), activer
ecord (= 3.2.3), activeresource (= 3.2.3), actionmailer (= 3.2.3), railties (= 3
.2.3), bundler (~> 1.0); activesupport requires i18n (~> 0.6), multi_json (~> 1.
0)

I'm following this guide: rails guide
0
 
LVL 13

Expert Comment

by:LinuxGuru
ID: 37806440
Check the following url and try as mentioned.

http://railsforum.com/viewtopic.php?id=46906
0
 

Author Comment

by:basil365
ID: 37806603
thanks - i had seen that page but still no luck, i'm going to try the same steps as above on my personal PC and see if that works
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 13

Accepted Solution

by:
LinuxGuru earned 500 total points
ID: 37818852
Ok sure. Try and let us know the results.
0
 

Author Comment

by:basil365
ID: 37824118
i'm trying to run 'bundle install' on the app that im trying to run. Its failing on one particular gem -kgio .Im getting this error:

 
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing kgio:
        ERROR: Failed to build gem native extension.

        C:/Ruby193/bin/ruby.exe extconf.rb
checking for CLOCK_MONOTONIC in time.h... no
checking for CLOCK_MONOTONIC() in time.h... no
checking for clockid_t in time.h... no
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... no
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... no
getaddrinfo required
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby193/bin/ruby
        --with-rtlib
        --without-rtlib
        --with-nsllib
        --without-nsllib
        --with-socketlib
        --without-socketlib


Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/kgio-2.7.
3 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/kgio-2.7.3/ext/kgio/gem_ma
ke.out

does anybody know what my next step should be?
0
 

Author Comment

by:basil365
ID: 37826704
Hi,

On a side note - i have a zip file containing a copy of the app which i tried to place on a hosting site. When i navigate to the web page i get the following stacktrace:

     /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb      10      in `exit'
1      /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb      10      
2      /usr/lib/ruby/1.8/rubygems/custom_require.rb      36      in `gem_original_require'
3      /usr/lib/ruby/1.8/rubygems/custom_require.rb      36      in `require'
4      /home/ppapp/ppapp.mobi/config/boot.rb      6      
5      /usr/lib/ruby/1.8/rubygems/custom_require.rb      31      in `gem_original_require'
6      /usr/lib/ruby/1.8/rubygems/custom_require.rb      31      in `require'
7      /home/ppapp/ppapp.mobi/config/application.rb      1      
8      /usr/lib/ruby/1.8/rubygems/custom_require.rb      31      in `gem_original_require'
9      /usr/lib/ruby/1.8/rubygems/custom_require.rb      31      in `require'
10      /home/ppapp/ppapp.mobi/config/environment.rb      2      
11      /usr/lib/ruby/1.8/rubygems/custom_require.rb      31      in `gem_original_require'
12      /usr/lib/ruby/1.8/rubygems/custom_require.rb      31      in `require'
13      config.ru      3      
14      /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb      46      in `instance_eval'
15      /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb      46      in `initialize'
16      config.ru      1      in `new'
17      config.ru      1      

Can anybody help me here?
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Article by: narshlob
If you've ever programmed in Ruby and have come across either a proc or a lambda, you might have been wondering what the difference is between the two and when you would use one over the other. This article will try to explain the difference between…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now