Bundle install throwing error - ruby-on-rails

I am getting the following error when I try to run bundle install
Bundler::GemspecError: Could not read gem at /usr/local/rvm/gems/ruby-1.9.3-p484#rails3tutorial/cache/turbolinks-2.1.0.gem. It may be corrupted.
An error occurred while installing turbolinks (2.1.0), and Bundler cannot continue.
Make sure that `gem install turbolinks -v '2.1.0'` succeeds before bundling.
Even if in install the above said gem and rub bundle install it throws a similar error and asks me to make sure an another gem is installed and this goes on and on.
I am using Rails 4.0.2 and ruby 1.9.3p484.

Maybe the file cache got corrupted. Try:
bundle install --no-cache
If this does not work, delete the cache directory and try again:
rm -rf /usr/local/rvm/gems/ruby-1.9.3-p484#rails3tutorial/cache
bundle install

I just had this problem with the bcrypt gem
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Bundler::GemspecError: Could not read gem at /data/code/mdweb/vendor/bundle/ruby/2.1.0/cache/bcrypt-3.1.7.gem. It may be
corrupted.
An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
The /data/code/mdweb/vendor/bundle/ruby/2.1.0/cache/bcrypt-3.1.7.gem file was 0 bytes; removing this file or using the --no-cache option didn't help.
Using gem install bcrypt -v '3.1.7' did work, so I copied ~/.gem/ruby/2.1.0/cache/bcrypt-3.1.7.gem to /data/code/mdweb/vendor/bundle/ruby/2.1.0/cache/bcrypt-3.1.7.gem and that allowed me to continue. You could also fetch the .gem file from http://rubygems.org if you can't find it on your system.
I suspect there's some sort of connection issue with bundler (but not with gem for some reason); I suspect DNS since there's an unusual long wait before I get an error, but didn't investigate further.

Related

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?

Bundler cant read autoprefixer-rails-6.0.3.gem

Bundler is throwing an error could not read the gem & that it may be corrupted.
Bundler::GemspecError: Could not read gem at /home/pragadeesh/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/cache/autoprefixer-rails-6.0.3.gem. It may be corrupted.
An error occurred while installing autoprefixer-rails (6.0.3), and Bundler cannot continue.
Make sure that `gem install autoprefixer-rails -v '6.0.3'` succeeds before bundling.
i dont know how to resolve this problem ? please help me out.
Try this:
$ rm -f /home/pragadeesh/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/cache/autoprefixer-rails-6.0.3.gem
$ gem install autoprefixer-rails

ruby on rails gem file installation install bundle

I am new with ruby on rails. I have successfully installed ruby on rails 4.2 on Ubuntu 14.04 and created a new app, but when I started the server to see if it is working by writing:
rails server
I get this error message:
Could not find gem 'sass-rails (~> 5.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
And when I start to install bundle I get other packages that need to be installed before bundle.
Error message for bundle install
Gem::RemoteFetcher::FetchError: Errno::EHOSTUNREACH: No route to host - connect(2) for "rubygems.global.ssl.fastly.net" port 443 (https://rubygems.org/gems/minitest-5.5.1.gem)
An error occurred while installing minitest (5.5.1), and Bundler cannot
continue.
Make sure that `gem install minitest -v '5.5.1'` succeeds before bundling.
then after I installed minitest and run bundle install
I got this error message
Gem::RemoteFetcher::FetchError: Errno::EHOSTUNREACH: No route to host - connect(2) for "rubygems.global.ssl.fastly.net" port 443 (https://rubygems.org/gems/debug_inspector-0.0.2.gem)
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot
continue.
Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before
bundling.
It keeps showing me packages that I need to install before bundle.
I'm not on Ubuntu, but I find with Rails 4+ this step-wise gem install is the rule rather than the exception. It doesn't seem to handle dependency gem installs very well with bundle. For each of the "missing" dependency gems, run the single gem install, and then the bundle again to see what's next It may reveal another dependency with each step, just install that. (The caveat is if you're seeing the same gems show up as not being installed on every bundle exec, then that's another problem altogether. Once you single-install the gem it should be locked in and available)
$gem install bundle
$gem install name-of-flagged-gem
$gem install bundle
$gem install next-missing-gem
Hope this helps.
Your solution should be right here: SSL Error
I had the same exact problem. Each time I did a "bundle install" it told me to make sure "gem install .... succeeds before bundling" And when I did what it said, it just told me about another gem.

How to put metadata in sqlite3-1.3.4-x86-mingw32.gem

I perform bundle install but it cannot continue because of sqlite3 it always returns to:
Gem::Package::FormatError: no metadata found in C:/RailsInstaller/Ruby1.9.3/lib/
ruby/gems/1.9.1/cache/sqlite3-1.3.4-x86-mingw32.gem
An error occured while installing sqlite3 (1.3.4), and Bundler cannot continue.
Make sure that gem install sqlite3 -v '1.3.4' succeeds before bundling.
How will I resolve this issue?
simply run gem install sqlite3 -v '1.3.4' this should fix the issue. Its because the gem is not included it the list of dependencies so running the command will fix it up

aws-s3 gem install error- bittorrent.rb

Am running build install on an existing project and I get this error:
Installing aws-s3 (0.6.2)
Errno::EACCES: Permission-denied -
D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/aws-s3-0.6.2/lib/aws/s3/bittorrent.rb
An error occured while installing aws-s3 (0.6.2) and Bundler cannot
continue, make sure that gem install aws-s3 -v '0.6.2' succeeds before
bundling.
I get the same error if I just run "gem install aws-s3 -v '0.6.2'"
Doing this on Windows 7, and I am making sure to run the prompt as
administrator.
Any ideas how to get past this?
Try following:
In your Gemfile or wherever you have specified the gems list and replace source 'https' with this source 'http' otherwise it will keep on asking Make sure that gem install xxx -v 'xxx'' succeeds before bundling.
Do bundle install or rails new todo

Resources