Saturday, 11 February 2012

Errors While RoRing


/*****************************ISSUE: 1****************************************/
C:\Ruby192\bin>gem install kgio

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:/Ruby192/bin/ruby.exe extconf.rb
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:/Ruby192/bin/ruby


Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/kgio-2.3.
2 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/kgio-2.3.2/ext/kgio/gem_ma
ke.out


Solution:
  Kgio gem in *nix only. It's not available for window platform.

/*****************************ISSUE: 2****************************************/
>>gem install jquery-rails
Fetching: activesupport-3.2.0.rc2.gem (100%)
Fetching: activemodel-3.2.0.rc2.gem (100%)
Fetching: rack-1.4.0.gem (100%)
Fetching: journey-1.0.0.rc4.gem (100%) <--- journey rc4 is installed
Fetching: sprockets-2.1.2.gem (100%)
Fetching: actionpack-3.2.0.rc2.gem (100%)
ERROR:  Error installing jquery-rails:
        actionpack requires journey (~> 1.0.0.rc1) ,<--- yet gem install complains!

Solution:
    gem install journey -v 1.0.0.rc1




/*****************************ISSUE: 3****************************************/



ArgumentError

wrong number of arguments (3 for 1)
Rails.root: d:/railsProjects/startupTweets/startupTweets

Request

Parameters:
None

Show session dump
Show env dump

Response

Headers:
None




Solution:

Run bundle show and check version of omniauth gem. May be while upgrading rails you updatedomniauth as well.
Version 1.* of omniauth requires separate gem omniauth-twitter for twitter authentication. As you don't have it in your Gemfile it tries to load as middleware Twitter class from twitter gem that would cause similar error.
To avoid issues like that in the future consider using "~> 0.2.6" for gems versioning instead of ">= 0.2.6". It protects you from unexpected major releases of gems you're using.

/*****************************ISSUE: 4****************************************/














No comments:

Post a Comment