I\'m running Crunchbang 11 (Debian-based).
I\'m trying to install Ruby on Rails, like this:
gem install rails --version 4.0.0
I ge
Got the same issue when installing rails with the command "gem install rails -v 5.1.2" on windows7, solved after installing "MSYS2 and MINGW development toolchain" (command ridk install then option 3)..It took a while to finish the installation and then i installed rails without any problem
Try
sudo gem install rails --version 2.0
to install libraries.
On Fedora 30, I ran into this problem "Failed to build gem native extension". The log error was "gcc: fatal error: cannot read spec file ‘/usr/lib/rpm/redhat/redhat-hardened-cc1’: No such file or directory". The solution was found here.
If you installed all the above, but the extensions would still not compile, you are probably running a Fedora image that misses redhat-rpm-config package. In that case gcc compiler would complain about one of the following:
gcc: error: conftest.c: No such file or directory
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
To solve this, simply run sudo dnf install redhat-rpm-config.
i'm running elementary os 5 and what i do is.
sudo gem update --system
and then try again.
sudo gem install rails