This forum is no longer active. Please post your questions to our new community site

Rubystack - bcrypt-ruby error

Subscribe to Rubystack - bcrypt-ruby error 10 post(s), 2 voice(s)

 
Avatar amdevx 11 post(s)

Hello,

I am using RubyStack 2.1-1 dev (Ruby 1.9.2, Rails 3) running on Mac OS X 10.6. Whenever I run ‘bundle install’ in the ruby console it stops on bcrypt-ruby and gives the following error:


Installing bcrypt-ruby (2.1.3) with native extensions /Applications/rubystack-2.1-1/ruby/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions’: ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/Applications/rubystack-2.1-1/ruby/bin/ruby extconf.rb
creating Makefile

make
sh: make: command not found

Gem files will remain installed in /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bcrypt-ruby-2.1.3 for inspection.

How can I fix this?

 
Avatar amdevx 11 post(s)

I also have Xcode installed and have updated it to the newest version

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

It is strange, the error says that you do not have “make” but Xcode includes it. Could you check that you can run the “make” command?

 
Avatar amdevx 11 post(s)

If I run the ‘make’ command, I get: * No targets specified and no makefile found. Stop.

If I type in ‘which make’, I get : /usr/bin/make

I removed xcode and reinstalled it again but I still get an error on bcrypt-ruby when running bundle install:


Installing bcrypt-ruby (2.1.3) with native extensions /Applications/rubystack-2.1-1/ruby/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions’: ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/Applications/rubystack-2.1-1/ruby/bin/ruby extconf.rb
creating Makefile

make
gcc -Wall -I. -I/Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/i386-darwin8.5.3 -I/Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/ruby/backward -I/Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1 -I. -DAI_ADDRCONFIG=0 -I/Applications/rubystack-2.1-1/common/include -I/Applications/rubystack-2.1-1/common/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -I/Applications/rubystack-2.1-1/common/include -pipe -o bcrypt.o -c bcrypt.c
gcc -Wall -I. -I/Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/i386-darwin8.5.3 -I/Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/ruby/backward -I/Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1 -I. -DAI_ADDRCONFIG=0 -I/Applications/rubystack-2.1-1/common/include -I/Applications/rubystack-2.1-1/common/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -I/Applications/rubystack-2.1-1/common/include -pipe -o bcrypt_ext.o -c bcrypt_ext.c
In file included from /Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/ruby.h:32,
from bcrypt_ext.c:1:
/Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/ruby/ruby.h:108: error: size of array ‘ruby_check_sizeof_long’ is negative
/Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/ruby/ruby.h:112: error: size of array ‘ruby_check_sizeof_voidp’ is negative
In file included from /Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/ruby/intern.h:29,
from /Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/ruby/ruby.h:1327,
from /Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/ruby.h:32,
from bcrypt_ext.c:1:
/Applications/rubystack-2.1-1/ruby/include/ruby-1.9.1/ruby/st.h:69: error: size of array ‘st_check_for_sizeof_st_index_t’ is negative
make: * [bcrypt_ext.o] Error 1

Gem files will remain installed in /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bcrypt-ruby-2.1.3 for inspection.
Results logged to /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bcrypt-ruby-2.1.3/ext/mri/gem_make.out
from /Applications/rubystack-2.1-1/ruby/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/source.rb:100:in `install’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/installer.rb:55:in `block in run’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `block in each’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `each’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `each’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/installer.rb:44:in `run’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/installer.rb:8:in `install’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/cli.rb:217:in `install’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/vendor/thor/task.rb:22:in `run’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/vendor/thor.rb:246:in `dispatch’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/lib/bundler/vendor/thor/base.rb:389:in `start’
from /Applications/rubystack-2.1-1/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.0/bin/bundle:13:in `<top (required)>’
from /Applications/rubystack-2.1-1/ruby/bin/bundle:19:in `load’
from /Applications/rubystack-2.1-1/ruby/bin/bundle:19:in `’

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

It seems an issue in bcrypt-ruby gem on OS X https://github.com/codahale/bcrypt-ruby/issues/2

 
Avatar amdevx 11 post(s)

Hello,

Oh I see. Looks like others are having the same problem but it seems that there isn’t a solution yet :(

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

I did not get any error with new RubyStack 2.2 wich include ruby 1.8.7. You can try with this version.

 
Avatar amdevx 11 post(s)

Ok, I will try it :)

By the way, I noticed that the ruby folders say 1.9.1 in (/Applications/rubystack-2.1-1/ruby/include & /Applications/rubystack-2.1-1/ruby/lib/ruby) but the ruby version in the terminal shows 1.9.2p136. Does that matter? Just wondering if it that has anything to do with that error as well.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

This should not be the problem, some gems create these folders. In any case we will check it for the next release.