Skip to content

Instantly share code, notes, and snippets.

@sammdec
Created March 20, 2013 09:04
Show Gist options
  • Save sammdec/5203296 to your computer and use it in GitHub Desktop.
Save sammdec/5203296 to your computer and use it in GitHub Desktop.
Bundler issue with installing bcrypt-ruby
Bundler 1.3.1
Ruby 1.9.3 (2013-02-22 patchlevel 392) [x86_64-darwin12.2.1]
Rubygems 2.0.2
GEM_HOME
Bundler settings
path
Set for your local app (/Users/sam/Sites/sample/.bundle/config): "./vendor/bundle"
disable_shared_gems
Set for your local app (/Users/sam/Sites/sample/.bundle/config): "1"
Gemfile
source "https://rubygems.org"
gem "sinatra"
gem "data_mapper"
gem "dm-postgres-adapter"
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
rack (1.5.2)
rack-protection (1.5.0)
rack
sinatra (1.4.1)
rack (~> 1.5, >= 1.5.2)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
tilt (1.3.6)
PLATFORMS
ruby
DEPENDENCIES
sinatra
  1. I am trying to accomplish installing data-mapper gem with the dm-postgres-adapter gem using bundler foir a sinatra app
  2. I created a Gemfile (see Gemfile) and then in terminal ran bundle install
  3. I expected all the gems to be downloaded and installed includign all dependency gems
  4. What actually happened was when I ran bundle install was that when it got to installing bcrypt-ruby gem terminal ran into a build error (See Terminal error.md).
source "https://rubygems.org"
gem "sinatra"
gem "data_mapper"
gem "dm-postgres-adapter"
Installing bcrypt-ruby (3.0.1) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/Users/sam/.rbenv/versions/1.9.3-p392/bin/ruby extconf.rb 
/Users/sam/.rbenv/versions/1.9.3-p392/bin/ruby: invalid option -R  (-h will show valid options) (RuntimeError)


Gem files will remain installed in /Users/sam/Sites/sample/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1 for inspection.
Results logged to /Users/sam/Sites/sample/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out

An error occurred while installing bcrypt-ruby (3.0.1), and Bundler cannot continue.
Make sure that `gem install bcrypt-ruby -v '3.0.1'` succeeds before bundling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment