ROR ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) - windows

I am trying to run rails application. I have installed rails 3 on my computer.. When trying to run it using rails server command, it is asking me to type "bundle install" in the command prompt:
C:\Users\Webyana Tech\Desktop\Rails3\wy_editor>bundle install
Fetching source index for http://rubygems.org/
Fetching source index for http://gems.github.com/
Using rake (0.8.7)
Using ZenTest (4.5.0)
Using RubyInline (3.8.6)
Using abstract (1.0.0)
Using activesupport (3.0.0)
Using builder (2.1.2)
Using i18n (0.4.2)
Using activemodel (3.0.0)
Using erubis (2.6.6)
Using rack (1.2.2)
Using rack-mount (0.6.13)
Using rack-test (0.5.7)
Using tzinfo (0.3.25)
Using actionpack (3.0.0)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.15)
Using actionmailer (3.0.0)
Using arel (1.0.1)
Using activerecord (3.0.0)
Using activeresource (3.0.0)
Using addressable (2.2.4)
Using crack (0.1.8)
Installing eventmachine (0.12.10) with native extensions C:/Ruby/lib/ruby/site_r
uby/1.9.1/rubygems/installer.rb:529:in `rescue in block in build_extensions':
ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
C:/Ruby/bin/ruby.exe extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... no
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for windows.h... yes
checking for winsock.h... yes
checking for main() in -lkernel32... yes
checking for main() in -lrpcrt4... yes
checking for main() in -lgdi32... yes
checking for main() in -lssl... no
creating Makefile
make
g++ -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby/include/ruby-1.9.1/r
uby/backward -I/C/Ruby/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_
BLOCKING_REGION -DHAVE_TBR -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_W
IN32 -DHAVE_WINDOWS_H -DHAVE_WINSOCK_H -DWITHOUT_SSL -DHAVE_MAKE_PAIR -O3 -g
-Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -
Wno-missing-field-initializers -Wno-long-long -o binder.o -c binder.cpp
In file included from project.h:137:0,
from binder.cpp:20:
binder.h:35:34: warning: type qualifiers ignored on function return type
In file included from project.h:138:0,
from binder.cpp:20:
Please help me.. I tried googling for this.. But couldnt find anything which is same as above... I guess the eventmachine is failing to install...

I'm having the exact error messages as yours when doing a "bundle install". For now you'll have to install an older version of "eventmachine", separately. Type "gem install eventmachine -v 0.12.8". It installed successfully for me.
#user662539: Well, I did have "eventmachine (0.12.8)" installed successfully, but I'm still couldn't start thin server. I got a error message prompting "This application has failed to start because msvcrt-ruby18.dll was not found. Re-installing the application may fix this problem.". Even if I copied over "msvcrt-ruby18.dll" from "\Ruby187\bin" to "\Ruby192\bin", I got another error message regarding "Segmentation fault".
So I revert my ruby version back to ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32] and able to start thin server.
Sorry I'm not able to help you on this one, but these my new findings.

Related

bundle install error in eventmachine installing

I had a problem trying to run the ruby project OPEN-NDC-PROJECT.
bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 13.0.3
Using concurrent-ruby 1.1.8
Using i18n 1.5.1
Using minitest 5.14.3
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using activesupport 5.0.7.2
Using activemodel 5.0.7.2
Using arel 7.1.4
Using activerecord 5.0.7.2
Using awesome_print 1.8.0
Using descendants_tracker 0.0.4
Using ice_nine 0.11.2
Using axiom-types 0.1.1
Using dependor 1.0.1
Using bogus 0.1.6
Using builder 3.2.4
Using bundler 1.17.3
Using chronic 0.10.2
Using coderay 1.1.3
Using coercible 1.0.0
Using daemons 1.3.1
Using database_cleaner-core 2.0.1
Using database_cleaner-active_record 2.0.0
Using database_cleaner 2.0.1
Using diffy 3.4.0
Using equalizer 0.0.11
Fetching eventmachine 1.2.7
Installing eventmachine 1.2.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/userName/.rbenv/versions/2.2.2/bin/ruby -r
./siteconf20210217-76181-1jmnsjp.rb extconf.rb
--with-cppflags=-I/usr/local/opt/openssl/include
checking for main() in -lcrypto... no
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for rb_wait_for_single_fd()... no
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for pipe2() in unistd.h... no
checking for accept4() in sys/socket.h... no
checking for SOCK_CLOEXEC in sys/socket.h... no
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... no
checking for gethrtime()... no
CXXFLAGS=$(cxxflags) -Wall -Wextra -Wno-deprecated-declarations
-Wno-ignored-qualifiers -Wno-unused-result -Wno-address
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling page.cpp
compiling pipe.cpp
compiling binder.cpp
compiling rubymain.cpp
compiling ssl.cpp
compiling ed.cpp
compiling cmain.cpp
compiling em.cpp
em.cpp:706:13: error: use of undeclared identifier 'rb_thread_select'; did you
mean 'rb_thread_fd_select'?
if ((ret = rb_thread_select(kqfd + 1, &fdreads, NULL, NULL, &tv)) < 1) {
^~~~~~~~~~~~~~~~
rb_thread_fd_select
/Users/userName/.rbenv/versions/2.2.2/include/ruby-2.2.0/ruby/intern.h:454:5:
note: 'rb_thread_fd_select' declared here
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct
timeval *);
^
em.cpp:706:40: error: cannot initialize a parameter of type 'rb_fdset_t *' with an
rvalue of type 'fd_set *'
if ((ret = rb_thread_select(kqfd + 1, &fdreads, NULL, NULL, &tv)) < 1) {
^~~~~~~~
/Users/userName/.rbenv/versions/2.2.2/include/ruby-2.2.0/ruby/intern.h:454:42:
note: passing argument to parameter here
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct
timeval *);
^
2 errors generated.
make: *** [em.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/Users/userName/RubymineProjects/ndc-sandbox/vendor/bundle/ruby/2.2.0/gems/eventmachine-1.2.7
for inspection.
Results logged to
/Users/userName/RubymineProjects/ndc-sandbox/vendor/bundle/ruby/2.2.0/extensions/x86_64-darwin-19/2.2.0-static/eventmachine-1.2.7/gem_make.out
An error occurred while installing eventmachine (1.2.7), and Bundler
cannot continue.
Make sure that `gem install eventmachine -v '1.2.7' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
thin was resolved to 1.8.0, which depends on
eventmachine
gem_make.out
/Users/userName/.rbenv/versions/2.2.2/bin/ruby -r ./siteconf20210217-73483-4tmlc2.rb extconf.rb --with-cppflags=-I/usr/local/opt/openssl/include
checking for main() in -lcrypto... no
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for rb_wait_for_single_fd()... no
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for pipe2() in unistd.h... no
checking for accept4() in sys/socket.h... no
checking for SOCK_CLOEXEC in sys/socket.h... no
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... no
checking for gethrtime()... no
CXXFLAGS=$(cxxflags) -Wall -Wextra -Wno-deprecated-declarations -Wno-ignored-qualifiers -Wno-unused-result -Wno-address
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling page.cpp
compiling pipe.cpp
compiling binder.cpp
compiling rubymain.cpp
compiling ssl.cpp
compiling ed.cpp
compiling cmain.cpp
compiling em.cpp
em.cpp:706:13: error: use of undeclared identifier 'rb_thread_select'; did you mean 'rb_thread_fd_select'?
if ((ret = rb_thread_select(kqfd + 1, &fdreads, NULL, NULL, &tv)) < 1) {
^~~~~~~~~~~~~~~~
rb_thread_fd_select
/Users/userName/.rbenv/versions/2.2.2/include/ruby-2.2.0/ruby/intern.h:454:5: note: 'rb_thread_fd_select' declared here
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
^
em.cpp:706:40: error: cannot initialize a parameter of type 'rb_fdset_t *' with an rvalue of type 'fd_set *'
if ((ret = rb_thread_select(kqfd + 1, &fdreads, NULL, NULL, &tv)) < 1) {
^~~~~~~~
/Users/userName/.rbenv/versions/2.2.2/include/ruby-2.2.0/ruby/intern.h:454:42: note: passing argument to parameter here
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
^
2 errors generated.
make: *** [em.o] Error 1
make failed, exit code 2
Gemfile
source 'https://rubygems.org'
ruby '2.2.2'
gem 'json' # JSON
gem 'foreman' # Process management
gem 'racksh'
gem 'thin'
gem 'rack-cors', :require => 'rack/cors'
gem 'sprockets'
gem 'rake'
# Formatting
gem 'nokogiri'
gem 'chronic'
gem 'htmlentities', '~> 4.3', '>= 4.3.4'
# DB
gem 'pg'
gem 'activerecord', '~> 5.0.0' # Database
gem 'redis', '~>3.2'
# API Framework
gem 'grape'
group :development do
gem 'rb-readline'
gem 'rerun'
gem 'mina' # Deployment
end
group :test do
gem 'test-unit'
gem "rack-test", require: "rack/test"
gem 'test_xml'
gem 'bogus'
gem 'database_cleaner'
gem 'timecop'
end
group :development, :test do
gem 'awesome_print'
gem 'pry'
end
I tried the following ways to solve this problem.
brew link openssql --force
Warning: Refusing to link macOS provided/shadowed software: openssl#1.1
If you need to have openssl#1.1 first in your PATH, run:
echo 'export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"' >> /Users/userName/.bash_profile
For compilers to find openssl#1.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
For pkg-config to find openssl#1.1 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl#1.1/lib/pkgconfig"
.base_profile
#..
export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl#1.1/lib/pkgconfig"
but result are the same
gem install eventmachine -- --with-cppflags=-I/usr/local/opt/openssl/include
gem install eventmachine --pre
bundle update eventmachine
add "gem 'eventmachine', '=1.0.3'" at Gemfile
change "gem 'eventmachine', '=1.0.4'" at Gemfile
change "gem 'eventmachine', '~>1.0.4'" at Gemfile
How can I solve this problem?
I work for
Mac Catalina 10.15.6

Ruby gems bundle install failure

I am installing Diaspora (open source social networking) in Ubuntu 16.04 using these directions. Installation instructions call for using Ruby Version Manager to install Ruby and then using Bundler to add some required gems. Ruby installs, then the command to use the bundler
:~/diaspora$ bin/bundle install --full-index
makes some progress and then fails at this step:
Fetching unf_ext 0.0.7.4
Installing unf_ext 0.0.7.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:/home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/ext/unf_ext
/home/ubuntu/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20180215-26943-187isn6.rb extconf.rb
checking for -lstdc++... yes
creating Makefile
current directory: /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/ext/unf_ext
make "DESTDIR=" clean
current directory: /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/ext/unf_ext
make "DESTDIR="
compiling unf.cc
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
virtual memory exhausted: Cannot allocate memory
Makefile:209: recipe for target 'unf.o' failed
make: *** [unf.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4 for inspection.
Results logged to /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/unf_ext-0.0.7.4/gem_make.out
An error occurred while installing unf_ext (0.0.7.4), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.4'` succeeds before bundling.
In Gemfile:
asset_sync was resolved to 2.2.0, which depends on
unf was resolved to 0.1.4, which depends on
unf_ext
I updated to gcc-7 and g++-7, and appear to be using them:
:~/diaspora$ update-alternatives --display gcc
gcc - auto mode
link best version is /usr/bin/gcc-7
link currently points to /usr/bin/gcc-7
link gcc is /usr/bin/gcc
/usr/bin/gcc-7 - priority 10
:~/diaspora$ update-alternatives --display g++
g++ - auto mode
link best version is /usr/bin/g++-7
link currently points to /usr/bin/g++-7
link g++ is /usr/bin/g++
/usr/bin/g++-7 - priority 10
I also successfully installed unf_ext without Bundler using
:~/diaspora$ gem install unf_ext -v '0.0.7.4'
and it is there:
:~/diaspora$ gem list
*** LOCAL GEMS ***
bigdecimal (default: 1.3.0)
bundler (default: 1.16.1)
bundler-unload (1.0.2)
did_you_mean (1.1.0)
executable-hooks (1.3.2)
gem-wrappers (1.3.2, 1.2.7)
io-console (default: 0.4.6)
json (default: 2.0.2)
minitest (5.10.1)
net-telnet (0.1.1)
openssl (default: 2.0.3)
power_assert (0.4.1)
psych (default: 2.2.2)
rake (12.0.0)
rdoc (default: 5.0.0)
rubygems-bundler (1.4.4)
rubygems-update (2.7.5, 2.6.14)
rvm (1.11.3.9)
test-unit (3.2.3)
unf_ext (0.0.7.5, 0.0.7.4, 0.0.7.2)
xmlrpc (0.2.1)
... but the same error persists.
Looking to understand the source of the error and how to resolve.
Your box is running out of memory during the installation:
virtual memory exhausted: Cannot allocate memory
It is killing the install. You should increase your system's memory.

Rails Error Running Gem Install PG

I am trying to push my app to Heroku and I configured my gemfile as such:
group :production do
gem 'pg', '0.18.4'
gem 'rails_12factor', '0.0.2'
gem 'puma'
end
And I am getting this error in my console when running bundle install:
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
Then when I run gem install pg -v '0.18.4', I get the following:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
When I run sudo gem install pg -v '0.18.4'
I get the following:
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.0.0/gems/pg-0.18.4/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20160125-5501-ugsd1s.rb extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** 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.
UPDATE
I reinstalled RVM and rails and now when I run gem install pg -v '0.18.4', it runs successfully:
Successfully installed pg-0.18.4
Parsing documentation for pg-0.18.4
Done installing documentation for pg after 3 seconds
1 gem installed
But when run bundle install, I get this:
Installing pg 0.18.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/benwong/Desktop/ruby/rails_projects/blog2/vendor/bundle/ruby/2.2.0/gems/pg-0.18.4/ext
/Users/benwong/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20160126-44660-1ufenyc.rb extconf.rb --with-pg-config=/Applications/Postgres.app/Contents/MacOS/bin/pg_config
Using config values from /Applications/Postgres.app/Contents/MacOS/bin/pg_config
sh: /Applications/Postgres.app/Contents/MacOS/bin/pg_config: No such file or directory
sh: /Applications/Postgres.app/Contents/MacOS/bin/pg_config: No such file or directory
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... yes
checking for PQconnectionUsedPassword()... yes
checking for PQisthreadsafe()... yes
checking for PQprepare()... yes
checking for PQexecParams()... yes
checking for PQescapeString()... yes
checking for PQescapeStringConn()... yes
checking for PQescapeLiteral()... yes
checking for PQescapeIdentifier()... yes
checking for PQgetCancel()... yes
checking for lo_create()... yes
checking for pg_encoding_to_char()... yes
checking for pg_char_to_encoding()... yes
checking for PQsetClientEncoding()... yes
checking for PQlibVersion()... yes
checking for PQping()... yes
checking for PQsetSingleRowMode()... yes
checking for PQconninfo()... yes
checking for rb_encdb_alias()... yes
checking for rb_enc_alias()... yes
checking for rb_thread_call_without_gvl()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_fd_select()... yes
checking for rb_w32_wrap_io_handle()... no
checking for rb_str_modify_expand()... yes
checking for rb_hash_dup()... yes
checking for PGRES_COPY_BOTH in libpq-fe.h... yes
checking for PGRES_SINGLE_TUPLE in libpq-fe.h... yes
checking for PG_DIAG_TABLE_NAME in libpq-fe.h... yes
checking for struct pgNotify.extra in libpq-fe.h... yes
checking for unistd.h... yes
checking for inttypes.h... yes
checking for ruby/st.h... yes
checking for C99 variable length arrays... yes
creating extconf.h
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/benwong/Desktop/ruby/rails_projects/blog2/vendor/bundle/ruby/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/pg-0.18.4/mkmf.log
current directory: /Users/benwong/Desktop/ruby/rails_projects/blog2/vendor/bundle/ruby/2.2.0/gems/pg-0.18.4/ext
make "DESTDIR=" clean
current directory: /Users/benwong/Desktop/ruby/rails_projects/blog2/vendor/bundle/ruby/2.2.0/gems/pg-0.18.4/ext
make "DESTDIR="
compiling gvl_wrappers.c
compiling pg.c
compiling pg_binary_decoder.c
compiling pg_binary_encoder.c
compiling pg_coder.c
compiling pg_connection.c
pg_connection.c:2394:3: warning: implicit declaration of function 'gettimeofday' is invalid in C99 [-Wimplicit-function-declaration]
gettimeofday(&currtime, NULL);
^
1 warning generated.
compiling pg_copy_coder.c
compiling pg_errors.c
compiling pg_result.c
compiling pg_text_decoder.c
compiling pg_text_encoder.c
compiling pg_type_map.c
compiling pg_type_map_all_strings.c
compiling pg_type_map_by_class.c
compiling pg_type_map_by_column.c
compiling pg_type_map_by_mri_type.c
compiling pg_type_map_by_oid.c
compiling pg_type_map_in_ruby.c
compiling util.c
linking shared-object pg_ext.bundle
ld: warning: directory not found for option '-L/Users/haven/.sm/pkg/active/lib'
ld: file not found: dynamic_lookup
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pg_ext.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/benwong/Desktop/ruby/rails_projects/blog2/vendor/bundle/ruby/2.2.0/gems/p
g-0.18.4 for inspection.
Results logged to /Users/benwong/Desktop/ruby/rails_projects/blog2/vendor/bundle/ruby/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/pg-0.18.4/gem_make.out
Using puma 2.15.3
Using rails_serve_static_assets 0.0.4
Using rails_stdout_logging 0.0.4
Using sass 3.4.21
Using tilt 2.0.2
Using spring 1.6.2
Using rdoc 4.2.1
Using tzinfo 1.2.2
Using nokogiri 1.6.7.2
Using rack-test 0.6.3
Using warden 1.2.4
Using mail 2.6.3
Using binding_of_caller 0.7.2
Using coffee-script 2.4.1
Using uglifier 2.7.2
Using sprockets 3.5.2
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
You need to have PostgreSQL installed to install pg gem. Also PATHs will need to be configured.
You can use http://postgresapp.com/ to easily install PostgreSQL on Mac. And use this to configure PATH: http://postgresapp.com/documentation/cli-tools.html
Try this it worked for me it must Have all psql dependency so it will work
sudo apt-get install -y libpq-dev build-essential postgresql-server-dev-all libpgsql-ruby postgresql ruby-dev && gem install pg

debugger gem installation issue on windows 7

Not able to install debugger or ruby-debug19 on a windows 64 bit machine. Have installed Devkit, rubygems and able to install all the other gems except this.
ruby -v
ruby 1.9.3p551 (2014-11-13) [i386-mingw32]
gem --version
2.4.1
ERROR :
gem install debugger
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing debugger:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20141205-5484-1qgupo8.rb extconf.rb
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
checking for rb_method_entry_t.called_id in method.h... yes
checking for vm_core.h... yes
checking for iseq.h... yes
checking for insns.inc... yes
checking for insns_info.inc... yes
checking for eval_intern.h... yes
checking for struct iseq_line_info_entry in vm_core.h,iseq.h... no
checking for struct iseq_insn_info_entry in vm_core.h,iseq.h... yes
checking for if rb_iseq_compile_with_option was added an argument filepath... yes
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.6.8 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/debugger-1.6.8/gem_make.out
gem list
*** LOCAL GEMS ***
archive-tar-minitar (0.5.2)
atk (2.2.3 x86-mingw32)
bigdecimal (1.1.0)
cairo (1.14.0 x86-mingw32)
columnize (0.8.9)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.7, 1.1.6
gdk_pixbuf2 (2.2.3 x86-mingw32)
glib2 (2.2.3 x86-mingw32)
green_shoes (1.1.374)
gtk2 (2.2.3 x86-mingw32)
io-console (0.3)
json (1.5.5)
minitest (2.5.1)
pango (2.2.3 x86-mingw32)
pkg-config (1.1.6)
rake (0.9.2.2)
rbx-require-relative (0.0.9)
rdoc (3.9.5)
ruby_core_source (0.1.5)
rubygems-update (2.4.5)
Thanks in advance
Looks like there is some issue with the latest version of RubyGems.
This version has a failure with Ruby 1.9.3 that is causing the error.
Downgrading to version 1.8.x running the following command:
gem update --system 1.8.29
And then I could install the debugger gem.
gem install debugger
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed debugger-1.6.8
1 gem installed
Installing ri documentation for debugger-1.6.8...
Installing RDoc documentation for debugger-1.6.8...

Unable to install pcaprub 0.11.3

C:\metasploit\apps\pro\msf3\tools>bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Using rake (10.0.4)
Using i18n (0.6.1)
Using multi_json (1.0.4)
Using activesupport (3.2.13)
Using builder (3.0.4)
Using activemodel (3.2.13)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.13)
Using metaclass (0.0.1)
Using mocha (0.13.3)
Using bourne (1.4.0)
Using database_cleaner (0.9.1)
Using diff-lcs (1.2.2)
Using factory_girl (4.2.0)
Using json (1.7.7)
Using pg (0.15.1)
Using metasploit_data_models (0.16.1)
Using msgpack (0.5.4)
Using network_interface (0.0.1)
Using nokogiri (1.5.9)
Using packetfu (1.1.8)
Installing pcaprub (0.11.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
C:/Ruby200/bin/ruby.exe extconf.rb
[*] Running checks for pcaprub code...
platform is i386-mingw32
checking for main() in -lws2_32... yes
checking for main() in -liphlpapi... yes
checking for windows.h... yes
checking for winsock2.h... yes
checking for iphlpapi.h... yes
checking for pcap_open_live() in -lwpcap... no
checking for pcap_setnonblock() in -lwpcap... no
creating Makefile
make "DESTDIR="
generating pcaprub-i386-mingw32.def
compiling pcaprub.c
In file included from C:/WpdPack/include/pcap/pcap.h:41:0,
from C:/WpdPack/include/pcap.h:45,
from pcaprub.c:8:
C:/WpdPack/include/pcap-stdinc.h:64:0: warning: "snprintf" redefined
c:/Ruby200/include/ruby-2.0.0/ruby/subst.h:6:0: note: this is the location of th
e previous definition
C:/WpdPack/include/pcap-stdinc.h:65:0: warning: "vsnprintf" redefined
c:/Ruby200/include/ruby-2.0.0/ruby/subst.h:7:0: note: this is the location of th
e previous definition
linking shared-object pcaprub.so
gcc.exe: C:/Users/niravzaveri/Downloads/DevKit/link: No such file or directory
gcc.exe: /LIBPATH:C:/WpdPack/lib: Invalid argument
make: *** [pcaprub.so] Error 1
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/pcaprub-0
.11.3 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/pcaprub-0.11.3/ext/pcaprub
/gem_make.out
An error occurred while installing pcaprub (0.11.3), and Bundler cannot
continue.
Make sure that `gem install pcaprub -v '0.11.3'` succeeds before bundling.
To run MSF on Win7/32-bit, I just prepared Ruby200.
I am unable to do much without installing the bundle.
I tried to install using the following thread:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/392423
I did install a pcaprub 0.11.3.a1 (own made patch as per above url) and it works as well, but when I do "bundle install", it tries to install pcaprub 0.11.3 again!
The paths:
C:/Users/niravzaveri/Downloads/DevKit/ is set, but there's no link folder
C:/WpdPack/lib is a valid path but where its going wrong no clue.
Please let me know what other information would you need to help me solve the issue.
This is my first encounter with Ruby.
Thanks for the help!

Resources