Ruby on Rails Thursday, March 1, 2012

Ok, I fix the double dashes but now see the output:

[root@ruby-devserver ~]# gem install pg --
--with-pg-include=/usr/pgsql-9.1/include/
--with-pg-config=/var/lib/pgsql/9.1/data/
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
--with-pg-include=/usr/pgsql-9.1/include/
--with-pg-config=/var/lib/pgsql/9.1/data/
Using config values from /var/lib/pgsql/9.1/data/
sh: /var/lib/pgsql/9.1/data/: is a directory
sh: /var/lib/pgsql/9.1/data/: is a directory
checking for libpq-fe.h... *** 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
--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=/usr/local/rvm/rubies/ruby-1.9.3-p125/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:381:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:506:in
`try_cpp'
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:970:in
`block in find_header'
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:790:in
`block in checking_for'
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:284:in
`block (2 levels) in postpone'
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:284:in
`block in postpone'
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:280:in
`postpone'
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:789:in
`checking_for'
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/mkmf.rb:969:in
`find_header'
from extconf.rb:40:in `<main>'


Gem files will remain installed in
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/pg-0.13.2 for inspection.
Results logged to
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/pg-0.13.2/ext/gem_make.out

I notice this "You have to install development tools first." which DT is
needed here?

Ing. Reynier Perez Mira
eMail: reynierpm@gmail.com, reynierpm@hotmail.com
Skype: reynierpm
Mobile: +58 424.180.5609
Site: http://reynierpm.site90.com

On 3/1/2012 7:55 PM, Luis Lavena wrote:
> gem install pg -- --with-pg-include=... --with-pg-lib=...

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment