Problems with installing Ruby Gems?
I had this problem, and it was due to Norton Firewall. Apparently, the firewall is never prompting for application blocking when sudo is called in this way. Consequently, the network access is blocked. Temporarily disabling the firewall fixed the error.
This also may explain why other solutions work, including other terminal apps-- they may have been previously granted network access.
Issue with Ruby gem install
RubyGems 2.4.1 will not build native extensions in Ruby version 1.9.3 and earlier on Windows.
You will need to downgrade RubyGems to 1.8.29.
To do this run the following command:
gem update --system 1.8.29
Check gem version:
gem -v
1.8.29
Now try your command again:
gem install --local json-1.8.1.gem
ref: https://groups.google.com/forum/#!topic/rubyinstaller/k19SeJijpKU/discussion
How to install a gem or update RubyGems if it fails with a permissions error
You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.
means exactly that, you don't have permission to write there.
That is the version of Ruby installed by Apple, for their own use. While it's OK to make minor modifications to that if you know what you're doing, because you are not sure about the permissions problem, I'd say it's not a good idea to continue along that track.
Instead, I'll strongly suggest you look into using either rbenv or RVM to manage a separate Ruby, installed into a sandbox in your home directory, that you can modify/fold/spindle/change without worrying about messing up the system Ruby.
Between the two, I use rbenv, though I used RVM a lot in the past. rbenv takes a more "hands-off" approach to managing your Ruby installation. RVM has a lot of features and is very powerful, but, as a result is more intrusive. In either case, READ the installation documentation for them a couple times before starting to install whichever you pick.
Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)
There are similar questions:
- `require': no such file to load -- mkmf (LoadError)
- Failed to build gem native extension (mkmf (LoadError)) - Ubuntu 12.04
Usually, the solution is:
sudo apt-get install ruby-dev
Or, if that doesn't work, depending on your ruby version, run something like:
sudo apt-get install ruby1.9.1-dev
Should fix your problem.
Still not working? Try the following after installing ruby-dev:
sudo apt-get install make
Gemfile issues and Ruby install issues
from there if I went to run any other commands such as bundle install I would get an error Could not locate
Gemfile
.
As you've guessed, you need a file named gemfile
in the same location you are running bundle install
from
If I try running
gem install rails
I have had it work once or twice but I still have the no gemfile issue after the fact.
Running gem install <package>
doesn't create a gemfile for you. You need to do this yourself. It's essentially a file where you manually specify which packages you would like your project to use. See here on how to create.
The times the command doesn't work I often get: "ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect retur ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ( https://api.rubygems.org/latest_specs.4.8.gz)."
This sometimes happens on Windows machine. You can do a quick search on how to fix the gem command with SSL, or in your Gemfile
you can temporarily specify http://rubygems.org/
instead of https://rubygems.org/
SSL Error When installing rubygems, unable to install rails gem in windows 10
now I got solution for this issue, using this link http://guides.rubygems.org/ssl-certificate-update/#manual-solution-to-ssl-issue
we need to add GlobalSignRootCA.pem this certificate in ssl_certs folder insted of AddTrustExternalCARoot-2048.pem
go through that above link.
Related Topics
Best Way to Use Twitter Bootstrap Icons as Links in Ruby on Rails 3
Twitter Bootstrap Displays Button with Greyed Text
R Statistical Package Gem for a Rails Application
Rails/Ruby Error When Creating Database: Unable to Load the Eventmachine C Extension
Can One Yaml Object Refer to Another
How to Get the Current Test Filename from Rspec
Encryption-Decryption in Rails
Homebrew Install Ruby Keg-Only Can't Find Gem
Capistrano 3 Change Ssh_Options Inside Task
Symbol#To_Proc with Custom Methods
How to Decode Q-Encoded Strings in Ruby
How to Mark a Cucumber Scenario as Pending
How to Convert Boolean Values to Integers
Error Installing SQLite3 Gem via Bundler
Ruby on Linux Pty Goes Away Without Eof, Raises Errno::Eio
"Msvcrt-Ruby18.Dll Was Not Found" with Ruby