I just installed RVM, Ruby, Rails etc. on my virtual ubuntu 12.04 32bit running in a virtualbox. Now I encounter the problem that for my first rails project bundle install
or bundle update
takes very long time. Even when I create a new project with rails (which includes bundle install
).
I use only the standard gems:
source 'https://rubygems.org' gem 'rails', '3.2.12' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' group :development do gem 'sqlite3', '1.3.5' end # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '3.2.5' gem 'coffee-rails', '3.2.2' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby gem 'uglifier', '1.2.3' end gem 'jquery-rails', '2.0.2'
I tried bundle install without any gems but gem 'rails', '3.2.12'
. After that I typed again bundle install
with all gems in my gemfile. It took me 10 minutes to check for dependencies. The output of --verbose is a mix of HTTP success
and HTTP redirection
.
Rails version: Rails 3.2.12
Ruby version: ruby 1.9.3p392 (2013-02-22 revision 39386)
Rvm: rvm 1.18.18
bundle version: Bundler version 1.3.2
I already searched fot a solution, but nothing helped.
The reason was that Bundler fetched all required gems unless they were already installed and then checked for all dependent gems if there is are newer versions available and installed these. It's the last step that took so long. The solution is to do a bundle lock in development and to add the resulting file Gemfile.
Description. Removes the given gems from the Gemfile while ensuring that the resulting Gemfile is still valid. If a gem cannot be removed, a warning is printed.
The correct way to update the version of a gem to a specific version is to specify the version you want in your Gemfile, then run bundle install . As for why your command line was failing, there is no -version option.
I want to warn: There is a security purpose for using https over http. Try at first the other answers mentioned in this thread.
Changing https
to http
in my Gemfile did the magic. Before I have to create the project with rails new APP --skip-bundle
Bundler just got an update of parallel processing of gems.
gem install bundler --pre
will solve the problem in the best possible way for now.
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With