Gem install error in rails - ruby-on-rails

I get this message:
An error occurred while installing rake <10.4.2>, and bundler
cannot continue. Make sure that 'gem install rake -v '10.4.2'
succeeds before installing.
How should I proceed to fix this error?

run the follwing in terminal
gem install rake -v '10.4.2'
if it shows error
rm Gemfile.lock
bundle update
bundle install
cheers :)-

Related

Ruby on Rails - bundle install is not working

When I try to do bundle install it gives the error below.
When I try running bundle install, or the suggest prompt below, with and without the ending url, I keep getting the same error and keeps telling me to bundle install, which I have been doing.
ERROR
An error occurred while installing pg (1.1.4), and Bundler cannot
continue.
Make sure that gem install pg -v '1.1.4' --source 'https://rubygems.org/'
succeeds before bundling.
If you're using Ubuntu, try to run
sudo apt-get install libpq-dev
If you're using MAC
brew install postgresql
Then, try to run gem install pg again

Can't install puma gem on kali

When I try to run this code:
bundle install
I got this error:
An error occurred while installing puma (3.6.0), and Bundler cannot continue.
Make sure that `gem install puma -v '3.6.0'` succeeds before bundling.
and when I ran gem install puma -v '3.6.0' I got the error.
Here is mkmf.log file.
Try run following on your system.
sudo apt-get install libssl1.0-dev
For more info look here

Failure to bundle install on Rails

I run into this error while trying to run bundle install.
An error occurred while installing nokogiri (1.6.8.1), and Bundler
cannot continue.
Make sure that gem install nokogiri -v '1.6.8.1' succeeds before bundling.
Could someone help me plse? thanks
It seems to me that this issues is similar to the one discussed in the following link:
Running "bundle install" fails and asks me to run "bundle install"

Why does 'bundle install' fail and force me to 'gem install' myself?

I have executed the command
bundle install
In my Ruby on Rails projects, and I get the following error message
An error occurred while installing bcrypt (3.1.10), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.10'` succeeds before bundling.
After executing
gem install bcrypt -v '3.1.10'
the problem disappears. My question is why it's necessary sometimes to install some gems in a direct way?

RoR -- NoMethodError: private method `open' called for Gem::Package:Class

Hey does anyone know what this error message means? I installed ruby from source then proceeded to install rubygems, and then installed rails via gem install rails
After creating a new project, I did a bundle install and got this error:
mark#mark-laptop:~/guide/first_app$ sudo bundle install Fetching
source index for https://rubygems.org/
NoMethodError: private method open' called for Gem::Package:Class An
error occured while installing rake (0.9.2.2), and Bundler cannot
continue. Make sure thatgem install rake -v '0.9.2.2'` succeeds
before bundling.
I did that command (gem install rake -v '0.9.2.2') and it worked fine.. I'm rather confused
Try gem install bundler to install/update bundler after installing/updating rubygems.
It worked for me when I had your problem.
This appears to be a bug in the master branch of rubygems from GitHub. If you grab an archive of 1.8.24 from http://rubygems.org/pages/download instead, everything works fine.
I have rubygems 2.0.3 and I get the same error. I deleted gemfile.lock file in the project. Only change I got in error is
From
Make sure that gem install rake -v '0.9.2.2' succeeds before bundling.
Changed to
Make sure that gem install rake -v '10.0.3' succeeds before bundling.
The new gem install rake also worked for me.
It's possible that you are using different ruby versions and gems when running commands with and without sudo. You can try running
sudo ruby -v
and
ruby -v
In addition you can check for different gem paths
gem env
and
sudo gem env
gem update --system
gem install bundler

Resources