Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6577059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:35:19+00:00 2026-05-25T15:35:19+00:00

I just installed OS X Lion with Xcode 4.1. I’m using Ruby 1.9.2 and

  • 0

I just installed OS X Lion with Xcode 4.1. I’m using Ruby 1.9.2 and gems version 1.5.0. When trying to upgrade from Rails 3.0.9 to 3.1, I get the following error:

$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i386-darwin9.8.0]
$  rails -v
Rails 3.0.9
$  gem -v
1.5.0
$  gem update rails
Updating installed gems
Updating rails
Building native extensions.  This could take a while...
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

        /Users/me/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
creating Makefile

make
gcc -I. -I/Users/me/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/i386-darwin9.8.0 -I/Users/me/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/ruby/backward -I/Users/me/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long  -fno-common -pipe  -o bcrypt_ext.o -c bcrypt_ext.c
In file included from /Users/me/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/ruby.h:32,
                 from bcrypt_ext.c:1:
/Users/me/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/ruby/ruby.h:108: error: size of array ‘ruby_check_sizeof_long’ is negative
/Users/me/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/ruby/ruby.h:112: error: size of array ‘ruby_check_sizeof_voidp’ is negative
In file included from /Users/me/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/ruby/intern.h:29,
                 from /Users/me/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/ruby/ruby.h:1327,
                 from /Users/me/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/ruby.h:32,
                 from bcrypt_ext.c:1:
/Users/me/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/ruby/st.h:69: error: size of array ‘st_check_for_sizeof_st_index_t’ is negative
bcrypt_ext.c: In function ‘bc_salt’:
bcrypt_ext.c:42: warning: implicit conversion shortens 64-bit value into a 32-bit value
make: *** [bcrypt_ext.o] Error 1


Gem files will remain installed in /Users/me/.rvm/gems/ruby-1.9.2-p0/gems/bcrypt-ruby-3.0.1 for inspection.
Results logged to /Users/me/.rvm/gems/ruby-1.9.2-p0/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out
Nothing to update

Does anyone know what’s going on here?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:35:20+00:00Added an answer on May 25, 2026 at 3:35 pm

    Instead of doing “update”, just do “gem install rails -v 3.1”

    UPDATE:
    Apparently rails 3.1.0 (activemodel actually) depends on bcrypt-ruby. This dependency should be removed in 3.1.1 (see https://github.com/rails/rails/issues/2687).

    If you don’t want to wait, you’ll need to resolve the building of bcrypt-ruby. The compiler error suggests there’s a 32-bit/64-bit mismatch between ruby and the compiler. Did you install Lion over Leopard? If so you might have to rebuild all your rvm rubies and native-extension gems.

    Even if you want to wait, you probably should rebuild anyway, because you’ll likely run into this type of compiler issue again. As a test, try installing a native gem like: “gem install eventmachine”. If you get the same errors, that’s a good indicator that every native gem will have this issue.

    See this page for someone who had similar problems upgrading to Snow Leopard, with explanation of the problem:
    http://jtigger-learning.wikidot.com/gem-install-fails-on-building-native-extensions

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just installed ruby on rails on my new computer ( I was using
I just installed Lion, and downloaded Xcode 4.1 from the Mac App Store. I
Just installed snow leopard and Xcode, i downloaded version 5.1.38 from the mysql website
I just installed a fresh new version of Ubuntu 10.04 and wanted to get
I just installed MacOS X Lion and XCode (which now needs to be downloaded
I am novice rails/terminal user and just did a fresh Lion install + Xcode
Just upgraded to Lion from SL, and downloaded xCode from app store. I go
SOLVED. See at bottom. Just upgraded to OSX Lion and trying to get my
I just upgraded to the GM version of Lion. I've been using the previews
Just installed rails 3.1 rc1 and am trying to grok the best way to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.