I am going to install some gems in my rails application using bundle install on Debian testing(stretch). I get this error:
Installing bcrypt 3.1.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20151208-29851-hg3bi3bcrypt-3.1.10/gems/bcrypt-3.1.10 for inspection.
Results logged to /tmp/bundler20151208-29851-hg3bi3bcrypt-3.1.10/extensions/x86_64-linux/2.1.0/bcrypt-3.1.10/gem_make.out
An error occurred while installing bcrypt (3.1.10), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.10'` succeeds before bundling.
but I have installed bcrypt and bcrypt-ruby using gem install .
For gems with C extensions to compile, you'll need to install the ruby-dev package:
$ sudo apt-get install ruby-dev
Related
I download redmine in github
And open the application
After give bundle install
An error occurred while installing rmagick (2.16.0), and Bundler
cannot continue. Make sure that gem install rmagick -v '2.16.0'
succeeds before bundling.
To see why this extension failed to compile, please check the mkmf.log
which can be found here:
/home/supranimbus12/.rvm/gems/ruby-2.3.0#global/extensions/x86_64-linux/2.3.0/rmagick-2.16.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/home/supranimbus12/.rvm/gems/ruby-2.3.0#global/gems/rmagick-2.16.0
for inspection. Results logged to
/home/supranimbus12/.rvm/gems/ruby-2.3.0#global/extensions/x86_64-linux/2.3.0/rmagick-2.16.0/gem_make.out
An error occurred while installing rmagick (2.16.0), and Bundler
cannot continue. Make sure that gem install rmagick -v '2.16.0'
succeeds before bundling.
In Gemfile: rmagick
Please make sure you install Imagemagick first. If you are using ubuntu, then you can use apt-get to install Imagemagick. Also maybe you need to install libmagickwand-dev.
I've tried installing using as part of the bundle and using sudo, but I get the same error message every time. I'm currently on Ruby 2.0.0 and Rails 4.1.8. I'm not sure what is going on. The exact error message below:
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 10.4.2 Using i18n 0.6.11
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r
./siteconf20141218-80226-brqexc.rb extconf.rb mkmf.rb can't find
header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in
/Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection. Results
logged to
/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/json-1.8.1/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot
continue. Make sure that gem install json -v '1.8.1' succeeds before
bundling.
Any advice appreciated.
I've run into similar error on Ubuntu and all I needed to do was:
sudo apt-get install ruby-dev
For Mac, the following gist seems worth to have a look into: Setup mac for ruby dev
I don't know how to install mysql2.
I'm using:
Ruby On Rails 3.2.14
Ruby 2.0.0
Mac OS X 10.9 ("Mavericks")
Installing mysql2 (0.3.13)
An error occurred while installing mysql2 (0.3.13), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.13'` succeeds before bundling.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Gem files will remain installed in /Users/kimingi/.bundler/tmp/1983/gems/mysql2-0.3.13 for inspection.
Results logged to /Users/kimingi/.bundler/tmp/1983/gems/mysql2-0.3.13/ext/mysql2/gem_make.out
An error occurred while installing mysql2 (0.3.13), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.13'` succeeds before bundling.
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
You need to install mysql locally. Since you're on OS X you can use Homebrew.
# to Install homebrew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
# to install mysql through homebrew
brew install mysql
I ran to the same problem. To fix this problem, open a command prompt. go to your application folder. And type: gem install mysql2 -v 0.3.11 this version is working great.
I'm using Rails 3.2 and ruby 1.9.2. I've added gem 'fcgi' (fastcgi) to my Gemfile, but when I run bundle install it fails on the fcgi.
output:
Installing fcgi (0.9.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no
make
make: *** No targets. Stop.
Gem files will remain installed in /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi- 0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
An error occured while installing fcgi (0.9.1), and Bundler cannot continue.
Make sure that `gem install fcgi -v '0.9.1'` succeeds before bundling.
Installing fcgi (0.9.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no
make
make: *** No targets. Stop.
Gem files will remain installed in /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
An error occured while installing fcgi (0.9.1), and Bundler cannot continue.
Make sure that `gem install fcgi -v '0.9.1'` succeeds before bundling.
Then, I ran the gem install as suggested:
johns-MacBook-Pro:drywall johndcowan$ sudo gem install fcgi -v '0.9.1'
Fetching: fcgi-0.9.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing fcgi:
ERROR: Failed to build gem native extension.
/Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no
make
make: *** No targets. Stop.
Gem files will remain installed in /Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/gems/1.9.1/gems/fcgi-0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/gems/1.9.1/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
johns-MacBook-Pro:drywall johndcowan$
I found a user with the same problem and he/she installed fcgi_devel using yum which solved his/her problem with fcgi. I tried instaling using port but it won't work. The same site said I do not need yum.
sudo port install fcgi-devel
Error: Port fcgi-devel not found
Any ideas?
If using Homebrew, try brew install fastcgi first.
When iam trying to install Ruby Rails on my centos server .When i enter Bundle install i got the error
An error occurred while installing pg (0.14.1), and Bundler cannot continue.
Make sure that gem install pg -v '0.14.1' succeeds before bundling.
When i try `gem install pg -v '0.14.1 got the below error
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/pg-0.14.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/pg-0.14.1/ext/gem_make.out
Anybody know why i get this error? Help is highly appreciated.
This should help you --
$ sudo yum install postgresql-devel
Setting up Install Process
...
Complete!
$ sudo gem install pg
Building native extensions. This could take a while...
Successfully installed pg-0.14.1
1 gem installed
Installing ri documentation for pg-0.14.1...
Installing RDoc documentation for pg-0.14.1...