An error occurred while installing rake (10.1.0) and the Bundler cannot continue

Today I reinstalled my Mac, and I had to reinstall the rails, etc. Now I set everything up correctly (at least I was hoping), but I always encounter a very unpleasant error.

$ bundle install Fetching gem metadata from https://rubygems.org/.......... Fetching gem metadata from https://rubygems.org/.. Resolving dependencies... ArgumentError: invalid byte sequence in UTF-8 An error occurred while installing rake (10.1.0), and Bundler cannot continue. Make sure that `gem install rake -v '10.1.0'` succeeds before bundling. 

Now I thought that reinstalling the "rake" would solve the problem, but this did not happen. I followed this post, but it did not solve my problem either because there are no .d files in "/ etc / paths."

 $ ls -a /etc/paths.d . .. 

So, I tried to modify the .bashrc file, as suggested in another blog post. But that didn't work either.

 # .bashrc file PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting # Make sure the UTF-8 locale is set correctly export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" 

I also tried to remove and reinstall the rails, but this did not solve the problem. So you guys have suggestions where to look?


Update

I was able to "solve" this problem by removing RVM and Rails and using RBenv instead. I know this is not a solution to the problem, but now it works.

+6
source share
6 answers

You must update Rubygems first:

 gem update --system 

And then update the Bundler:

 gem install bundler 

source: NoMethodError: private `open 'method called for Gem :: Package: Class Error installing rake (10.0.3), and Bundler cannot continue

+19
source

I had a similar problem on a windows machine. The problem is that the certificate needs to be updated. Check it out - https://gist.github.com/luislavena/f064211759ee0f806c88

+1
source

I ran into this problem encountered on a windows machine. You need to renew the SSL certificate, which you can complete by completing the following steps:

Step 1: Get a New Certificate of Trust

We need to download AddTrustExternalCARoot-2048.pem .

Use the link above and put / save this file somewhere where you can easily find it (for example, your desktop).

IMPORTANT: the file must have .pem as an extension. Browsers such as Chrome will try to save it as a regular text file. Make sure you change the file name to have a .pem in it after downloading it.

Step 2. Locate the RubyGems certificate directory in your installation.

To copy this file, we need to know where to put it.

Depending on where you installed Ruby, the directory will be different.

Take, for example, the default installation of Ruby 2.1.5, placed in C: \ Ruby21

Open a command prompt and type:

C:> a gem that we chop C: /Ruby21/lib/ruby/2.1.0/rubygems.rb Now find this directory. Inside the same window, enter part of the path to the file extension, but use a backslash instead:

C:> start C: \ Ruby21 \ lib \ ruby ​​\ 2.1.0 \ rubygems This will open the explorer window in the directory we specified.

Step 3: Copy the New Trust Certificate

Now find the ssl_certs directory and copy the .pem file obtained from the previous step.

It will be listed in other files, such as GeoTrustGlobalCA.pem.

Thanks to this link to provide the information I need: https://gist.github.com/luislavena/f064211759ee0f806c88

+1
source

I ran into the same problem when I was studying Michael Hartle's Rail Guide 4.

I tried linking the installation in my old version of "sample_app_rails_4", while I just upgraded my rails to version 4.0.1.

I solved this problem, just git cloned a new version of "sample_app_rails_4".

0
source

It is very important because it is not a mistake, therefore its warning does not cause any problems. Go to C:\RailsInstaller\Ruby2.1.0\lib\ruby\2.1.0\dl.rb

So find dl.rb and then find the warn "DL is deprecated, please use Fiddle" and put # before this line means to make this comment, and it will become

 #warn "DL is deprecated, please use Fiddle" 

The problem is resolved.

0
source

Adding the tag flag to a gem in the Gemfile fixed for me, I don’t know why.

0
source

Source: https://habr.com/ru/post/952240/


All Articles