Getting this error when installing gems in aptana - ruby-on-rails

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)

Related

Unable to install JSON ruby gem on Ubuntu

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

Error installing rails on Ubuntu 12.04 (Failed to build gem native extension)

I'm trying to install rails on ubuntu 12.04 but I'm having some issues
I tried
sudo gem install rails --pre
and got
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
extconf.rb:13:in `require': cannot load such file -- mkmf (LoadError)
from extconf.rb:13:in `<main>'
Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/atomic-1.1.10 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/atomic-1.1.10/ext/gem_make.out
This is because when you installed Ruby you did not install the build tools as well.
I wrote a blog post about installing Ruby + Rails on Ubuntu that has helped out a lot of people, and will probably help you too.

Trying to install Rails, Failed to Build Gem Native Extension

I'm trying to install Rails on Ubuntu 12.10 using the Ruby Version Manager. I believe that Ruby and RubyGems are installed correctly, and these are my versions:
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
gem -v: 1.8.23
I'm trying to install rails, using
sudo gem install rails -v 3.2.9
This fetches a lot of gems, but has a problem building the native extensions:
Building native extensions. This could take a while...
ERROR: Error installing rails:
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.5 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.7.5/ext/json/ext/generator/gem_make.out
Any idea what I'm doing wrong? If it helps, I'm trying to follow the tutorial at http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-install_rails.
Thank you!
Install the gem as a normal user, not sudo:
gem install rails
Or install the ruby dev package. There are a lot of similar answers in SO:
Failed to build gem native extension — Rails install
Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)
Do you have a C compiler installed? If not, you should run sudo apt-get install build-essential to set up a compiler toolchain

bcrypt-ruby gem Gem::Installer::ExtensionBuildError:

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/

Why do I get an error installing the JSON gem in Ubuntu?

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

Resources