K
K
ksvdon2017-08-09 11:45:09
Ruby on Rails
ksvdon, 2017-08-09 11:45:09

I keep bumping into "Bundler::GemNotFound", first it was rake then concurrent-ruby, how to overcome?

So. I have a ruby ​​2.2 environment, I want to get a rudimentary "hello world" from ruby/rails (for testing purposes).
To do this, I performed:
1. gem install rails io-console
2. rails new blog --force
3. Added to the Gemfile:

bigdecimal
     execjs
     rake
     io-console

4. Uncommented gem 'therubyracer', platforms: :ruby в Gemfile
5. Done bundle install
6. rake secret
7. added what I got from 6 punts in config/secrets.ymlinstead "<%= ENV\[\"SECRET_KEY_BASE\"\] %>"of at the end of the file
8. Done rails generate controller welcome index
when curl (th) accessed the site - I received a "welcome index" in response, in
short, this whole kitchen worked, but then apparently some updates came out and everything broke to hell.
While I did not change anything in Gemfile versions - I got this error:
App 23055 stderr: /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find rake-12.0.0 in any of the sources (Bundler::GemNotFound)
App 23055 stderr: 	from /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler/spec_set.rb:81:in `map!'
App 23055 stderr: 	from /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler/spec_set.rb:81:in `materialize'
App 23055 stderr: 	from /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler/definition.rb:159:in `specs'
App 23055 stderr: 	from /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler/definition.rb:218:in `specs_for'
App 23055 stderr: 	from /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler/definition.rb:207:in `requested_specs'
App 23055 stderr: 	from /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler/runtime.rb:109:in `block in definition_method'
App 23055 stderr: 	from /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler/runtime.rb:21:in `setup'
App 23055 stderr: 	from /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler.rb:101:in `setup'
App 23055 stderr: 	from /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler/setup.rb:19:in `<top (required)>'
App 23055 stderr: 	from /opt/alt/ruby22/lib64/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
App 23055 stderr: 	from /opt/alt/ruby22/lib64/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'

the campaign was rake 10.4.2 and a new one was added 12.0.0 and they were not friends with each other. The old 10.4.2 was not deleted because it is default ... I decided to simply limit the version in the Gemfile gem 'rake', '<= 10.4.2'
so that it works with the old one - ok, this error is gone
[[email protected] app2]# rake
Run options: --seed 1187

# Running:



Finished in 0.002200s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips

but now a new one has popped up
App 29196 stderr: /home/kozh11/rubyvenv/app2/2.2/gems/bundler-1.15.3/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find concurrent-ruby-1.0.5 in any of the sources (Bundler::GemNotFound)

In short, one clings to the other, obviously some kind of garbage with dependencies. Maybe you can solve with the new version of "rake"? And will the problem go away? Can someone come across, tell me pzhlst how to be?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
K
ksvdon, 2017-08-31
@ksvdon

In general, the situation was like this. Rails has been updated from 4.2.* to 5.1.3 (currently).
To make everything work as before, I use ruby ​​2.4.
In the shell for the application, I do this:

gem install rails -v 5.1.3
gem install io-console sqlite3 bigdecimal execjs rake concurrent-ruby
rails new ${ruby_app_name} --force

I look for the Gemfile to have:
'sqlite3'
'bigdecimal'
'execjs'
'rake'
'io-console'
'concurrent-ruby'

also do not forget about
otherwise swearing at Java ( ps tried to install the node, but the question did not solve =(x3 why)
now!!!!
instead bundle installbecause otherwise the problem with 'concurrent-ruby' Bundler::GemNotFound
>>>cache is a bastard =)
do not forget about rake secretfor production!!!
I added it directly to */${ruby_app_name}/config/secrets.yml
well, and
it was I who received it on the screen as "hello world"
and more. From the production logs, it became clear that in the config it is
necessary that it be config.assets.compile = true
and not false, as by default
, I also add to the
line at the end:
well, i.e.
routes_link=/home/${ouruser}/${ruby_app_name}/config/routes.rb
sed -i '/get \x27welcome\x2Findex\x27/a\   root \x27welcome#index\x27' ${routes_link}

everything went up)

V
vsuhachev, 2017-08-11
@vsuhachev

therubyracer is a js interpreter for venda. You seem to be in Linux, so it's easier for you to remove therubyracer from the gemfile and put the node (as a package in the system)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question