When calling
rails new project
The process progresses until I hit bundle install. At that point:
identical vendor/plugins/.gitkeep
run bundle install
Fetching gem metadata from https://rubygems.org/.........
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=unknown state: sslv3 alert handshake failure (https://d2chzxaqi4y7f8.cloudfront.net/gems/rake-0.9.2.2.gem)
An error occured while installing rake (0.9.2.2), and Bundler cannot continue.
Make sure that `gem install rake -v '0.9.2.2'` succeeds before bundling.
I can install the gem manually with gem install and launch rails new again, and the error repeats for the next gem. I end up installing manually every single gem.
I use rvm 1.13.0 single user.
Do you have OpenSSL installed? You don't mention your OS, but on Ubunutu (or other Debian-based distros) you do:
sudo apt-get install openssl
Failing that, try http://railsapps.github.com/openssl-certificate-verify-failed.html
Try this.
rvm pkg install openssl
rvm reinstall 1.9.2 --with-openssl-dir=$rvm_path/usr
Related
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?
Tried to bundle install in my first ruby project, doing a tutorial so i'm pretty new to all of this coding stuff. I was following part of the tutorial and everything was going fine until I encountered this:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed https://rubygems.org/gems/rake-10.4.2
An error occured while installing rake <10.4.2>, and Bundler cannot continue.
Make sure that 'gem install rake -v '10.4.2' succeeds before bundling.
Please explain in layman terms
Make sure that 'gem install rake -v '10.4.2' succeeds before bundling.
Type gem install rake -v '10.4.2 in to your command line and it'll install the rake gem.
Gems are simply other Ruby programs you can add to use within your program. See here: https://rubygems.org/ and here: https://en.wikipedia.org/wiki/RubyGems
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.
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.
Since OSX 10.9, I'm not able any more to push my rails app zu heroku.
Heroku gives the following error:
Failed to install gems via Bundler.
Push rejected, failed to compile Ruby app
When I "bundle install", then I get the error:
Installing pg (0.17.0)
Errno::EACCES: Permission denied - /Users/USERNAME/.rvm/gems/ruby-1.9.3-p385/gems/pg-0.17.0/.gemtest
An error occurred while installing pg (0.17.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.0'` succeeds before bundling.
And gem install pg -v '0.17.0':
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/USERNAME/.rvm/gems/ruby-1.9.3-p385/gems/pg-0.17.0/.gemtest
I tried to install pg via brew, but this doesn't work, too.
Can anyone help me?
did you try to update your gems?
sudo gem update --system --no-user-install