Good day.
I'm trying to set up project that's beings worked on by other people.
when i run bundle install it crashes with an error
Installing bcrypt-ruby (3.0.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:36:in `<main>'
Gem files will remain installed in /home/halfros/.bundler/tmp/9279/gems/bcrypt-ruby-3.0.1 for inspection.
Results logged to /home/halfros/.bundler/tmp/9279/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.
sudo gem install bcrypt-ruby -v '3.0.1'
$ sudo gem install bcrypt-ruby -v '3.0.1'
Building native extensions. This could take a while...
ERROR: Error installing bcrypt-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:36:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/bcrypt-ruby-3.0.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out
Tried ths - no changes.
http://rorguide.blogspot.com/2011/02/bundle-install-on-linux-giving-error.html
It looks like the ruby development library isn't installed.
It also looks like you're using global ruby/gems installation, so your easiest fix is to install the ruby1.9-dev package (or something similar), and try again.
Alternatively, you could use rvm and this problem will fix itself: https://rvm.io/
Related
I require the json ruby gem to test some JSON files in Rspec. I use bundler to manage my gems, with my Gemfile looking as such:
source 'https://rubygems.org'
gem 'rake'
gem 'rspec'
gem 'json', '1.8.2'
However when I run bundle install everything passes but the json gem. Of which I get the following error message:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in 'require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in 'require'
from extconf.rb:1:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.8.2/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.2), and Bundler cannot continue.
Make sure that 'gem install json -v '1.8.2'` succeeds before bundling.
I've already looked around and seen this suggestion:
sudo apt-get install libgmp3-dev
I've done this but the error is still present. The gem version I'm trying to install is 1.8.2, my ruby version is ruby 1.9.3p484 as this is the last stable release for Ubuntu 14.04 as far as I'm aware
If anyone could help resolve this I'd be very grateful
Getting this error when update/install gem Aptana radrails
ruby~$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [i686-linux]
rails -v
Rails 5.0.0
Welcome to the Rails Shell. This view is meant for advanced users and
command line lovers as a text-based way to run rails commands such as:
rails, script/generate, script/plugin, gem, rake, etc. This shell can
replace the functionality of the Rake Tasks, Rails Plugins, and
generators views.
gem install -l mongrel-1.1.5.gem ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: mongrel requires daemons (>= 1.0.3)
gem install -l sqlite3-ruby-1.2.1.gem Building native extensions. This could take a while... ERROR: Error installing
sqlite3-ruby-1.2.1.gem: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot
load such file -- mkmf (LoadError) from
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from
extconf.rb:1:in'
Gem files will remain installed in
/var/lib/gems/1.9.1/gems/sqlite3-ruby-1.2.1 for inspection. Results
logged to
/var/lib/gems/1.9.1/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/gem_make.out
gem install -l linecache-0.43.gem Building native extensions. This could take a while... ERROR: Error installing linecache-0.43.gem:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot
load such file -- mkmf (LoadError) from
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from
extconf.rb:1:in'
Gem files will remain installed in
/var/lib/gems/1.9.1/gems/linecache-0.43 for inspection. Results logged
to /var/lib/gems/1.9.1/gems/linecache-0.43/ext/gem_make.out
gem install -l ruby-debug-base-0.10.3.gem ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: ruby-debug-base requires linecache (>= 0.3)
gem install -l ruby-debug-ide-0.4.5.gem ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: ruby-debug-ide requires ruby-debug-base (~> 0.10.3.0)
Tried to install pg gem I got the next error:
alex#ubuntu:~/RubymineProjects/Tiger Skills$ gem install pg
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.9.1 directory.
alex#ubuntu:~/RubymineProjects/Tiger Skills$ sudo gem install pg
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:2:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/pg-0.15.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/pg-0.15.1/ext/gem_make.out
gem_make.out file:
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:2:in `<main>'
Already tryed to solve using
$ sudo apt-get install postgresql-client libpq5 libpq-dev
then:
$ sudo gem install pg
That is because you have not set the write permission to the directory,try:
chmod +777 /var/lib/gems/1.9.1
You need to install the -dev part of the Ruby package. Something like:
sudo apt-get install ruby1.9-dev
should give you the parts of Ruby necessary to compile binary extensions.
Good luck!
This help me:
sudo apt-get install rails
I got almost the same problem.
I use this to solve it.
$rvmsudo gem install pg
When I run sudo gem install nokogiri on Ubuntu 12.1, I'm returned with this. What's wrong and how do I fix it?
jason#jason:~/ror/clss$ sudo gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file
-- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:5:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/nokogiri-1.5.5 for
inspection. Results logged to /var/lib/gems/1.9.1/gems/nokogiri-1.5.5/ext/nokogiri
/gem_make.out
Try to install the "libxslt-dev" and "libxml2-dev" packages:
sudo apt-get install libxslt-dev libxml2-dev
The instructions are on http://nokogiri.org/tutorials/installing_nokogiri.html
Update:
You need sudo aptitude install ruby1.9.1-dev.
Source: "Rails Tutorial: nokogiri-1.5.2 error on bundle install".
Using Ubuntu, when I run "bundle install" to set up my Rails environment, it throws an error during the JSON gem installation:
Installing json (1.7.3) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
Gem files will remain installed in /home/danny/.bundler/tmp/2040/gems/json-1.7.3 for inspection.
Results logged to /home/danny/.bundler/tmp/2040/gems/json-1.7.3/ext/json/ext/parser/gem_make.out
An error occured while installing json (1.7.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.3'` succeeds before bundling.
When I try installing only the JSON 1.7.3 gem it also gives me an error:
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.7.3 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.7.3/ext/json/ext/parser/gem_make.out
I've installed RVM and am running Ruby 1.9.3; Why can't it install the JSON gem?
Installing the ruby1.9.1-dev package should fix this for you:
sudo apt-get install ruby1.9.1-dev