Answer the question
In order to leave comments, you need to log in
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
gem 'therubyracer', platforms: :ruby в Gemfile
bundle install
rake secret
config/secrets.yml
instead "<%= ENV\[\"SECRET_KEY_BASE\"\] %>"
of at the end of the file rails generate controller welcome index
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'
gem 'rake', '<= 10.4.2'
[[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
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)
Answer the question
In order to leave comments, you need to log in
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
'sqlite3'
'bigdecimal'
'execjs'
'rake'
'io-console'
'concurrent-ruby'
bundle install
because otherwise the problem with 'concurrent-ruby' Bundler::GemNotFound
rake secret
for production!!! */${ruby_app_name}/config/secrets.yml
config.assets.compile = true
routes_link=/home/${ouruser}/${ruby_app_name}/config/routes.rb
sed -i '/get \x27welcome\x2Findex\x27/a\ root \x27welcome#index\x27' ${routes_link}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question