hujihuji
hujihuji

Reputation: 81

I'm getting error when I run bundle install

I want use stripe gem for my app, I've added stripe to gem file but after that when I did a bundle install I'm getting an error "An error occurred while installing unf_ext (0.0.7.2), and Bundler cannot continue. Make sure that gem install unf_ext -v '0.0.7.2' succeeds before bundling." I tried to bundle install unf_ext but still did't work. How can I fix this problem? source 'https://rubygems.org'

#ruby version
ruby '2.0.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]

gem 'pg', group: :production
#gem 'pg', '0.18.4'

gem 'rails_12factor', group: :production

# use boodtrap for mibae
gem 'bootstrap-sass'

#Use stripe for ecommerce payments
gem 'stripe', '~> 1.36'

#gem 'unf_ext', '~> 0.0.7.2'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

Upvotes: 2

Views: 4992

Answers (3)

Shan
Shan

Reputation: 619

bundle install --without deployment

This worked for me.

Upvotes: 0

MatayoshiMariano
MatayoshiMariano

Reputation: 2116

I was having the same problem. Updating and upgrading the packaces of the SO fixed the issue for me.

sudo apt-get update & sudo apt-get upgrade

Upvotes: 1

Praveen George
Praveen George

Reputation: 9725

This error can happen due to various issues in your required dependencies on system you are using, so please make sure you meet them all by visiting the below official gem authors page:

Have a look at the developer's home page given below to check you meet all dependencies required:

unf_ext 0.0.7.2 : Unicode Normalization Form support library for CRuby

=> If the error was because of missing gmkdir, then run the following command:

brew install coreutils

=> If the error was due to missing C++ headers related then run the bellow command:

yum install gcc-c++

Upvotes: 3

Related Questions