Error installing rails ERROR: Failed to build gem native extension
When I run sudo apt-get install ruby-dev zlib1g-dev liblzma-dev
I got these logs:
build-essential patch
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
patch is already the newest version (2.7.5-1).
zlib1g-dev is already the newest version (1:1.2.8.dfsg-2ubuntu4.1).
zlib1g-dev set to manually installed.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
ruby-dev : Depends: ruby2.3-dev but it is not going to be installed
slack-desktop : Depends: libappindicator1 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
So to solve this problem I run apt-get -f install
Then I run sudo apt-get install ruby-dev zlib1g-dev liblzma-dev
dependencies were successfully installed.
gem native extension successfully build.
When I run bundle install i'm getting error with bcrypt gem
I made changes in the gem file by replacing gem 'bcrypt' instead of gem 'bcrypt-ruby' and did bundle install and worked for me!!
Error while installing rails gem
So I finally figured out what was going on. It turns out that the configuration file for the DNS servers had an extra comma after the IP addresses which caused it to not resolve properly. I'm on ubuntu 14.04 and the file was in /etc/resolve.conf.
How to list gem dependencies for some non-intalled gem?
I know that this is a bit of a necro, but I think that you can use gem install --explain rails.
from http://guides.rubygems.org/command-reference/#gem-install
--explain - Rather than install the gems, indicate which would be installed
You may have to run that command from another system that CAN access the rubygems.org server, get the list of gems, pull them down, and install them on your system instead of hitting rubygems directly (till you get your network problem figured out)
Related Topics
Convert Time from One Time Zone to Another in Rails
How to Display Ruby on Rails Form Validation Error Messages One At a Time
How to Write Postgresql Functions on Ruby on Rails
How to Do Static Content in Rails
How to Group by Count in Array Without Using Loop
Understanding Ruby and Os I/O Buffering
Returning All Maximum or Minimum Values That Can Be Multiple
Can't Install Ruby on Rails with Rvm on Ubuntu 13.04
Is This the Best Way to Unescape Unicode Escape Sequences in Ruby
Installing Nokogiri on Osx 10.10 Yosemite
Ruby - Net/Http - Following Redirects
Set Global Default Encoding For Ruby 1.9
Haml: Append Class If Condition Is True in Haml
How to Implement a Short Url Like the Urls in Twitter
Convert Array of 2-Element Arrays into a Hash, Where Duplicate Keys Append Additional Values