Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bundle install request to do each gem install manually - how to avoid?

This is probably very simple question.
Each time I do "Bundle install" in the folder of the project I get an error like this

 An error occured while installing json (1.6.6), and Bundler cannot continue.
 Make sure that X succeeds before bundling.

where X can be
'gem install json -v '1.6.6'
or
'gem install execjs -v '1.3.2'
or 'gem install coffee-script -v '2.2.0'

Now, after I gradualy do each gem install manually the bundle install succeeds.
Is there a way to do them all in one command?
is there a way to do it in ruby mine?

like image 623
Bick Avatar asked May 13 '12 15:05

Bick


People also ask

How do I install bundles to install missing gems?

Select Tools | Bundler | Install from the main menu. Open the Gemfile, place the caret at any highlighted gem missing in the project SDK and press Alt+Enter . Select Install missing gems using 'bundler' and press Enter .

What is bundle install without production?

Now, If I use following command: bundle install --without production. In above command, the --without production option prevents the local installation of any production gem means whatever gems are in the production group will not be installed -- which in our example is just one gem: pg .

What is the difference between bundle install and bundle update?

bundle update and bundle install can both install the gems you specified in Gemfile but missing in gems. But bundle update does one thing more to upgrade: If the gems specified in Gemfile don't have version, it will upgrade to whatever latest.

What is the goal of running bundle install?

Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. Bundler is an exit from dependency hell, and ensures that the gems you need are present in development, staging, and production. Starting work on a project is as simple as bundle install .


2 Answers

That's what Bundler is supposed to do for you.

It looks like you have a problem with your Bundler or Ruby Install somewhere.

Without more information I can only suggest that you checkout the Bundler Troubleshooting page.

like image 111
Azolo Avatar answered Oct 18 '22 18:10

Azolo


I've run into the same problem before if my network connection was an unstable/low bandwidth wireless connection. It tries to install all the gems at once, but stalls on one of them because of the lack of bandwidth. Then you can of course install one at a time maybe, but if your connection keeps going in and out this may be the cause of your inability to install them all at once.

like image 27
Mr. Chameleon Avatar answered Oct 18 '22 18:10

Mr. Chameleon