Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

302
Views
No se pudo crear la extensión nativa de la gema al instalar la gema bcrypt-ruby

Cuando ejecuto: gem install bcrypt-ruby -v '3.0.1' obtengo los siguientes errores:

 Building native extensions. This could take a while... ERROR: Error installing bcrypt-ruby: ERROR: Failed to build gem native extension. current directory: /U/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bcrypt-ruby-3.0.1/ext/mri /U/.rbenv/versions/2.7.2/bin/ruby -I /U/.rbenv/versions/2.7.2/lib/ruby/2.7.0 -r ./siteconf20210824-80693-sdyma7.rb extconf.rb creating Makefile current directory: /U/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bcrypt-ruby-3.0.1/ext/mri make "DESTDIR=" clean current directory: /U/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bcrypt-ruby-3.0.1/ext/mri make "DESTDIR=" compiling bcrypt_ext.c bcrypt_ext.c:27:19: error: implicit declaration of function 'ruby_bcrypt' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return (VALUE)ruby_bcrypt(args->output, args->key, args->salt); ^ bcrypt_ext.c:27:19: note: did you mean 'ruby_script'? /U/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:2747:6: note: 'ruby_script' declared here void ruby_script(const char* name); ^ bcrypt_ext.c:42:25: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] NIL_P(input) ? 0 : RSTRING_LEN(input)); ^~~~~~~~~~~~~~~~~~ /U/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1007:6: note: expanded from macro 'RSTRING_LEN' RSTRING_EMBED_LEN(str) : \ ^~~~~~~~~~~~~~~~~~~~~~ /U/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1003:6: note: expanded from macro 'RSTRING_EMBED_LEN' (long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bcrypt_ext.c:42:25: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] NIL_P(input) ? 0 : RSTRING_LEN(input)); ^~~~~~~~~~~~~~~~~~ /U/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1008:28: note: expanded from macro 'RSTRING_LEN' RSTRING(str)->as.heap.len) ~~~~~~~~~~~~~~~~~~~~~~^~~ 2 warnings and 1 error generated. make: *** [bcrypt_ext.o] Error 1 make failed, exit code 2

Mi versión de Ruby es 2.7.2. ¿Alguna idea de qué intentar para instalarlo?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Tuve que agregar una bandera al instalar:

 gem install bcrypt-ruby -v '3.0.1' -- --with-cflags=-Wno-implicit-function-declaration

Esto instaló la gema con éxito con Ruby 2.7.2

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!