issues with Ruby ruby 2.0.0p247 (2013-06-27) [i386-mingw32]

762 views
Skip to first unread message

M K

unread,
Oct 11, 2013, 4:47:08 AM10/11/13
to rubyin...@googlegroups.com
the instructions were for my beef software are following as it needs ruby.   
although i dowinlaoded 2.0.0p247 (2013-06-27) [i386-mingw32] as my machine is windows 7 32 bit 
not sure if ruby 1.9  as opposed to 2.0 is the issue.

  1.  BeEF requires ruby 1.9 and the "bundler" gem. Bundler can be installed by:

      gem install bundler

      
   2. Prerequisites (Windows)
      
      Windows requires the sqlite.dll.  Simply grab the zip file below and extract it to your Ruby bin directory:



3      Obtain application code either by downloading an archive from .......beefproject/beef/zipball/master or cloning the GIT repo xx...@xx.com:beefproject/beef.git

 Navigate to the ruby source directory and run:

 bundle install

      Bundler installs all the pre-requisite gems.





i get following errror - 
i used rubyinstaller-2.0.0-p247
added to path
ran bundle install 
at following step gave error as per out put below:

---
Installing json (1.8.0)
Installing librex (0.0.68)
Installing msgpack (0.5.6)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.

    C:/Ruby200/bin/ruby.exe extconf.rb
checking for ruby/st.h... yes
checking for st.h... yes
checking for rb_str_replace() in ruby.h... yes
creating Makefile

make "DESTDIR="
generating msgpack-i386-mingw32.def
compiling buffer.c
In file included from c:/Ruby200/include/ruby-2.0.0/ruby/defines.h:153:0,
                 from c:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:70,
                 from c:/Ruby200/include/ruby-2.0.0/ruby.h:33,
                 from compat.h:21,
                 from buffer.h:21,
                 from buffer.c:19:
c:/Ruby200/include/ruby-2.0.0/ruby/win32.h: In function 'rb_w32_pow':
c:/Ruby200/include/ruby-2.0.0/ruby/win32.h:787:5: warning: implicit declaration
of function '_controlfp' [-Wimplicit-function-declaration]
c:/Ruby200/include/ruby-2.0.0/ruby/win32.h:788:16: error: '_PC_64' undeclared (f
irst use in this function)
c:/Ruby200/include/ruby-2.0.0/ruby/win32.h:788:16: note: each undeclared identif
ier is reported only once for each function it appears in
c:/Ruby200/include/ruby-2.0.0/ruby/win32.h:788:24: error: '_MCW_PC' undeclared (
first use in this function)
make: *** [buffer.o] Error 1


Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/msgpack-0
.5.6 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/msgpack-0.5.6/ext/msgpack/
gem_make.out
An error occurred while installing msgpack (0.5.6), and Bundler cannot continue.

Make sure that `gem install msgpack -v '0.5.6'` succeeds before bundling.

how to i dix above error to be able to proceed with bundle install

Luis Lavena

unread,
Oct 16, 2013, 11:34:36 AM10/16/13
to rubyin...@googlegroups.com
Hello,

Please see responses inline...

On Fri, Oct 11, 2013 at 5:47 AM, M K <nnoo...@gmail.com> wrote:
the instructions were for my beef software are following as it needs ruby.   
although i dowinlaoded 2.0.0p247 (2013-06-27) [i386-mingw32] as my machine is windows 7 32 bit 
not sure if ruby 1.9  as opposed to 2.0 is the issue.

  1.  BeEF requires ruby 1.9 and the "bundler" gem. Bundler can be installed by:

      gem install bundler


If the component you're installing clearly states Ruby *1.9*, please use 1.9, not 2.0

As mentioned here, RubyInstaller download page and other place on the web: not every gem has been updated to work with Ruby 2.0, at least not in Windows.

Please, use the version recommended by the project you're about to use, not a different one.

      
   2. Prerequisites (Windows)
      
      Windows requires the sqlite.dll.  Simply grab the zip file below and extract it to your Ruby bin directory:




Not sure why you need that, not familiar with beef project at all, but if this is dependency from sqlite3, there is no need to download external dependencies as the gem itself is self-contained.
This is most likely caused by a mixture of version of Ruby and compiler.

As stated in RubyInstaller website:

WHICH DEVELOPMENT KIT?

Down this page, several and different versions of Development Kits (DevKit) are listed. Please download the right one for your version of Ruby:

  • Ruby 1.8.6 to 1.9.3: tdm-32-4.5.2
  • Ruby 2.0.0: mingw64-32-4.7.2
  • Ruby 2.0.0 x64 (64bits): mingw64-64-4.7.2
Use the right version for the right version of Ruby.


how to i dix above error to be able to proceed with bundle install


I suggest you use the recommended versions of Ruby instead of attempting to try something that the project itself hasn't been tested against.

-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

过纯中

unread,
Mar 1, 2014, 7:33:59 AM3/1/14
to rubyin...@googlegroups.com
for the error: c:/Ruby200/include/ruby-2.0.0/ruby/win32.h:788:16: error: '_PC_64' undeclared (f
irst use in this function)

you can add 
#ifndef _PC_64
#define _PC_64 0x00000000
#endif

#ifndef _MCW_PC
#define _MCW_PC 0x00030000
#endif
after #elif defined(__MINGW64_VERSION_MAJOR) in win32.h to resolved.

Luis Lavena

unread,
Mar 1, 2014, 4:17:11 PM3/1/14
to rubyin...@googlegroups.com
On Sat, Mar 1, 2014 at 9:33 AM, 过纯中 <eric....@gmail.com> wrote:
for the error: c:/Ruby200/include/ruby-2.0.0/ruby/win32.h:788:16: error: '_PC_64' undeclared (f
irst use in this function)

you can add 

#ifndef _PC_64
#define _PC_64 0x00000000
#endif

#ifndef _MCW_PC
#define _MCW_PC 0x00030000
#endif
after #elif defined(__MINGW64_VERSION_MAJOR) in win32.h to resolved.



Hello Eric, thanks for the link,

I would like to get that sorted out in Ruby itself, but that will take time.

In the meantime, I've opened an issue for discussion with msgpack author:

-- 
Reply all
Reply to author
Forward
0 new messages